[{"data":1,"prerenderedAt":2476},["ShallowReactive",2],{"page-\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002F":3,"content-directory":1633},{"id":4,"title":5,"body":6,"date":1619,"description":1620,"difficulty":1621,"draft":1622,"extension":1623,"meta":1624,"navigation":223,"path":1625,"seo":1626,"stem":1627,"tags":1628,"updated":1619,"__hash__":1632},"content\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Findex.md","CI\u002FCD Pipelines for Python CLIs",{"type":7,"value":8,"toc":1597},"minimark",[9,18,32,36,41,87,91,94,97,128,131,1090,1098,1102,1105,1108,1111,1114,1137,1141,1155,1181,1185,1192,1217,1221,1243,1255,1259,1266,1286,1290,1306,1310,1332,1341,1349,1360,1364,1367,1407,1411,1441,1445,1450,1457,1461,1473,1477,1493,1497,1511,1515,1522,1526,1533,1537,1593],[10,11,12,13,17],"p",{},"A command-line tool runs on machines you will never see: colleagues' Windows laptops, CI runners with an older Python, minimal containers, servers where it is installed by a configuration-management tool at 3 a.m. Your local test run proves the tool works in exactly one of those environments. Continuous integration is where it meets the rest, and continuous delivery is how a tested version reaches users without a maintainer running ",[14,15,16],"code",{},"twine upload"," from their laptop and hoping they built from the right commit.",[10,19,20,21,25,26,31],{},"This topic covers the pipeline a Python CLI actually needs: linting and type-checking that fail fast, a test matrix across Python versions and operating systems, dependency caching so all of that stays quick, a smoke test of the ",[22,23,24],"strong",{},"built wheel"," rather than the source tree, releases driven by git tags, and publishing to PyPI with trusted publishing so no long-lived token exists anywhere. The examples use GitHub Actions and ",[27,28,30],"a",{"href":29},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management\u002F","uv",", but the structure transfers directly to GitLab CI, Buildkite or any other system.",[33,34],"inline-diagram",{"name":35},"ci-topic-map",[37,38,40],"h2",{"id":39},"tldr","TL;DR",[42,43,44,51,57,71,77],"ul",{},[45,46,47,50],"li",{},[22,48,49],{},"Stage the pipeline",": lint and types first, then the test matrix, then build once, smoke-test the built wheel, and publish only on tags.",[45,52,53,56],{},[22,54,55],{},"Test where your users are",": every supported Python on Linux, plus the oldest and newest on Windows and macOS.",[45,58,59,62,63,66,67,70],{},[22,60,61],{},"Cache uv's downloads"," keyed on ",[14,64,65],{},"uv.lock",", and install with ",[14,68,69],{},"uv sync --locked"," so CI fails if the lockfile is stale.",[45,72,73,76],{},[22,74,75],{},"Test the artefact, not the checkout",": install the wheel into a clean environment and run the command from another directory.",[45,78,79,82,83,86],{},[22,80,81],{},"Derive the version from the git tag"," and publish with PyPI ",[22,84,85],{},"trusted publishing"," from a protected environment.",[37,88,90],{"id":89},"the-shape-of-the-pipeline","The shape of the pipeline",[10,92,93],{},"A good pipeline for a CLI is a sequence of gates, each cheaper than the next, arranged so that the expensive steps only run when the cheap ones pass — and so that the thing that is published is exactly the thing that was tested.",[33,95],{"name":96},"ci-pipeline-flow",[10,98,99,102,103,106,107,111,112,115,116,119,120,123,124,127],{},[22,100,101],{},"Lint and type-check"," first: they take seconds, catch a large share of mistakes, and there is no point running fifteen test jobs on code that does not pass ",[14,104,105],{},"ruff check",". The configuration for both is covered in ",[27,108,110],{"href":109},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code\u002F","linting and type-checking CLI code",". ",[22,113,114],{},"Test across the matrix"," next. Then ",[22,117,118],{},"build once"," — a single job produces the sdist and wheel and uploads them as an artefact — and ",[22,121,122],{},"smoke-test that artefact"," in a clean environment. Finally, ",[22,125,126],{},"publish"," only when the run was triggered by a version tag, downloading the very same artefact rather than rebuilding.",[10,129,130],{},"Here is a complete workflow that implements it:",[132,133,138],"pre",{"className":134,"code":135,"language":136,"meta":137,"style":137},"language-yaml shiki shiki-themes github-light github-dark","# .github\u002Fworkflows\u002Fci.yml\nname: ci\non:\n  push:\n    branches: [main]\n    tags: [\"v*\"]\n  pull_request:\n\npermissions:\n  contents: read\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: astral-sh\u002Fsetup-uv@v6\n        with: { enable-cache: true }\n      - run: uv sync --locked --group dev\n      - run: uv run ruff check .\n      - run: uv run ruff format --check .\n      - run: uv run mypy src\n\n  test:\n    needs: lint\n    strategy:\n      fail-fast: ${{ github.event_name == 'pull_request' }}\n      matrix:\n        os: [ubuntu-latest]\n        python: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n        include:\n          - { os: windows-latest, python: \"3.10\" }\n          - { os: windows-latest, python: \"3.14\" }\n          - { os: macos-latest, python: \"3.10\" }\n          - { os: macos-latest, python: \"3.14\" }\n    runs-on: ${{ matrix.os }}\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: astral-sh\u002Fsetup-uv@v6\n        with: { enable-cache: true, python-version: \"${{ matrix.python }}\" }\n      - run: uv sync --locked --group dev\n      - run: uv run pytest -q\n\n  build:\n    needs: test\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with: { fetch-depth: 0 }          # full history so the version can come from tags\n      - uses: astral-sh\u002Fsetup-uv@v6\n      - run: uv build\n      - uses: actions\u002Fupload-artifact@v4\n        with: { name: dist, path: dist\u002F }\n\n  smoke:\n    needs: build\n    strategy:\n      matrix: { os: [ubuntu-latest, windows-latest, macos-latest] }\n    runs-on: ${{ matrix.os }}\n    steps:\n      - uses: actions\u002Fdownload-artifact@v4\n        with: { name: dist, path: dist }\n      - uses: astral-sh\u002Fsetup-uv@v6\n      - run: uv tool install --find-links dist mytool\n        shell: bash\n      - run: mytool --version && mytool --help\n        shell: bash\n        working-directory: ${{ runner.temp }}\n\n  publish:\n    if: startsWith(github.ref, 'refs\u002Ftags\u002Fv')\n    needs: smoke\n    runs-on: ubuntu-latest\n    environment: pypi\n    permissions:\n      id-token: write\n    steps:\n      - uses: actions\u002Fdownload-artifact@v4\n        with: { name: dist, path: dist }\n      - uses: pypa\u002Fgh-action-pypi-publish@release\u002Fv1\n","yaml","",[14,139,140,149,164,174,182,197,210,218,225,233,244,249,257,265,276,284,298,310,330,343,355,367,379,384,392,403,411,422,430,443,477,485,510,531,553,574,584,591,602,613,638,649,661,666,674,684,693,700,711,732,743,755,767,793,798,806,816,823,847,856,863,875,898,909,921,932,944,953,964,969,977,988,998,1007,1018,1026,1037,1044,1055,1078],{"__ignoreMap":137},[141,142,145],"span",{"class":143,"line":144},"line",1,[141,146,148],{"class":147},"sJ8bj","# .github\u002Fworkflows\u002Fci.yml\n",[141,150,152,156,160],{"class":143,"line":151},2,[141,153,155],{"class":154},"s9eBZ","name",[141,157,159],{"class":158},"sVt8B",": ",[141,161,163],{"class":162},"sZZnC","ci\n",[141,165,167,171],{"class":143,"line":166},3,[141,168,170],{"class":169},"sj4cs","on",[141,172,173],{"class":158},":\n",[141,175,177,180],{"class":143,"line":176},4,[141,178,179],{"class":154},"  push",[141,181,173],{"class":158},[141,183,185,188,191,194],{"class":143,"line":184},5,[141,186,187],{"class":154},"    branches",[141,189,190],{"class":158},": [",[141,192,193],{"class":162},"main",[141,195,196],{"class":158},"]\n",[141,198,200,203,205,208],{"class":143,"line":199},6,[141,201,202],{"class":154},"    tags",[141,204,190],{"class":158},[141,206,207],{"class":162},"\"v*\"",[141,209,196],{"class":158},[141,211,213,216],{"class":143,"line":212},7,[141,214,215],{"class":154},"  pull_request",[141,217,173],{"class":158},[141,219,221],{"class":143,"line":220},8,[141,222,224],{"emptyLinePlaceholder":223},true,"\n",[141,226,228,231],{"class":143,"line":227},9,[141,229,230],{"class":154},"permissions",[141,232,173],{"class":158},[141,234,236,239,241],{"class":143,"line":235},10,[141,237,238],{"class":154},"  contents",[141,240,159],{"class":158},[141,242,243],{"class":162},"read\n",[141,245,247],{"class":143,"line":246},11,[141,248,224],{"emptyLinePlaceholder":223},[141,250,252,255],{"class":143,"line":251},12,[141,253,254],{"class":154},"jobs",[141,256,173],{"class":158},[141,258,260,263],{"class":143,"line":259},13,[141,261,262],{"class":154},"  lint",[141,264,173],{"class":158},[141,266,268,271,273],{"class":143,"line":267},14,[141,269,270],{"class":154},"    runs-on",[141,272,159],{"class":158},[141,274,275],{"class":162},"ubuntu-latest\n",[141,277,279,282],{"class":143,"line":278},15,[141,280,281],{"class":154},"    steps",[141,283,173],{"class":158},[141,285,287,290,293,295],{"class":143,"line":286},16,[141,288,289],{"class":158},"      - ",[141,291,292],{"class":154},"uses",[141,294,159],{"class":158},[141,296,297],{"class":162},"actions\u002Fcheckout@v4\n",[141,299,301,303,305,307],{"class":143,"line":300},17,[141,302,289],{"class":158},[141,304,292],{"class":154},[141,306,159],{"class":158},[141,308,309],{"class":162},"astral-sh\u002Fsetup-uv@v6\n",[141,311,313,316,319,322,324,327],{"class":143,"line":312},18,[141,314,315],{"class":154},"        with",[141,317,318],{"class":158},": { ",[141,320,321],{"class":154},"enable-cache",[141,323,159],{"class":158},[141,325,326],{"class":169},"true",[141,328,329],{"class":158}," }\n",[141,331,333,335,338,340],{"class":143,"line":332},19,[141,334,289],{"class":158},[141,336,337],{"class":154},"run",[141,339,159],{"class":158},[141,341,342],{"class":162},"uv sync --locked --group dev\n",[141,344,346,348,350,352],{"class":143,"line":345},20,[141,347,289],{"class":158},[141,349,337],{"class":154},[141,351,159],{"class":158},[141,353,354],{"class":162},"uv run ruff check .\n",[141,356,358,360,362,364],{"class":143,"line":357},21,[141,359,289],{"class":158},[141,361,337],{"class":154},[141,363,159],{"class":158},[141,365,366],{"class":162},"uv run ruff format --check .\n",[141,368,370,372,374,376],{"class":143,"line":369},22,[141,371,289],{"class":158},[141,373,337],{"class":154},[141,375,159],{"class":158},[141,377,378],{"class":162},"uv run mypy src\n",[141,380,382],{"class":143,"line":381},23,[141,383,224],{"emptyLinePlaceholder":223},[141,385,387,390],{"class":143,"line":386},24,[141,388,389],{"class":154},"  test",[141,391,173],{"class":158},[141,393,395,398,400],{"class":143,"line":394},25,[141,396,397],{"class":154},"    needs",[141,399,159],{"class":158},[141,401,402],{"class":162},"lint\n",[141,404,406,409],{"class":143,"line":405},26,[141,407,408],{"class":154},"    strategy",[141,410,173],{"class":158},[141,412,414,417,419],{"class":143,"line":413},27,[141,415,416],{"class":154},"      fail-fast",[141,418,159],{"class":158},[141,420,421],{"class":162},"${{ github.event_name == 'pull_request' }}\n",[141,423,425,428],{"class":143,"line":424},28,[141,426,427],{"class":154},"      matrix",[141,429,173],{"class":158},[141,431,433,436,438,441],{"class":143,"line":432},29,[141,434,435],{"class":154},"        os",[141,437,190],{"class":158},[141,439,440],{"class":162},"ubuntu-latest",[141,442,196],{"class":158},[141,444,446,449,451,454,457,460,462,465,467,470,472,475],{"class":143,"line":445},30,[141,447,448],{"class":154},"        python",[141,450,190],{"class":158},[141,452,453],{"class":162},"\"3.10\"",[141,455,456],{"class":158},", ",[141,458,459],{"class":162},"\"3.11\"",[141,461,456],{"class":158},[141,463,464],{"class":162},"\"3.12\"",[141,466,456],{"class":158},[141,468,469],{"class":162},"\"3.13\"",[141,471,456],{"class":158},[141,473,474],{"class":162},"\"3.14\"",[141,476,196],{"class":158},[141,478,480,483],{"class":143,"line":479},31,[141,481,482],{"class":154},"        include",[141,484,173],{"class":158},[141,486,488,491,494,496,499,501,504,506,508],{"class":143,"line":487},32,[141,489,490],{"class":158},"          - { ",[141,492,493],{"class":154},"os",[141,495,159],{"class":158},[141,497,498],{"class":162},"windows-latest",[141,500,456],{"class":158},[141,502,503],{"class":154},"python",[141,505,159],{"class":158},[141,507,453],{"class":162},[141,509,329],{"class":158},[141,511,513,515,517,519,521,523,525,527,529],{"class":143,"line":512},33,[141,514,490],{"class":158},[141,516,493],{"class":154},[141,518,159],{"class":158},[141,520,498],{"class":162},[141,522,456],{"class":158},[141,524,503],{"class":154},[141,526,159],{"class":158},[141,528,474],{"class":162},[141,530,329],{"class":158},[141,532,534,536,538,540,543,545,547,549,551],{"class":143,"line":533},34,[141,535,490],{"class":158},[141,537,493],{"class":154},[141,539,159],{"class":158},[141,541,542],{"class":162},"macos-latest",[141,544,456],{"class":158},[141,546,503],{"class":154},[141,548,159],{"class":158},[141,550,453],{"class":162},[141,552,329],{"class":158},[141,554,556,558,560,562,564,566,568,570,572],{"class":143,"line":555},35,[141,557,490],{"class":158},[141,559,493],{"class":154},[141,561,159],{"class":158},[141,563,542],{"class":162},[141,565,456],{"class":158},[141,567,503],{"class":154},[141,569,159],{"class":158},[141,571,474],{"class":162},[141,573,329],{"class":158},[141,575,577,579,581],{"class":143,"line":576},36,[141,578,270],{"class":154},[141,580,159],{"class":158},[141,582,583],{"class":162},"${{ matrix.os }}\n",[141,585,587,589],{"class":143,"line":586},37,[141,588,281],{"class":154},[141,590,173],{"class":158},[141,592,594,596,598,600],{"class":143,"line":593},38,[141,595,289],{"class":158},[141,597,292],{"class":154},[141,599,159],{"class":158},[141,601,297],{"class":162},[141,603,605,607,609,611],{"class":143,"line":604},39,[141,606,289],{"class":158},[141,608,292],{"class":154},[141,610,159],{"class":158},[141,612,309],{"class":162},[141,614,616,618,620,622,624,626,628,631,633,636],{"class":143,"line":615},40,[141,617,315],{"class":154},[141,619,318],{"class":158},[141,621,321],{"class":154},[141,623,159],{"class":158},[141,625,326],{"class":169},[141,627,456],{"class":158},[141,629,630],{"class":154},"python-version",[141,632,159],{"class":158},[141,634,635],{"class":162},"\"${{ matrix.python }}\"",[141,637,329],{"class":158},[141,639,641,643,645,647],{"class":143,"line":640},41,[141,642,289],{"class":158},[141,644,337],{"class":154},[141,646,159],{"class":158},[141,648,342],{"class":162},[141,650,652,654,656,658],{"class":143,"line":651},42,[141,653,289],{"class":158},[141,655,337],{"class":154},[141,657,159],{"class":158},[141,659,660],{"class":162},"uv run pytest -q\n",[141,662,664],{"class":143,"line":663},43,[141,665,224],{"emptyLinePlaceholder":223},[141,667,669,672],{"class":143,"line":668},44,[141,670,671],{"class":154},"  build",[141,673,173],{"class":158},[141,675,677,679,681],{"class":143,"line":676},45,[141,678,397],{"class":154},[141,680,159],{"class":158},[141,682,683],{"class":162},"test\n",[141,685,687,689,691],{"class":143,"line":686},46,[141,688,270],{"class":154},[141,690,159],{"class":158},[141,692,275],{"class":162},[141,694,696,698],{"class":143,"line":695},47,[141,697,281],{"class":154},[141,699,173],{"class":158},[141,701,703,705,707,709],{"class":143,"line":702},48,[141,704,289],{"class":158},[141,706,292],{"class":154},[141,708,159],{"class":158},[141,710,297],{"class":162},[141,712,714,716,718,721,723,726,729],{"class":143,"line":713},49,[141,715,315],{"class":154},[141,717,318],{"class":158},[141,719,720],{"class":154},"fetch-depth",[141,722,159],{"class":158},[141,724,725],{"class":169},"0",[141,727,728],{"class":158}," }          ",[141,730,731],{"class":147},"# full history so the version can come from tags\n",[141,733,735,737,739,741],{"class":143,"line":734},50,[141,736,289],{"class":158},[141,738,292],{"class":154},[141,740,159],{"class":158},[141,742,309],{"class":162},[141,744,746,748,750,752],{"class":143,"line":745},51,[141,747,289],{"class":158},[141,749,337],{"class":154},[141,751,159],{"class":158},[141,753,754],{"class":162},"uv build\n",[141,756,758,760,762,764],{"class":143,"line":757},52,[141,759,289],{"class":158},[141,761,292],{"class":154},[141,763,159],{"class":158},[141,765,766],{"class":162},"actions\u002Fupload-artifact@v4\n",[141,768,770,772,774,776,778,781,783,786,788,791],{"class":143,"line":769},53,[141,771,315],{"class":154},[141,773,318],{"class":158},[141,775,155],{"class":154},[141,777,159],{"class":158},[141,779,780],{"class":162},"dist",[141,782,456],{"class":158},[141,784,785],{"class":154},"path",[141,787,159],{"class":158},[141,789,790],{"class":162},"dist\u002F",[141,792,329],{"class":158},[141,794,796],{"class":143,"line":795},54,[141,797,224],{"emptyLinePlaceholder":223},[141,799,801,804],{"class":143,"line":800},55,[141,802,803],{"class":154},"  smoke",[141,805,173],{"class":158},[141,807,809,811,813],{"class":143,"line":808},56,[141,810,397],{"class":154},[141,812,159],{"class":158},[141,814,815],{"class":162},"build\n",[141,817,819,821],{"class":143,"line":818},57,[141,820,408],{"class":154},[141,822,173],{"class":158},[141,824,826,828,830,832,834,836,838,840,842,844],{"class":143,"line":825},58,[141,827,427],{"class":154},[141,829,318],{"class":158},[141,831,493],{"class":154},[141,833,190],{"class":158},[141,835,440],{"class":162},[141,837,456],{"class":158},[141,839,498],{"class":162},[141,841,456],{"class":158},[141,843,542],{"class":162},[141,845,846],{"class":158},"] }\n",[141,848,850,852,854],{"class":143,"line":849},59,[141,851,270],{"class":154},[141,853,159],{"class":158},[141,855,583],{"class":162},[141,857,859,861],{"class":143,"line":858},60,[141,860,281],{"class":154},[141,862,173],{"class":158},[141,864,866,868,870,872],{"class":143,"line":865},61,[141,867,289],{"class":158},[141,869,292],{"class":154},[141,871,159],{"class":158},[141,873,874],{"class":162},"actions\u002Fdownload-artifact@v4\n",[141,876,878,880,882,884,886,888,890,892,894,896],{"class":143,"line":877},62,[141,879,315],{"class":154},[141,881,318],{"class":158},[141,883,155],{"class":154},[141,885,159],{"class":158},[141,887,780],{"class":162},[141,889,456],{"class":158},[141,891,785],{"class":154},[141,893,159],{"class":158},[141,895,780],{"class":162},[141,897,329],{"class":158},[141,899,901,903,905,907],{"class":143,"line":900},63,[141,902,289],{"class":158},[141,904,292],{"class":154},[141,906,159],{"class":158},[141,908,309],{"class":162},[141,910,912,914,916,918],{"class":143,"line":911},64,[141,913,289],{"class":158},[141,915,337],{"class":154},[141,917,159],{"class":158},[141,919,920],{"class":162},"uv tool install --find-links dist mytool\n",[141,922,924,927,929],{"class":143,"line":923},65,[141,925,926],{"class":154},"        shell",[141,928,159],{"class":158},[141,930,931],{"class":162},"bash\n",[141,933,935,937,939,941],{"class":143,"line":934},66,[141,936,289],{"class":158},[141,938,337],{"class":154},[141,940,159],{"class":158},[141,942,943],{"class":162},"mytool --version && mytool --help\n",[141,945,947,949,951],{"class":143,"line":946},67,[141,948,926],{"class":154},[141,950,159],{"class":158},[141,952,931],{"class":162},[141,954,956,959,961],{"class":143,"line":955},68,[141,957,958],{"class":154},"        working-directory",[141,960,159],{"class":158},[141,962,963],{"class":162},"${{ runner.temp }}\n",[141,965,967],{"class":143,"line":966},69,[141,968,224],{"emptyLinePlaceholder":223},[141,970,972,975],{"class":143,"line":971},70,[141,973,974],{"class":154},"  publish",[141,976,173],{"class":158},[141,978,980,983,985],{"class":143,"line":979},71,[141,981,982],{"class":154},"    if",[141,984,159],{"class":158},[141,986,987],{"class":162},"startsWith(github.ref, 'refs\u002Ftags\u002Fv')\n",[141,989,991,993,995],{"class":143,"line":990},72,[141,992,397],{"class":154},[141,994,159],{"class":158},[141,996,997],{"class":162},"smoke\n",[141,999,1001,1003,1005],{"class":143,"line":1000},73,[141,1002,270],{"class":154},[141,1004,159],{"class":158},[141,1006,275],{"class":162},[141,1008,1010,1013,1015],{"class":143,"line":1009},74,[141,1011,1012],{"class":154},"    environment",[141,1014,159],{"class":158},[141,1016,1017],{"class":162},"pypi\n",[141,1019,1021,1024],{"class":143,"line":1020},75,[141,1022,1023],{"class":154},"    permissions",[141,1025,173],{"class":158},[141,1027,1029,1032,1034],{"class":143,"line":1028},76,[141,1030,1031],{"class":154},"      id-token",[141,1033,159],{"class":158},[141,1035,1036],{"class":162},"write\n",[141,1038,1040,1042],{"class":143,"line":1039},77,[141,1041,281],{"class":154},[141,1043,173],{"class":158},[141,1045,1047,1049,1051,1053],{"class":143,"line":1046},78,[141,1048,289],{"class":158},[141,1050,292],{"class":154},[141,1052,159],{"class":158},[141,1054,874],{"class":162},[141,1056,1058,1060,1062,1064,1066,1068,1070,1072,1074,1076],{"class":143,"line":1057},79,[141,1059,315],{"class":154},[141,1061,318],{"class":158},[141,1063,155],{"class":154},[141,1065,159],{"class":158},[141,1067,780],{"class":162},[141,1069,456],{"class":158},[141,1071,785],{"class":154},[141,1073,159],{"class":158},[141,1075,780],{"class":162},[141,1077,329],{"class":158},[141,1079,1081,1083,1085,1087],{"class":143,"line":1080},80,[141,1082,289],{"class":158},[141,1084,292],{"class":154},[141,1086,159],{"class":158},[141,1088,1089],{"class":162},"pypa\u002Fgh-action-pypi-publish@release\u002Fv1\n",[10,1091,1092,1093,1097],{},"Each job is the subject of one of the guides below, so the remaining sections explain ",[1094,1095,1096],"em",{},"why"," each piece looks the way it does rather than repeating it.",[37,1099,1101],{"id":1100},"testing-where-your-users-are","Testing where your users are",[10,1103,1104],{},"The test matrix earns its runner minutes by catching bugs that no amount of local testing would find. CLIs are especially exposed, because they interact directly with the operating system — paths, encodings, subprocesses, signals, terminals — in exactly the ways that differ between platforms.",[33,1106],{"name":1107},"ci-why-cli-matrix",[10,1109,1110],{},"A full matrix of five Python versions on three operating systems is fifteen jobs per push. Most projects get nearly all of the value for fewer: run every supported version on Linux, where runners are fastest and cheapest, and only the oldest and newest versions on Windows and macOS, where platform bugs appear regardless of the Python version.",[33,1112],{"name":1113},"ci-job-timing-bars",[10,1115,1116,1117,1120,1121,1123,1124,1127,1128,1131,1132,1136],{},"Two refinements are worth the extra lines. Set ",[14,1118,1119],{},"fail-fast"," to cancel sibling jobs on pull requests, where a quick signal matters, but not on ",[14,1122,193],{},", where you want the full picture of what is broken. And consider a job that installs your ",[22,1125,1126],{},"lowest declared dependency versions"," (",[14,1129,1130],{},"uv sync --resolution lowest-direct","), which catches the classic bug of using an API added after your stated lower bound. The details, including running the same matrix locally, are in ",[27,1133,1135],{"href":1134},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Ftesting-a-cli-across-python-versions-with-github-actions\u002F","testing a CLI across Python versions with GitHub Actions",".",[37,1138,1140],{"id":1139},"keeping-it-fast","Keeping it fast",[10,1142,1143,1144,1147,1148,1151,1152,1154],{},"A pipeline that takes twenty minutes is a pipeline people learn to ignore. For Python projects, dependency installation is usually the biggest avoidable cost, and uv's cache removes most of it. ",[14,1145,1146],{},"astral-sh\u002Fsetup-uv"," with ",[14,1149,1150],{},"enable-cache: true"," restores uv's cache at the start of the job and saves it at the end, keyed by default on the lockfile, so the cache is invalidated exactly when dependencies change. With a warm cache, ",[14,1153,69],{}," links packages from the cache instead of downloading them.",[10,1156,1157,1160,1161,1164,1165,1167,1168,1171,1172,1175,1176,1180],{},[14,1158,1159],{},"--locked"," matters for correctness as well as speed: it makes ",[14,1162,1163],{},"uv sync"," fail if ",[14,1166,65],{}," does not match ",[14,1169,1170],{},"pyproject.toml",", instead of silently re-resolving. CI then tests exactly the dependency set that developers and releases use, and a forgotten ",[14,1173,1174],{},"uv lock"," after editing dependencies is caught in the first job. ",[27,1177,1179],{"href":1178},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fcaching-uv-dependencies-in-ci\u002F","Caching uv dependencies in CI"," covers cache keys, pruning, other CI systems and Docker layer caching.",[37,1182,1184],{"id":1183},"test-the-wheel-not-the-checkout","Test the wheel, not the checkout",[10,1186,1187,1188,1191],{},"Unit tests run against the source tree, where every file is present, every development dependency is installed, and ",[14,1189,1190],{},"import mytool"," finds the package in the current directory. Users get something else: a wheel, installed into a fresh environment, containing only what your build configuration included. The gap between the two produces a distinctive class of bug — a template file not included in the wheel, an entry point with a typo, a runtime dependency listed only in the dev group — which passes every test and fails on the first user's first command.",[10,1193,1194,1195,1198,1199,1202,1203,1206,1207,1211,1212,1216],{},"The fix is a smoke test of the built artefact: install the wheel into an isolated environment with ",[14,1196,1197],{},"uv tool install",", change to a directory outside the checkout, and run the installed command. A ",[14,1200,1201],{},"doctor"," or ",[14,1204,1205],{},"self-check"," subcommand that loads every template, schema and plugin makes that smoke test thorough. ",[27,1208,1210],{"href":1209},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fsmoke-testing-the-built-wheel-in-ci\u002F","Smoke-testing the built wheel in CI"," shows how to build such a command and wire it in, and ",[27,1213,1215],{"href":1214},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fbuilding-wheels-and-sdists-for-python-clis\u002F","building wheels and sdists for Python CLIs"," covers getting the build configuration right in the first place.",[37,1218,1220],{"id":1219},"releasing-from-tags","Releasing from tags",[10,1222,1223,1224,1202,1227,1230,1231,1235,1236,1239,1240,1242],{},"The most reliable release process is the one with the fewest manual steps. With the version derived from git tags — using ",[14,1225,1226],{},"hatch-vcs",[14,1228,1229],{},"setuptools-scm",", as described in ",[27,1232,1234],{"href":1233},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fderiving-versions-from-git-tags-with-hatch-vcs\u002F","deriving versions from git tags with hatch-vcs"," — a release becomes a single command: push an annotated tag such as ",[14,1237,1238],{},"v1.5.0",". The workflow's ",[14,1241,126],{}," job only runs for tag pushes, and because the version comes from the tag, the package and the tag can never disagree.",[10,1244,1245,1246,1250,1251,1136],{},"A tag-driven release also makes rollbacks of a failed release simple. If the pipeline fails before publishing, nothing has reached PyPI; delete the tag, fix the problem, and push it again. ",[27,1247,1249],{"href":1248},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fautomating-releases-from-git-tags\u002F","Automating releases from git tags"," adds release notes from your changelog, a GitHub release with the wheel attached, and guards against tagging the wrong commit. The changelog side is covered in ",[27,1252,1254],{"href":1253},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fautomating-changelogs-with-conventional-commits\u002F","automating changelogs with conventional commits",[37,1256,1258],{"id":1257},"publishing-without-secrets","Publishing without secrets",[10,1260,1261,1262,1265],{},"For years, publishing from CI meant creating a PyPI API token and storing it as a repository secret — a long-lived credential with upload rights to your package, readable by any workflow that asks for it. ",[22,1263,1264],{},"Trusted publishing"," replaces it. You tell PyPI which repository, workflow file and environment are allowed to publish your project; the CI job requests a short-lived OpenID Connect token from GitHub proving its identity; PyPI exchanges it for an upload token valid for a few minutes. No secret is stored anywhere, so there is nothing to leak or rotate, and uploads carry attestations linking each file to the workflow run that built it.",[10,1267,1268,1269,1272,1273,1276,1277,1280,1281,1285],{},"The workflow above shows the only configuration needed on the CI side: ",[14,1270,1271],{},"permissions: id-token: write"," on the publish job, and the ",[14,1274,1275],{},"pypa\u002Fgh-action-pypi-publish"," action. Putting the job in a protected ",[14,1278,1279],{},"pypi"," environment with required reviewers adds a human approval before each release. ",[27,1282,1284],{"href":1283},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fpublishing-to-pypi-with-trusted-publishing\u002F","Publishing to PyPI with trusted publishing"," walks through the PyPI side, TestPyPI dry runs and troubleshooting.",[37,1287,1289],{"id":1288},"beyond-pypi","Beyond PyPI",[10,1291,1292,1293,1296,1297,1301,1302,1136],{},"Not every CLI's users install from PyPI. Standalone binaries built with PyInstaller or Nuitka, zipapps built with shiv, Homebrew formulae and Scoop manifests all slot into the same pipeline as additional jobs after the smoke test — built per platform in a matrix, attached to the GitHub release, and checked with the same \"does ",[14,1294,1295],{},"--version"," run?\" smoke test. The patterns are in ",[27,1298,1300],{"href":1299},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fbuilding-cross-platform-release-binaries-in-ci\u002F","building cross-platform release binaries in CI"," and ",[27,1303,1305],{"href":1304},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fhomebrew-and-scoop-packaging-for-python-clis\u002F","Homebrew and Scoop packaging for Python CLIs",[37,1307,1309],{"id":1308},"making-the-pipeline-the-gate","Making the pipeline the gate",[10,1311,1312,1313,1316,1317,1319,1320,1323,1324,1327,1328,1331],{},"A pipeline only protects users if nothing can bypass it. Two settings in the repository turn it from advice into a rule. ",[22,1314,1315],{},"Branch protection"," on ",[14,1318,193],{}," requires the lint, test and smoke jobs to pass before a pull request can merge; list the individual matrix jobs, or add a final summary job that ",[14,1321,1322],{},"needs"," all of them and require that one, so adding a Python version to the matrix does not mean editing the protection rules. ",[22,1325,1326],{},"Tag protection"," (a ruleset restricting who can create ",[14,1329,1330],{},"v*"," tags) ensures that only maintainers can trigger a release, since pushing a tag is now the entire release process.",[10,1333,1334,1335,1337,1338,1340],{},"It is also worth deciding up front what happens when the pipeline is red on ",[14,1336,193],{},". The healthiest convention is that a red ",[14,1339,193],{}," is the team's top priority: either fix forward within the hour or revert the change that broke it. A pipeline that is \"usually a bit red\" stops being read, and then the Windows-only encoding bug it caught last Tuesday ships anyway.",[10,1342,1343,1344,1348],{},"Flaky tests deserve particular suspicion in CLI projects. Tests that spawn subprocesses, bind ports, depend on timing or touch the real home directory are the usual culprits, and they tend to fail more on slower Windows and macOS runners. Quarantine a flaky test with a marker and an issue link rather than retrying the whole job until it passes; retry-until-green trains everyone to ignore failures. The isolation techniques in ",[27,1345,1347],{"href":1346},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Fmocking-filesystem-and-network-in-cli-tests\u002F","mocking filesystem and network in CLI tests"," remove most sources of flakiness at the root.",[10,1350,1351,1352,1355,1356,1136],{},"Finally, keep an eye on the matrix as time passes. Each October a new Python release arrives and the oldest supported version reaches end of life a year later; adding the new version to the matrix early — even as an allowed-to-fail job during its release candidates — surfaces deprecation warnings months before users hit them, and dropping the old one lets you use newer language features. Record the supported range in ",[14,1353,1354],{},"requires-python"," and the trove classifiers so the matrix, the metadata and the documentation agree, as described in ",[27,1357,1359],{"href":1358},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fwriting-pyproject-toml-metadata-for-a-cli\u002F","writing pyproject.toml metadata for a CLI",[37,1361,1363],{"id":1362},"security-basics-for-cli-pipelines","Security basics for CLI pipelines",[10,1365,1366],{},"A release pipeline can publish code to every one of your users, which makes it worth a few minutes of hardening:",[42,1368,1369,1378,1388,1394],{},[45,1370,1371,1127,1374,1377],{},[22,1372,1373],{},"Default to read-only permissions",[14,1375,1376],{},"permissions: contents: read"," at the top) and grant more only to the job that needs it.",[45,1379,1380,1387],{},[22,1381,1382,1383,1386],{},"Never publish from ",[14,1384,1385],{},"pull_request"," workflows",", which can run code from forks.",[45,1389,1390,1393],{},[22,1391,1392],{},"Pin third-party actions"," to a commit SHA, or at least a major version from a publisher you trust; Dependabot or Renovate can keep the pins current.",[45,1395,1396,1399,1400,1402,1403,1136],{},[22,1397,1398],{},"Keep secrets out of test jobs."," If integration tests need credentials, run them only on ",[14,1401,193],{}," and only in a job that does not execute untrusted code. The CLI-side practices are in ",[27,1404,1406],{"href":1405},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002F","secrets and credentials in Python CLIs",[37,1408,1410],{"id":1409},"key-takeaways","Key takeaways",[42,1412,1413,1416,1419,1429,1432,1438],{},[45,1414,1415],{},"Order the pipeline cheapest-first: lint and types, test matrix, build once, smoke test, publish on tags.",[45,1417,1418],{},"Test every supported Python on Linux and the extremes on Windows and macOS.",[45,1420,1421,1422,1424,1425,1428],{},"Install with ",[14,1423,69],{}," and let ",[14,1426,1427],{},"setup-uv"," cache by lockfile.",[45,1430,1431],{},"Smoke-test the built wheel in a clean environment, from outside the checkout.",[45,1433,1434,1435,1136],{},"Take the version from the git tag so a release is a single ",[14,1436,1437],{},"git push",[45,1439,1440],{},"Publish with trusted publishing from a protected environment; store no PyPI token at all.",[37,1442,1444],{"id":1443},"frequently-asked-questions","Frequently asked questions",[1446,1447,1449],"h3",{"id":1448},"do-i-need-windows-and-macos-runners-if-my-team-only-uses-linux","Do I need Windows and macOS runners if my team only uses Linux?",[10,1451,1452,1453,1456],{},"If anyone outside the team installs the tool, yes — at least for the oldest and newest Python. If the CLI is strictly for Linux servers, document that in the package metadata (",[14,1454,1455],{},"Operating System :: POSIX :: Linux"," classifiers) and a Linux-only matrix is honest.",[1446,1458,1460],{"id":1459},"should-i-use-tox-or-nox-in-ci-instead-of-calling-pytest-directly","Should I use tox or nox in CI instead of calling pytest directly?",[10,1462,1463,1464,1468,1469,1472],{},"If developers use nox or tox locally to run the matrix, running the same sessions in CI keeps the two in sync; see ",[27,1465,1467],{"href":1466},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fsupporting-multiple-python-versions-with-nox\u002F","supporting multiple Python versions with nox",". If not, the CI matrix calling ",[14,1470,1471],{},"uv run pytest"," directly is simpler.",[1446,1474,1476],{"id":1475},"how-do-i-run-the-pipeline-locally-before-pushing","How do I run the pipeline locally before pushing?",[10,1478,1479,1480,1483,1484,1488,1489,1492],{},"Run the same commands: ",[14,1481,1482],{},"uv sync --locked --group dev && uv run ruff check . && uv run mypy src && uv run pytest",". A pre-commit configuration covers the fast checks on every commit; see ",[27,1485,1487],{"href":1486},"\u002Fproject-setup-dependency-management\u002Fpre-commit-hooks-for-cli-projects\u002Fsetting-up-pre-commit-for-python-cli-repos\u002F","setting up pre-commit for Python CLI repos",". Tools like ",[14,1490,1491],{},"act"," can execute GitHub workflows locally but rarely match hosted runners exactly.",[1446,1494,1496],{"id":1495},"what-about-publishing-pre-releases","What about publishing pre-releases?",[10,1498,1499,1500,1503,1504,1507,1508,1510],{},"Tag ",[14,1501,1502],{},"v1.5.0rc1"," and let the same pipeline publish it; PEP 440 pre-release versions are not installed by default, so only users who opt in with ",[14,1505,1506],{},"--pre"," or an exact version get them. Some projects publish every ",[14,1509,193],{}," build to TestPyPI as a development release as well.",[1446,1512,1514],{"id":1513},"should-the-pipeline-run-on-a-schedule-as-well-as-on-pushes","Should the pipeline run on a schedule as well as on pushes?",[10,1516,1517,1518,1521],{},"A weekly scheduled run is cheap insurance for a CLI with unpinned or loosely pinned dependencies and for projects that change rarely. It catches breakage caused by the outside world — a new release of a dependency, a runner image update, a new Python patch release — before a user reports it, and it keeps the cache warm. Add ",[14,1519,1520],{},"schedule: [{cron: \"0 6 * * 1\"}]"," to the triggers and have failures notify the maintainers rather than going unnoticed in the Actions tab.",[1446,1523,1525],{"id":1524},"how-long-should-the-pipeline-take","How long should the pipeline take?",[10,1527,1528,1529,1532],{},"Aim for under ten minutes on a pull request, with lint feedback in under one. If it is slower, look at dependency caching, test parallelism with ",[14,1530,1531],{},"pytest-xdist",", and whether the matrix is larger than your support policy requires.",[37,1534,1536],{"id":1535},"related","Related",[42,1538,1539,1546,1552,1556,1560,1564,1568,1574,1580,1587],{},[45,1540,1541,1542],{},"Up: ",[27,1543,1545],{"href":1544},"\u002Fproject-setup-dependency-management\u002F","Project Setup & Dependency Management",[45,1547,1548,1549],{},"Down: ",[27,1550,1551],{"href":1134},"Testing a CLI across Python versions with GitHub Actions",[45,1553,1548,1554],{},[27,1555,1284],{"href":1283},[45,1557,1548,1558],{},[27,1559,1179],{"href":1178},[45,1561,1548,1562],{},[27,1563,1210],{"href":1209},[45,1565,1548,1566],{},[27,1567,1249],{"href":1248},[45,1569,1548,1570],{},[27,1571,1573],{"href":1572},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fpublishing-a-cli-docker-image-from-ci\u002F","Publishing a Python CLI as a Docker Image from CI",[45,1575,1548,1576],{},[27,1577,1579],{"href":1578},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Frunning-cli-tests-on-windows-and-macos-runners\u002F","Running CLI tests on Windows and macOS runners",[45,1581,1582,1583],{},"Sideways: ",[27,1584,1586],{"href":1585},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002F","Packaging Python CLIs for distribution",[45,1588,1582,1589],{},[27,1590,1592],{"href":1591},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002F","Testing Python CLI applications",[1594,1595,1596],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":137,"searchDepth":151,"depth":151,"links":1598},[1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1618],{"id":39,"depth":151,"text":40},{"id":89,"depth":151,"text":90},{"id":1100,"depth":151,"text":1101},{"id":1139,"depth":151,"text":1140},{"id":1183,"depth":151,"text":1184},{"id":1219,"depth":151,"text":1220},{"id":1257,"depth":151,"text":1258},{"id":1288,"depth":151,"text":1289},{"id":1308,"depth":151,"text":1309},{"id":1362,"depth":151,"text":1363},{"id":1409,"depth":151,"text":1410},{"id":1443,"depth":151,"text":1444,"children":1611},[1612,1613,1614,1615,1616,1617],{"id":1448,"depth":166,"text":1449},{"id":1459,"depth":166,"text":1460},{"id":1475,"depth":166,"text":1476},{"id":1495,"depth":166,"text":1496},{"id":1513,"depth":166,"text":1514},{"id":1524,"depth":166,"text":1525},{"id":1535,"depth":151,"text":1536},"2026-09-18","Build a CI\u002FCD pipeline for a Python CLI with GitHub Actions and uv: a cross-platform test matrix, caching, wheel smoke tests, tag releases and trusted publishing.","intermediate",false,"md",{},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis",{"title":5,"description":1620},"project-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Findex",[1629,1630,30,1631,1279],"ci","github-actions","release","zJpDTNovn0cUSsGBlwMTZgYiARkiC33RQMaghzyF--w",[1634,1637,1640,1643,1646,1649,1652,1655,1658,1661,1664,1667,1670,1673,1676,1679,1682,1685,1688,1691,1694,1697,1700,1703,1706,1709,1712,1715,1718,1721,1724,1727,1730,1733,1736,1739,1742,1745,1748,1751,1754,1757,1760,1763,1766,1769,1772,1775,1778,1781,1784,1787,1790,1793,1796,1799,1802,1805,1808,1811,1814,1817,1820,1823,1826,1829,1832,1835,1838,1841,1844,1847,1850,1853,1856,1859,1862,1865,1868,1871,1874,1877,1880,1883,1886,1889,1892,1895,1898,1901,1904,1907,1910,1913,1916,1919,1922,1925,1928,1931,1934,1937,1940,1943,1946,1949,1952,1955,1958,1961,1964,1967,1970,1973,1976,1979,1982,1985,1988,1991,1994,1997,2000,2003,2006,2009,2012,2015,2018,2021,2024,2027,2030,2033,2036,2039,2042,2045,2048,2051,2054,2057,2060,2063,2066,2069,2072,2075,2078,2081,2084,2087,2090,2093,2096,2099,2102,2105,2108,2111,2114,2117,2120,2123,2126,2129,2132,2135,2138,2141,2144,2147,2150,2153,2156,2159,2162,2165,2168,2171,2174,2177,2180,2183,2186,2189,2192,2195,2198,2201,2204,2207,2210,2213,2216,2219,2222,2225,2228,2231,2234,2237,2240,2243,2246,2247,2249,2252,2255,2258,2261,2264,2267,2270,2273,2276,2279,2282,2285,2288,2291,2294,2297,2300,2303,2306,2308,2311,2314,2317,2320,2323,2326,2329,2332,2335,2338,2341,2344,2347,2350,2353,2356,2359,2362,2365,2368,2371,2374,2377,2380,2383,2386,2389,2392,2395,2398,2401,2404,2407,2410,2413,2416,2419,2422,2425,2428,2431,2434,2437,2440,2443,2446,2449,2452,2455,2458,2461,2464,2467,2470,2473],{"path":1635,"title":1636},"\u002Fabout","About Python CLI Toolcraft",{"path":1638,"title":1639},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies","Advanced Argument Validation Strategies",{"path":1641,"title":1642},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fparsing-nested-json-arguments-in-python-clis","Parsing Nested JSON Args in Python CLIs",{"path":1644,"title":1645},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fvalidating-dates-and-durations-in-cli-arguments","Validating Dates and Durations in Python CLI Arguments",{"path":1647,"title":1648},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fvalidating-dependent-and-conflicting-options","Validating Dependent and Conflicting CLI Options",{"path":1650,"title":1651},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fvalidating-file-and-directory-paths-in-clis","Validating File and Directory Paths in CLIs",{"path":1653,"title":1654},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fvalidating-urls-hosts-and-ports","Validating URLs, Hosts and Ports in Python CLI Arguments",{"path":1656,"title":1657},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fwriting-custom-click-parameter-types","Writing Custom Click Parameter Types",{"path":1659,"title":1660},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual\u002Fbrowsing-records-with-a-textual-datatable","Browsing Records with a Textual DataTable Picker",{"path":1662,"title":1663},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual\u002Fbuilding-your-first-textual-app","Building Your First Textual App for a Python CLI",{"path":1665,"title":1666},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual\u002Fchoosing-between-a-cli-a-prompt-flow-and-a-tui","Choosing Between a CLI, a Prompt Flow and a TUI",{"path":1668,"title":1669},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual","Building Terminal UIs with Textual for Python CLIs",{"path":1671,"title":1672},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual\u002Frunning-background-work-in-textual-with-workers","Running Background Work in Textual with Workers",{"path":1674,"title":1675},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual\u002Fstyling-textual-apps-with-tcss","Styling Textual Apps with TCSS",{"path":1677,"title":1678},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual\u002Ftesting-textual-apps-with-pilot","Testing Textual Apps with Pilot",{"path":1680,"title":1681},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation\u002Fadding-examples-and-epilogs-to-help-output","Adding Examples and Epilogs to Help Output",{"path":1683,"title":1684},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation\u002Fdocumenting-environment-variables-in-help","Documenting Environment Variables in CLI Help",{"path":1686,"title":1687},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation\u002Fgenerating-man-pages-and-docs-from-a-cli","Generating Man Pages and Docs from a CLI",{"path":1689,"title":1690},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation","CLI Help Output and Documentation",{"path":1692,"title":1693},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation\u002Frich-formatted-help-with-rich-click","Rich-Formatted Help for Click CLIs with rich-click",{"path":1695,"title":1696},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation\u002Fversioning-and-deprecating-cli-flags","Versioning and Deprecating CLI Flags",{"path":1698,"title":1699},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation\u002Fwriting-help-text-users-actually-read","Writing Help Text Users Actually Read",{"path":1701,"title":1702},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Fadapting-output-to-terminal-width","Adapting Python CLI Output to Terminal Width",{"path":1704,"title":1705},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Fdetecting-ci-environments-and-non-interactive-shells","Detecting CI Environments and Non-Interactive Shells",{"path":1707,"title":1708},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Ffixing-unicode-and-encoding-errors-on-windows","Fixing Unicode and Encoding Errors on Windows in Python CLIs",{"path":1710,"title":1711},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Fhandling-ansi-escape-codes-on-windows-consoles","Handling ANSI Escape Codes on Windows Consoles",{"path":1713,"title":1714},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility","Cross-Platform Terminal Compatibility for Python CLIs",{"path":1716,"title":1717},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Frespecting-no-color-and-force-color","Respecting NO_COLOR and FORCE_COLOR in Python CLIs",{"path":1719,"title":1720},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Fsupporting-dumb-terminals-and-screen-readers","Supporting Dumb Terminals and Screen Readers in a Python CLI",{"path":1722,"title":1723},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Fchoosing-exit-codes-for-cli-tools","Choosing Exit Codes for CLI Tools",{"path":1725,"title":1726},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Fdesigning-an-exception-hierarchy-for-a-cli","Designing an Exception Hierarchy for a Python CLI",{"path":1728,"title":1729},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Fdid-you-mean-suggestions-for-mistyped-input","Did You Mean…? Suggestions for Mistyped CLI Input",{"path":1731,"title":1732},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Ffriendly-error-messages-and-tracebacks","Friendly Error Messages and Tracebacks",{"path":1734,"title":1735},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Fhandling-keyboard-interrupt-cleanly","Handling Keyboard Interrupt Cleanly",{"path":1737,"title":1738},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes","Error Handling and Exit Codes for CLIs",{"path":1740,"title":1741},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Freporting-machine-readable-errors-in-json-mode","Reporting Machine-Readable Errors in JSON Mode",{"path":1743,"title":1744},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Fwriting-crash-reports-users-can-send","Writing Crash Reports Users Can Send",{"path":1746,"title":1747},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Fconfig-precedence-flags-env-files-defaults","Config Precedence: Flags, Env, Files, Defaults",{"path":1749,"title":1750},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Fdiscovering-project-config-files-by-walking-up-directories","Discovering Project Config Files by Walking Up Directories",{"path":1752,"title":1753},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars","Handling Config Files and Env Vars in CLIs",{"path":1755,"title":1756},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Floading-yaml-configs-safely-in-cli-apps","Loading YAML configs safely in CLI apps",{"path":1758,"title":1759},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Freading-toml-config-with-tomllib","Reading TOML Config with tomllib in Python CLIs",{"path":1761,"title":1762},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Ftyped-settings-with-pydantic-settings","Typed Settings with pydantic-settings in Python CLIs",{"path":1764,"title":1765},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Fvalidating-config-files-with-json-schema","Validating Config Files with JSON Schema in a Python CLI",{"path":1767,"title":1768},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Fwriting-a-config-init-and-edit-command","Writing a Config Init and Edit Command for a Python CLI",{"path":1770,"title":1771},"\u002Fadvanced-input-parsing-user-experience","Advanced Input Parsing for Python CLIs",{"path":1773,"title":1774},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Fadding-progress-bars-and-spinners-to-python-clis","Progress Bars and Spinners for Python CLIs",{"path":1776,"title":1777},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Fbuilding-interactive-prompts-and-menus","Building Interactive Prompts and Menus in Python CLIs",{"path":1779,"title":1780},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Fbuilding-tree-views-with-rich","Building Tree Views with Rich in a Python CLI",{"path":1782,"title":1783},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich","Interactive Terminal UI with Rich",{"path":1785,"title":1786},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Flive-dashboards-with-rich-live","Live Dashboards with Rich Live in Python CLIs",{"path":1788,"title":1789},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Frendering-markdown-and-syntax-highlighting-with-rich","Rendering Markdown and Syntax Highlighting with Rich",{"path":1791,"title":1792},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Frendering-tables-and-json-with-rich","Rendering Tables and JSON with Rich",{"path":1794,"title":1795},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Ftheming-rich-output-consistently","Theming Rich Output Consistently in Python CLIs",{"path":1797,"title":1798},"\u002Fadvanced-input-parsing-user-experience\u002Foutput-formats-for-data-clis\u002Fadding-a-format-flag-for-table-json-and-csv","Adding a Format Flag for Table, JSON and CSV Output",{"path":1800,"title":1801},"\u002Fadvanced-input-parsing-user-experience\u002Foutput-formats-for-data-clis\u002Fcustom-output-templates-with-a-format-string","Custom Output Templates with a Format String in Python CLIs",{"path":1803,"title":1804},"\u002Fadvanced-input-parsing-user-experience\u002Foutput-formats-for-data-clis\u002Fexporting-cli-results-to-files","Exporting CLI Results to Files from a Python CLI",{"path":1806,"title":1807},"\u002Fadvanced-input-parsing-user-experience\u002Foutput-formats-for-data-clis","Output Formats for Data-Heavy Python CLIs",{"path":1809,"title":1810},"\u002Fadvanced-input-parsing-user-experience\u002Foutput-formats-for-data-clis\u002Fselecting-fields-and-columns-from-cli-output","Selecting Fields and Columns from Python CLI Output",{"path":1812,"title":1813},"\u002Fadvanced-input-parsing-user-experience\u002Foutput-formats-for-data-clis\u002Fwriting-csv-and-tsv-output-correctly","Writing CSV and TSV Output Correctly from a Python CLI",{"path":1815,"title":1816},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis\u002Fargcomplete-for-argparse-clis","Tab Completion for argparse CLIs with argcomplete",{"path":1818,"title":1819},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis\u002Fdynamic-completion-values-from-apis-and-files","Dynamic Completion Values from APIs and Files",{"path":1821,"title":1822},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis\u002Fenabling-tab-completion-in-click-and-typer","Enabling Tab Completion in Click and Typer",{"path":1824,"title":1825},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis","Shell Completion for Python CLIs",{"path":1827,"title":1828},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis\u002Finstalling-shell-completion-for-bash-zsh-fish","Installing Shell Completion for bash, zsh, fish",{"path":1830,"title":1831},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis\u002Fshipping-completion-scripts-with-packages","Shipping Shell Completion Scripts with a Python CLI",{"path":1833,"title":1834},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis\u002Ftesting-shell-completion-in-python-clis","Testing Shell Completion in Python CLIs",{"path":1836,"title":1837},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps\u002Fadding-trace-ids-and-context-to-cli-logs","Adding Trace IDs and Context to Python CLI Logs",{"path":1839,"title":1840},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps\u002Fadding-verbose-and-quiet-logging-flags","Adding Verbose and Quiet Logging Flags",{"path":1842,"title":1843},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps","Structured Logging for CLI Apps",{"path":1845,"title":1846},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps\u002Flogging-with-structlog-in-a-cli","Logging with structlog in a Python CLI",{"path":1848,"title":1849},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps\u002Fseparating-logs-from-program-output","Separating Logs from Program Output in a Python CLI",{"path":1851,"title":1852},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps\u002Fstructured-json-logging-in-python-clis","Structured JSON Logging in Python CLIs",{"path":1854,"title":1855},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps\u002Fwriting-rotating-log-files-from-a-cli","Writing Rotating Log Files from a Python CLI",{"path":1857,"title":1858},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Fdetecting-tty-and-adapting-output","Detecting a TTY and Adapting Output",{"path":1860,"title":1861},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Femitting-json-output-for-scripting","Emitting JSON Output for Scripting",{"path":1863,"title":1864},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Fhandling-broken-pipe-and-sigpipe","Handling Broken Pipe and SIGPIPE",{"path":1866,"title":1867},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes","Working with stdin, stdout and Pipes",{"path":1869,"title":1870},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Fnull-delimited-input-and-xargs-compatibility","Null-Delimited Input and xargs Compatibility in Python CLIs",{"path":1872,"title":1873},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Fprocessing-large-files-and-ndjson-streams","Processing Large Files and NDJSON Streams in Python CLIs",{"path":1875,"title":1876},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Freading-piped-input-in-python-clis","Reading Piped Input in Python CLIs",{"path":1878,"title":1879},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Fbuilding-an-api-client-cli-with-httpx","Building an API Client CLI with httpx",{"path":1881,"title":1882},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Fdownloading-files-with-progress-in-python","Downloading Files with Progress in Python CLIs",{"path":1884,"title":1885},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis","Calling HTTP APIs from Python CLIs",{"path":1887,"title":1888},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Fmocking-http-in-cli-tests-with-respx","Mocking HTTP in Python CLI Tests with respx",{"path":1890,"title":1891},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Foauth-device-flow-login-for-clis","OAuth Device Flow Login for Python CLIs",{"path":1893,"title":1894},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Fpaginating-api-results-in-a-cli","Paginating API Results in a Python CLI",{"path":1896,"title":1897},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Fretries-and-backoff-for-cli-http-calls","Retries and Backoff for CLI HTTP Calls",{"path":1899,"title":1900},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Fuploading-files-with-multipart-and-progress","Uploading Files with Multipart and Progress in a Python CLI",{"path":1902,"title":1903},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Fcancelling-async-tasks-on-ctrl-c","Cancelling Async Tasks on Ctrl+C in Python CLIs",{"path":1905,"title":1906},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis","Concurrency and Async in Python CLIs",{"path":1908,"title":1909},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Fmultiprocessing-for-cpu-bound-cli-tasks","Multiprocessing for CPU-Bound CLI Tasks",{"path":1911,"title":1912},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Fparallelising-cli-work-with-thread-pools","Parallelising CLI Work with Thread Pools",{"path":1914,"title":1915},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Frate-limiting-concurrent-requests-in-clis","Rate-Limiting Concurrent Requests in Python CLIs",{"path":1917,"title":1918},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Frunning-async-code-in-typer-and-click","Running Async Code in Typer and Click",{"path":1920,"title":1921},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Fshowing-progress-for-concurrent-tasks","Showing Progress for Concurrent Tasks in a Python CLI",{"path":1923,"title":1924},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Fstructured-concurrency-with-taskgroups-in-clis","Structured Concurrency with TaskGroups in Python CLIs",{"path":1926,"title":1927},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fcross-platform-paths-with-pathlib","Cross-Platform Paths with pathlib in CLIs",{"path":1929,"title":1930},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Ffile-locking-for-concurrent-cli-runs","File Locking for Concurrent CLI Runs in Python",{"path":1932,"title":1933},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fhandling-file-permissions-and-umask-in-clis","Handling File Permissions and umask in Python CLIs",{"path":1935,"title":1936},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes","Filesystem Paths and Atomic Writes for CLIs",{"path":1938,"title":1939},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fsafe-temporary-files-and-directories","Safe Temporary Files and Directories in CLIs",{"path":1941,"title":1942},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fstoring-app-data-with-platformdirs","Storing CLI App Data with platformdirs",{"path":1944,"title":1945},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fwalking-directory-trees-with-ignore-rules","Walking Directory Trees with Ignore Rules in a Python CLI",{"path":1947,"title":1948},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fwriting-files-atomically-in-python-clis","Writing Files Atomically in Python CLIs",{"path":1950,"title":1951},"\u002Fcli-runtime-systems-integration","CLI Runtime & Systems Integration for Python",{"path":1953,"title":1954},"\u002Fcli-runtime-systems-integration\u002Flocal-state-and-sqlite-in-python-clis\u002Fcaching-http-responses-on-disk-in-a-cli","Caching HTTP Responses on Disk in a Python CLI",{"path":1956,"title":1957},"\u002Fcli-runtime-systems-integration\u002Flocal-state-and-sqlite-in-python-clis","Local State and SQLite in Python CLIs",{"path":1959,"title":1960},"\u002Fcli-runtime-systems-integration\u002Flocal-state-and-sqlite-in-python-clis\u002Fmigrating-a-cli-sqlite-schema","Migrating a CLI’s SQLite Schema Between Releases",{"path":1962,"title":1963},"\u002Fcli-runtime-systems-integration\u002Flocal-state-and-sqlite-in-python-clis\u002Frecording-and-querying-cli-run-history","Recording and Querying CLI Run History in SQLite",{"path":1965,"title":1966},"\u002Fcli-runtime-systems-integration\u002Flocal-state-and-sqlite-in-python-clis\u002Fstoring-cli-state-in-sqlite","Storing CLI State in SQLite with a Small Repository Class",{"path":1968,"title":1969},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis\u002Fbuilding-a-watch-mode-with-watchfiles","Building a Watch Mode with watchfiles in Python",{"path":1971,"title":1972},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis\u002Fhandling-sigterm-and-graceful-shutdown","Handling SIGTERM and Graceful Shutdown in CLIs",{"path":1974,"title":1975},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis\u002Fhealth-checks-and-heartbeats-for-long-running-clis","Health Checks and Heartbeats for Long-Running CLIs",{"path":1977,"title":1978},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis","Long-Running and Watch-Mode Python CLIs",{"path":1980,"title":1981},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis\u002Freloading-config-on-sighup","Reloading Configuration on SIGHUP in a Python CLI",{"path":1983,"title":1984},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis\u002Frunning-a-cli-as-a-systemd-service","Running a Python CLI as a systemd Service",{"path":1986,"title":1987},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis\u002Frunning-a-cli-on-a-schedule-with-cron-and-systemd","Running a Python CLI on a Schedule with cron and systemd",{"path":1989,"title":1990},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis\u002Fsending-cli-logs-to-journald-and-syslog","Sending Python CLI Logs to journald and syslog",{"path":1992,"title":1993},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Favoiding-shell-injection-in-python-clis","Avoiding Shell Injection in Python CLIs",{"path":1995,"title":1996},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Fcalling-external-commands-safely-with-subprocess","Calling External Commands Safely with subprocess",{"path":1998,"title":1999},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Fhandling-subprocess-timeouts-and-exit-codes","Handling Subprocess Timeouts and Exit Codes",{"path":2001,"title":2002},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis","Running Subprocesses from Python CLIs",{"path":2004,"title":2005},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Flaunching-the-users-editor-from-a-cli","Launching the User’s Editor from a Python CLI",{"path":2007,"title":2008},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Fpiping-between-subprocesses-in-python","Piping Between Subprocesses in Python Without a Shell",{"path":2010,"title":2011},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Fstreaming-subprocess-output-in-real-time","Streaming Subprocess Output in Real Time",{"path":2013,"title":2014},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Fwrapping-git-and-other-tools-from-a-python-cli","Wrapping git and Other Tools from a Python CLI",{"path":2016,"title":2017},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis","Secrets and Credentials in Python CLIs",{"path":2019,"title":2020},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Fprompting-for-passwords-securely","Prompting for Passwords Securely in Python CLIs",{"path":2022,"title":2023},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Freading-secrets-from-env-and-files","Reading Secrets from Env Vars and Files in CLIs",{"path":2025,"title":2026},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Fredacting-secrets-from-cli-output-and-logs","Redacting Secrets from CLI Output and Logs",{"path":2028,"title":2029},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Frefreshing-expired-tokens-automatically","Refreshing Expired Tokens Automatically in a Python CLI",{"path":2031,"title":2032},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Fstoring-tokens-with-keyring","Storing CLI Tokens Securely with keyring",{"path":2034,"title":2035},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Fsupporting-multiple-profiles-and-accounts","Supporting Multiple Profiles and Accounts in CLIs",{"path":2037,"title":2038},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Fchecking-pypi-for-a-newer-version","Checking PyPI for a Newer Version of Your Python CLI",{"path":2040,"title":2041},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis","Update Checks, Upgrade Commands and Telemetry for Python CLIs",{"path":2043,"title":2044},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Fopt-in-usage-telemetry-for-python-clis","Opt-In Usage Telemetry for Python CLIs Done Responsibly",{"path":2046,"title":2047},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Fself-upgrading-a-cli-installed-with-pipx-or-uv","Self-Upgrading a Python CLI Installed with pipx or uv",{"path":2049,"title":2050},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Fshowing-non-blocking-update-notices","Showing Non-Blocking Update Notices in a Python CLI",{"path":2052,"title":2053},"\u002F","Python CLI Toolcraft",{"path":2055,"title":2056},"\u002Fmodern-python-cli-frameworks-architecture\u002Falternative-python-cli-frameworks\u002Fbuilding-a-cli-with-cleo","Building a Python CLI with Cleo Command Classes",{"path":2058,"title":2059},"\u002Fmodern-python-cli-frameworks-architecture\u002Falternative-python-cli-frameworks\u002Fbuilding-a-cli-with-cyclopts","Building a Type-Hinted Python CLI with Cyclopts",{"path":2061,"title":2062},"\u002Fmodern-python-cli-frameworks-architecture\u002Falternative-python-cli-frameworks","Beyond Click and Typer: Alternative Python CLI Frameworks",{"path":2064,"title":2065},"\u002Fmodern-python-cli-frameworks-architecture\u002Falternative-python-cli-frameworks\u002Fquick-clis-from-functions-with-python-fire","Quick CLIs from Functions with Python Fire",{"path":2067,"title":2068},"\u002Fmodern-python-cli-frameworks-architecture\u002Falternative-python-cli-frameworks\u002Fusage-string-driven-clis-with-docopt-ng","Usage-String Driven Python CLIs with docopt-ng",{"path":2070,"title":2071},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Favoiding-import-time-side-effects","Avoiding Import-Time Side Effects in a Python CLI",{"path":2073,"title":2074},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Fcaching-expensive-work-between-cli-runs","Caching Expensive Work Between Python CLI Runs",{"path":2076,"title":2077},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Fguarding-startup-with-import-tests","Guarding CLI Startup with Import Tests",{"path":2079,"title":2080},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading","CLI Startup Performance and Lazy Loading",{"path":2082,"title":2083},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Flazy-loading-subcommands-for-faster-startup","Lazy Loading Subcommands for Faster Startup",{"path":2085,"title":2086},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Fprofiling-python-cli-startup-time","Profiling Python CLI Startup Time",{"path":2088,"title":2089},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Freducing-cli-dependency-weight","Reducing CLI Dependency Weight",{"path":2091,"title":2092},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fargparse-subparsers-for-subcommands","argparse Subparsers for Subcommands",{"path":2094,"title":2095},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fargparse-vs-click-vs-typer-comparison","argparse vs Click vs Typer Compared",{"path":2097,"title":2098},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fargument-groups-and-help-formatting-in-argparse","Argument Groups and Help Formatting in argparse",{"path":2100,"title":2101},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse","Command-Line Parsing with argparse",{"path":2103,"title":2104},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fmigrating-from-argparse-to-typer","Migrating from argparse to Typer",{"path":2106,"title":2107},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fmutually-exclusive-options-in-argparse","Mutually Exclusive Options in argparse",{"path":2109,"title":2110},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Freading-arguments-from-files-with-fromfile-prefix-chars","Reading Arguments from Files with argparse’s fromfile_prefix_chars",{"path":2112,"title":2113},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fwriting-custom-argparse-actions","Writing Custom argparse Actions in Python",{"path":2115,"title":2116},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions\u002Fadding-dry-run-and-confirmation-to-destructive-commands","Adding Dry-Run and Confirmation to Destructive Commands",{"path":2118,"title":2119},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions\u002Fdesigning-idempotent-commands","Designing Idempotent Commands in a Python CLI",{"path":2121,"title":2122},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions\u002Ffollowing-posix-and-gnu-argument-conventions","Following POSIX and GNU Argument Conventions in Python",{"path":2124,"title":2125},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions\u002Fglobal-options-vs-per-command-options","Global Options vs Per-Command Options in Python CLIs",{"path":2127,"title":2128},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions","Designing CLI Interfaces and Conventions in Python",{"path":2130,"title":2131},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions\u002Fnaming-commands-and-flags-consistently","Naming Commands and Flags Consistently in Python CLIs",{"path":2133,"title":2134},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions\u002Fpositional-arguments-vs-options","Positional Arguments vs Options: Designing a CLI Signature",{"path":2136,"title":2137},"\u002Fmodern-python-cli-frameworks-architecture","Python CLI Frameworks and Architecture",{"path":2139,"title":2140},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Fdiscovering-plugins-with-entry-points","Discovering Plugins with Entry Points in Python CLIs",{"path":2142,"title":2143},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Fhook-based-plugins-with-pluggy","Hook-Based Plugins for Python CLIs with pluggy",{"path":2145,"title":2146},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis","Plugin Architectures for Extensible CLIs",{"path":2148,"title":2149},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Fisolating-plugin-failures","Isolating Plugin Failures in an Extensible Python CLI",{"path":2151,"title":2152},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Ftesting-plugins-against-the-host-cli","Testing Plugins Against the Host CLI",{"path":2154,"title":2155},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Fversioning-a-plugin-api","Versioning a Plugin API for a Python CLI",{"path":2157,"title":2158},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Fwriting-a-plugin-for-an-existing-cli","Writing a Plugin for an Existing CLI",{"path":2160,"title":2161},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fbest-practices-for-python-cli-entry-points","Best practices for Python CLI entry points",{"path":2163,"title":2164},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fdependency-injection-patterns-for-cli-commands","Dependency Injection Patterns for CLI Commands",{"path":2166,"title":2167},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fhow-to-structure-a-large-python-cli-project","Structuring a Large Python CLI Project",{"path":2169,"title":2170},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis","Structuring Multi-Command Python CLIs",{"path":2172,"title":2173},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Foffering-a-python-api-alongside-your-cli","Offering a Python API Alongside Your CLI",{"path":2175,"title":2176},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fregistering-commands-from-modules-automatically","Registering CLI Commands from Modules Automatically",{"path":2178,"title":2179},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fsharing-common-options-across-commands","Sharing Common Options Across Python CLI Commands",{"path":2181,"title":2182},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fsharing-state-with-click-context-objects","Sharing State with Click Context Objects",{"path":2184,"title":2185},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Fend-to-end-testing-an-installed-cli","End-to-End Testing an Installed Python CLI",{"path":2187,"title":2188},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications","Testing Python CLI Applications",{"path":2190,"title":2191},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Fmeasuring-cli-test-coverage","Measuring CLI Test Coverage",{"path":2193,"title":2194},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Fmocking-filesystem-and-network-in-cli-tests","Mocking the Filesystem and Network in CLI Tests",{"path":2196,"title":2197},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Fproperty-based-testing-cli-arguments-with-hypothesis","Property-Based Testing CLI Arguments with Hypothesis",{"path":2199,"title":2200},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Fsnapshot-testing-cli-output","Snapshot Testing CLI Output",{"path":2202,"title":2203},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Ftesting-click-commands-with-clirunner","Testing Click Commands with CliRunner",{"path":2205,"title":2206},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Ftesting-commands-that-call-subprocesses","Testing Python CLI Commands That Call Subprocesses",{"path":2208,"title":2209},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Ftesting-interactive-prompts-and-stdin","Testing Interactive Prompts and stdin",{"path":2211,"title":2212},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Ftranscript-tests-for-cli-commands","Transcript Tests for Python CLI Commands",{"path":2214,"title":2215},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Fbuilding-a-cli-with-subcommands-in-click","Building a CLI with subcommands in Click",{"path":2217,"title":2218},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Fbuilding-dynamic-commands-in-click","Building Dynamic Commands in Click",{"path":2220,"title":2221},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Fchoices-and-enums-in-typer-and-click","Choices and Enums in Typer and Click Options",{"path":2223,"title":2224},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Fclick-option-callbacks-and-eager-options","Click Option Callbacks and Eager Options Explained",{"path":2226,"title":2227},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Fconverting-a-click-app-to-typer","Converting a Click App to Typer",{"path":2229,"title":2230},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each","Typer vs Click: When to Use Each",{"path":2232,"title":2233},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Frich-markup-and-help-panels-in-typer","Rich Markup and Help Panels in Typer",{"path":2235,"title":2236},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Ftyper-callback-functions-explained","Typer callback functions explained",{"path":2238,"title":2239},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Fusing-annotated-options-in-typer","Using Annotated Options in Typer",{"path":2241,"title":2242},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fautomating-releases-from-git-tags","Automating Python CLI Releases from Git Tags",{"path":2244,"title":2245},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fcaching-uv-dependencies-in-ci","Caching uv Dependencies in CI for Python CLIs",{"path":1625,"title":5},{"path":2248,"title":1573},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fpublishing-a-cli-docker-image-from-ci",{"path":2250,"title":2251},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fpublishing-to-pypi-with-trusted-publishing","Publishing a CLI to PyPI with Trusted Publishing",{"path":2253,"title":2254},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Frunning-cli-tests-on-windows-and-macos-runners","Running Python CLI Tests on Windows and macOS Runners",{"path":2256,"title":2257},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fsmoke-testing-the-built-wheel-in-ci","Smoke-Testing the Built Wheel of a Python CLI in CI",{"path":2259,"title":2260},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Ftesting-a-cli-across-python-versions-with-github-actions","Testing a CLI Across Python Versions in GitHub Actions",{"path":2262,"title":2263},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Fbuilding-a-cookiecutter-template-for-typer-clis","Building a Cookiecutter Template for Typer CLIs",{"path":2265,"title":2266},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Fcopier-vs-cookiecutter-for-cli-templates","Copier vs Cookiecutter for CLI Templates",{"path":2268,"title":2269},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter","CLI Project Scaffolding with Cookiecutter",{"path":2271,"title":2272},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Fpost-generation-hooks-in-cli-templates","Post-Generation Hooks in Python CLI Templates",{"path":2274,"title":2275},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Ftemplate-variables-and-conditional-files","Template Variables and Conditional Files in CLI Templates",{"path":2277,"title":2278},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Ftesting-a-project-template-with-pytest","Testing a CLI Project Template with pytest",{"path":2280,"title":2281},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Fupdating-generated-projects-with-copier-update","Updating Generated CLI Projects with copier update",{"path":2283,"title":2284},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fbuilding-cross-platform-release-binaries-in-ci","Building Cross-Platform Release Binaries in CI",{"path":2286,"title":2287},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fbundling-a-python-cli-with-pyinstaller","Bundling a Python CLI with PyInstaller",{"path":2289,"title":2290},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fcode-signing-and-notarizing-cli-binaries","Code Signing and Notarizing Python CLI Binaries",{"path":2292,"title":2293},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fhomebrew-and-scoop-packaging-for-python-clis","Homebrew and Scoop Packaging for Python CLIs",{"path":2295,"title":2296},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries","Distributing CLIs as Standalone Binaries",{"path":2298,"title":2299},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fnuitka-vs-pyinstaller-for-python-clis","Nuitka vs PyInstaller for Python CLI Binaries",{"path":2301,"title":2302},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Freducing-pyinstaller-binary-size","Reducing the Size of a PyInstaller CLI Binary",{"path":2304,"title":2305},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fshipping-a-cli-as-a-zipapp-with-shiv","Shipping a CLI as a Zipapp with shiv",{"path":2307,"title":1545},"\u002Fproject-setup-dependency-management",{"path":2309,"title":2310},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code\u002Fconfiguring-ruff-for-a-cli-project","Configuring Ruff for a Python CLI Project",{"path":2312,"title":2313},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code\u002Fenforcing-import-boundaries-in-a-cli-codebase","Enforcing Import Boundaries in a Python CLI Codebase",{"path":2315,"title":2316},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code\u002Ffinding-unused-code-and-dependencies-with-vulture-and-deptry","Finding Unused Code and Dependencies with vulture and deptry",{"path":2318,"title":2319},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code","Linting and Type-Checking Python CLI Code",{"path":2321,"title":2322},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code\u002Frunning-pyright-in-strict-mode-on-a-cli","Running Pyright in Strict Mode on a Python CLI",{"path":2324,"title":2325},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code\u002Frunning-ruff-and-mypy-in-ci-with-annotations","Running Ruff and mypy in CI with Inline Annotations",{"path":2327,"title":2328},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code\u002Ftype-checking-click-and-typer-code-with-mypy","Type-Checking Click and Typer Code with mypy",{"path":2330,"title":2331},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fautomating-changelogs-with-conventional-commits","Automating Changelogs with Conventional Commits",{"path":2333,"title":2334},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fbumping-versions-consistently-across-a-cli-project","Bumping Versions Consistently Across a Python CLI Project",{"path":2336,"title":2337},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fderiving-versions-from-git-tags-with-hatch-vcs","Deriving CLI Versions from Git Tags with hatch-vcs",{"path":2339,"title":2340},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fexposing-version-info-and-build-metadata","Exposing Version Info and Build Metadata",{"path":2342,"title":2343},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs","Managing CLI Versioning & Changelogs",{"path":2345,"title":2346},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fsemantic-versioning-policy-for-cli-tools","A Semantic Versioning Policy for CLI Tools",{"path":2348,"title":2349},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fshipping-pre-releases-and-release-candidates","Shipping Pre-Releases and Release Candidates of a Python CLI",{"path":2351,"title":2352},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fbuilding-wheels-and-sdists-for-python-clis","Building Wheels and sdists for Python CLIs",{"path":2354,"title":2355},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fbundling-data-files-with-importlib-resources","Bundling Data Files with importlib.resources in CLIs",{"path":2357,"title":2358},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fchoosing-a-build-backend-for-a-python-cli","Choosing a Build Backend for a Python CLI",{"path":2360,"title":2361},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution","Packaging Python CLIs for Distribution",{"path":2363,"title":2364},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Finstalling-and-distributing-clis-with-pipx","Installing and Distributing CLIs with pipx",{"path":2366,"title":2367},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Foptional-dependencies-and-extras-for-clis","Optional Dependencies and Extras for Python CLIs",{"path":2369,"title":2370},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fpublishing-a-python-cli-to-pypi","Publishing a Python CLI to PyPI",{"path":2372,"title":2373},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fwriting-pyproject-toml-metadata-for-a-cli","Writing pyproject.toml Metadata for a Python CLI",{"path":2375,"title":2376},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fdynamic-versioning-with-poetry-plugins","Dynamic Versioning for a Poetry CLI from Git Tags",{"path":2378,"title":2379},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development","Poetry Workflows for CLI Development",{"path":2381,"title":2382},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fmanaging-poetry-lock-files-for-cli-tools","Managing Poetry Lock Files for CLI Tools",{"path":2384,"title":2385},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fmigrating-a-cli-from-poetry-to-uv","Migrating a Python CLI from Poetry to uv",{"path":2387,"title":2388},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fpoetry-dependency-groups-for-cli-tooling","Poetry Dependency Groups for CLI Tooling",{"path":2390,"title":2391},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fpoetry-entry-points-and-scripts-for-clis","Poetry Entry Points and Scripts for CLIs",{"path":2393,"title":2394},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fpublishing-a-cli-with-poetry","Building and Publishing a Python CLI with Poetry",{"path":2396,"title":2397},"\u002Fproject-setup-dependency-management\u002Fpre-commit-hooks-for-cli-projects","Pre-commit Hooks for CLI Projects",{"path":2399,"title":2400},"\u002Fproject-setup-dependency-management\u002Fpre-commit-hooks-for-cli-projects\u002Fkeeping-hook-versions-current-with-autoupdate","Keeping pre-commit Hook Versions Current with autoupdate",{"path":2402,"title":2403},"\u002Fproject-setup-dependency-management\u002Fpre-commit-hooks-for-cli-projects\u002Frunning-pre-commit-in-ci","Running pre-commit in CI for a Python CLI Repository",{"path":2405,"title":2406},"\u002Fproject-setup-dependency-management\u002Fpre-commit-hooks-for-cli-projects\u002Fsetting-up-pre-commit-for-python-cli-repos","Setting up pre-commit for Python CLI repos",{"path":2408,"title":2409},"\u002Fproject-setup-dependency-management\u002Fpre-commit-hooks-for-cli-projects\u002Fshipping-your-cli-as-a-pre-commit-hook","Shipping Your Python CLI as a pre-commit Hook",{"path":2411,"title":2412},"\u002Fproject-setup-dependency-management\u002Fpre-commit-hooks-for-cli-projects\u002Fspeeding-up-slow-pre-commit-hooks","Speeding Up Slow pre-commit Hooks in a CLI Repository",{"path":2414,"title":2415},"\u002Fproject-setup-dependency-management\u002Fpre-commit-hooks-for-cli-projects\u002Fwriting-local-pre-commit-hooks-in-python","Writing Local pre-commit Hooks in Python",{"path":2417,"title":2418},"\u002Fproject-setup-dependency-management\u002Fsecuring-a-python-cli-supply-chain\u002Fauditing-dependencies-with-pip-audit","Auditing a Python CLI’s Dependencies with pip-audit",{"path":2420,"title":2421},"\u002Fproject-setup-dependency-management\u002Fsecuring-a-python-cli-supply-chain\u002Fgenerating-an-sbom-for-a-python-cli","Generating an SBOM for a Python CLI Release",{"path":2423,"title":2424},"\u002Fproject-setup-dependency-management\u002Fsecuring-a-python-cli-supply-chain","Securing the Supply Chain of a Python CLI",{"path":2426,"title":2427},"\u002Fproject-setup-dependency-management\u002Fsecuring-a-python-cli-supply-chain\u002Fpinning-dependencies-with-hashes","Pinning a Python CLI’s Dependencies with Hashes",{"path":2429,"title":2430},"\u002Fproject-setup-dependency-management\u002Fsecuring-a-python-cli-supply-chain\u002Fpublishing-attestations-and-verifying-releases","Publishing Attestations and Verifying Python CLI Releases",{"path":2432,"title":2433},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management\u002Fbuilding-and-publishing-a-cli-with-uv","Building and Publishing a Python CLI with uv",{"path":2435,"title":2436},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management","uv for Python CLI Dependency Management",{"path":2438,"title":2439},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management\u002Flocking-and-syncing-cli-dependencies-with-uv","Locking and Syncing a Python CLI’s Dependencies with uv",{"path":2441,"title":2442},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management\u002Frunning-one-off-cli-scripts-with-uv-run","Running One-Off CLI Scripts with uv run and PEP 723",{"path":2444,"title":2445},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management\u002Fusing-private-package-indexes-with-uv","Using Private Package Indexes with uv for Internal CLIs",{"path":2447,"title":2448},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management\u002Fuv-init-vs-poetry-init-for-cli-tools","uv init vs poetry init for CLI tools",{"path":2450,"title":2451},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management\u002Fuv-tool-install-vs-pipx-for-clis","uv tool install vs pipx for CLIs",{"path":2453,"title":2454},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management\u002Fuv-workspaces-for-multi-package-clis","uv Workspaces for Multi-Package Python CLIs",{"path":2456,"title":2457},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fdebugging-wrong-python-and-wrong-venv-problems","Debugging Wrong-Python and Wrong-Venv Problems in CLIs",{"path":2459,"title":2460},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fexternally-managed-environments-and-pep-668","PEP 668 and Python CLIs: the externally-managed-environment Error",{"path":2462,"title":2463},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices","Python CLI Env Isolation Best Practices",{"path":2465,"title":2466},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fisolating-cli-tools-from-project-dependencies","Isolating CLI Tools from Your Project’s Dependencies",{"path":2468,"title":2469},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fmanaging-virtual-environments-for-cross-platform-clis","Managing Python CLI Virtual Environments",{"path":2471,"title":2472},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fpinning-the-python-version-for-a-cli","Pinning the Python Version for a CLI",{"path":2474,"title":2475},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fsupporting-multiple-python-versions-with-nox","Supporting Multiple Python Versions with nox",1790967542140]