[{"data":1,"prerenderedAt":2115},["ShallowReactive",2],{"page-\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002F":3,"content-directory":1271},{"id":4,"title":5,"body":6,"date":1255,"description":1256,"difficulty":1257,"draft":1258,"extension":1259,"meta":1260,"navigation":234,"path":1261,"seo":1262,"stem":1263,"tags":1264,"updated":1255,"__hash__":1270},"content\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Findex.md","Update Checks, Upgrade Commands and Telemetry for Python CLIs",{"type":7,"value":8,"toc":1233},"minimark",[9,18,32,36,41,90,94,97,100,133,146,150,165,176,179,182,186,201,373,392,408,412,415,418,429,435,441,444,448,451,529,551,554,865,878,882,885,893,908,923,927,934,937,965,969,972,975,1007,1011,1014,1057,1060,1064,1106,1110,1129,1133,1138,1141,1145,1152,1156,1159,1163,1166,1170,1187,1191,1229],[10,11,12,13,17],"p",{},"A CLI installed on a laptop tends to stay at whatever version was installed. Nobody runs ",[14,15,16],"code",{},"pipx upgrade-all"," on a schedule, internal tools are rarely re-installed until something breaks, and the bug you fixed three releases ago keeps generating support messages from people still on the old version. Browsers, editors and package managers solved this long ago by checking for updates and saying so. A Python CLI can do the same — but a careless update check is one of the fastest ways to make a tool feel slow, flaky or intrusive: an HTTP request on every run, a hang on an aeroplane, a notice in the middle of JSON output, or a self-upgrade that breaks the user's pipx environment.",[10,19,20,21,26,27,31],{},"This topic covers doing it well. It sits in the ",[22,23,25],"a",{"href":24},"\u002Fcli-runtime-systems-integration\u002F","CLI Runtime & Systems Integration"," section because every part of it is a runtime concern: network calls with tight time budgets, caching state between runs, detecting how the tool was installed, and deciding what may be sent over the network at all. It also touches packaging — what \"the latest version\" means depends on how you publish, covered in ",[22,28,30],{"href":29},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fpublishing-a-python-cli-to-pypi\u002F","publishing a Python CLI to PyPI",".",[33,34],"inline-diagram",{"name":35},"upd-topic-map",[37,38,40],"h2",{"id":39},"tldr","TL;DR",[42,43,44,52,58,64,74,84],"ul",{},[45,46,47,51],"li",{},[48,49,50],"strong",{},"Check at most once a day, cache the answer,"," and never let a check add noticeable time to a command. A two-second network timeout on every run is a bug.",[45,53,54,57],{},[48,55,56],{},"Show the notice on stderr, after the command's output,"," and only when stderr is an interactive terminal. Never in CI, never in a pipe, never in JSON mode.",[45,59,60,63],{},[48,61,62],{},"Make it easy to turn off"," with an environment variable and a config setting, and turn it off automatically where it makes no sense.",[45,65,66,73],{},[48,67,68,69,72],{},"Compare versions with ",[14,70,71],{},"packaging.version",","," skip pre-releases unless the user runs one, and respect yanked releases.",[45,75,76,79,80,83],{},[48,77,78],{},"Upgrade through the installer that installed you."," Detect pipx, uv, Homebrew or a plain virtual environment and run — or print — the right command. Never ",[14,81,82],{},"pip install"," into an environment you do not own.",[45,85,86,89],{},[48,87,88],{},"Telemetry is opt-in,"," minimal, documented and inspectable. If you cannot explain exactly what is sent, do not send it.",[37,91,93],{"id":92},"what-an-update-check-involves","What an update check involves",[10,95,96],{},"An update check looks like a single HTTP request, but a robust one has five moving parts, and each one has a failure mode that users notice.",[33,98],{"name":99},"upd-check-lifecycle",[101,102,103,109,115,121,127],"ol",{},[45,104,105,108],{},[48,106,107],{},"Should we check at all?"," Not in CI, not when output is piped, not when the user disabled it, not if we checked recently. Most runs should stop here, having done nothing but read a small cache file.",[45,110,111,114],{},[48,112,113],{},"Fetch the latest version"," from PyPI's JSON API, a GitHub releases endpoint or your own server — with a short timeout and no retries.",[45,116,117,120],{},[48,118,119],{},"Compare"," it with the installed version using real version semantics.",[45,122,123,126],{},[48,124,125],{},"Record"," the result and the time in a cache file in the user's state directory, so the next run can skip the network entirely.",[45,128,129,132],{},[48,130,131],{},"Tell the user"," — once, briefly, on stderr, after the command has done its job.",[10,134,135,136,140,141,145],{},"The ordering matters. Steps 1 and 5 run on every invocation and must be essentially free. Steps 2–4 run rarely and must never block the user's command. ",[22,137,139],{"href":138},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Fchecking-pypi-for-a-newer-version\u002F","Checking PyPI for a newer version"," implements the fetch and comparison; ",[22,142,144],{"href":143},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Fshowing-non-blocking-update-notices\u002F","showing non-blocking update notices"," handles the caching, threading and display.",[37,147,149],{"id":148},"where-version-information-comes-from","Where version information comes from",[10,151,152,153,156,157,160,161,164],{},"For a package published on PyPI, the authoritative source is the JSON API at ",[14,154,155],{},"https:\u002F\u002Fpypi.org\u002Fpypi\u002F\u003Cname>\u002Fjson",". It returns the latest stable version in ",[14,158,159],{},"info.version"," and every release in ",[14,162,163],{},"releases",", including which files are yanked. It needs no authentication, is served from a CDN, and is fast — but it is still a network call to a third party, and corporate networks sometimes block it or route it through a slow proxy.",[10,166,167,168,171,172,175],{},"Alternatives exist for tools that are not on PyPI. Internal tools published to a private index can query that index's JSON or Simple API. Tools distributed as binaries usually check GitHub's ",[14,169,170],{},"releases\u002Flatest"," endpoint, which is rate-limited for unauthenticated calls — another reason to cache. And tools with their own backend can expose a tiny ",[14,173,174],{},"\u002Fcli\u002Flatest"," endpoint that also returns a minimum supported version and a message, which lets you tell users \"this version can no longer talk to the server; please upgrade\".",[33,177],{"name":178},"upd-sources",[10,180,181],{},"Whichever source you use, keep the client code tolerant: any error — DNS failure, timeout, 500, unexpected JSON — means \"no information\", never an exception that reaches the user.",[37,183,185],{"id":184},"comparing-versions-correctly","Comparing versions correctly",[10,187,188,189,192,193,196,197,200],{},"String comparison gets versions wrong (",[14,190,191],{},"\"1.10.0\" \u003C \"1.9.0\""," is ",[14,194,195],{},"True","), and splitting on dots fails on pre-releases and post-releases. Use ",[14,198,199],{},"packaging.version.Version",", which implements the PEP 440 ordering that pip uses:",[202,203,208],"pre",{"className":204,"code":205,"language":206,"meta":207,"style":207},"language-python shiki shiki-themes github-light github-dark","from packaging.version import InvalidVersion, Version\n\n\ndef is_newer(latest: str, current: str, *, allow_prerelease: bool = False) -> bool:\n    try:\n        new, cur = Version(latest), Version(current)\n    except InvalidVersion:\n        return False\n    if new.is_prerelease and not (allow_prerelease or cur.is_prerelease):\n        return False\n    return new > cur\n","python","",[14,209,210,229,236,241,289,297,309,318,327,351,358],{"__ignoreMap":207},[211,212,215,219,223,226],"span",{"class":213,"line":214},"line",1,[211,216,218],{"class":217},"szBVR","from",[211,220,222],{"class":221},"sVt8B"," packaging.version ",[211,224,225],{"class":217},"import",[211,227,228],{"class":221}," InvalidVersion, Version\n",[211,230,232],{"class":213,"line":231},2,[211,233,235],{"emptyLinePlaceholder":234},true,"\n",[211,237,239],{"class":213,"line":238},3,[211,240,235],{"emptyLinePlaceholder":234},[211,242,244,247,251,254,258,261,263,266,269,272,275,278,281,284,286],{"class":213,"line":243},4,[211,245,246],{"class":217},"def",[211,248,250],{"class":249},"sScJk"," is_newer",[211,252,253],{"class":221},"(latest: ",[211,255,257],{"class":256},"sj4cs","str",[211,259,260],{"class":221},", current: ",[211,262,257],{"class":256},[211,264,265],{"class":221},", ",[211,267,268],{"class":217},"*",[211,270,271],{"class":221},", allow_prerelease: ",[211,273,274],{"class":256},"bool",[211,276,277],{"class":217}," =",[211,279,280],{"class":256}," False",[211,282,283],{"class":221},") -> ",[211,285,274],{"class":256},[211,287,288],{"class":221},":\n",[211,290,292,295],{"class":213,"line":291},5,[211,293,294],{"class":217},"    try",[211,296,288],{"class":221},[211,298,300,303,306],{"class":213,"line":299},6,[211,301,302],{"class":221},"        new, cur ",[211,304,305],{"class":217},"=",[211,307,308],{"class":221}," Version(latest), Version(current)\n",[211,310,312,315],{"class":213,"line":311},7,[211,313,314],{"class":217},"    except",[211,316,317],{"class":221}," InvalidVersion:\n",[211,319,321,324],{"class":213,"line":320},8,[211,322,323],{"class":217},"        return",[211,325,326],{"class":256}," False\n",[211,328,330,333,336,339,342,345,348],{"class":213,"line":329},9,[211,331,332],{"class":217},"    if",[211,334,335],{"class":221}," new.is_prerelease ",[211,337,338],{"class":217},"and",[211,340,341],{"class":217}," not",[211,343,344],{"class":221}," (allow_prerelease ",[211,346,347],{"class":217},"or",[211,349,350],{"class":221}," cur.is_prerelease):\n",[211,352,354,356],{"class":213,"line":353},10,[211,355,323],{"class":217},[211,357,326],{"class":256},[211,359,361,364,367,370],{"class":213,"line":360},11,[211,362,363],{"class":217},"    return",[211,365,366],{"class":221}," new ",[211,368,369],{"class":217},">",[211,371,372],{"class":221}," cur\n",[10,374,375,376,379,380,383,384,387,388,31],{},"Two policies are worth deciding explicitly. ",[48,377,378],{},"Pre-releases:"," users on a stable version should not be told about ",[14,381,382],{},"2.0.0rc1","; users already running a pre-release usually want to hear about the next one. ",[48,385,386],{},"Major versions:"," some tools tell users about a new major version differently — \"2.0 is available with breaking changes; see the changelog\" — because upgrading is a decision rather than a chore. That ties into how you version the CLI in the first place, covered in ",[22,389,391],{"href":390},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fsemantic-versioning-policy-for-cli-tools\u002F","semantic versioning policy for CLI tools",[10,393,394,395,398,399,403,404,407],{},"The installed version should come from package metadata, ",[14,396,397],{},"importlib.metadata.version(\"mytool\")",", so it always matches what is actually installed; ",[22,400,402],{"href":401},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fexposing-version-info-and-build-metadata\u002F","exposing version info and build metadata"," explains why a hard-coded ",[14,405,406],{},"__version__"," drifts.",[37,409,411],{"id":410},"never-slow-down-the-command","Never slow down the command",[10,413,414],{},"The cardinal rule is that an update check may never make a command noticeably slower or less reliable. There are three techniques, and good implementations combine them.",[33,416],{"name":417},"upd-timing",[10,419,420,423,424,428],{},[48,421,422],{},"Cache with a long interval."," Store the last check time and result in a JSON file in the state directory from ",[22,425,427],{"href":426},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fstoring-app-data-with-platformdirs\u002F","storing app data with platformdirs",". With a 24-hour interval, 99% of runs read a tiny file and do nothing else.",[10,430,431,434],{},[48,432,433],{},"Check in the background."," When a check is due, start it in a daemon thread at the beginning of the command and collect the result at the end, waiting at most a fraction of a second. If the network is slow, the result simply arrives on a later run, because the thread writes the cache when it finishes. A forked background process is an alternative that survives the command exiting, at the cost of more moving parts.",[10,436,437,440],{},[48,438,439],{},"Use a tight timeout."," Even in the background, cap the request at one or two seconds and do not retry. A check that cannot complete quickly is not worth completing.",[10,442,443],{},"What you must not do is check synchronously before the command runs. Users on slow or offline networks will experience it as \"the tool hangs for two seconds every time\", and they will be right.",[37,445,447],{"id":446},"the-cache-file","The cache file",[10,449,450],{},"The cache is what turns an update check from \"a network call per run\" into \"a file read per day\", so its format deserves a moment of design. Keep it small, versioned and self-describing:",[202,452,456],{"className":453,"code":454,"language":455,"meta":207,"style":207},"language-json shiki shiki-themes github-light github-dark","{\n  \"schema\": 1,\n  \"checked_at\": \"2026-10-02T09:14:03+00:00\",\n  \"current\": \"1.4.2\",\n  \"latest\": \"1.6.0\",\n  \"notified_at\": \"2026-10-02T09:14:05+00:00\"\n}\n","json",[14,457,458,463,477,490,502,514,524],{"__ignoreMap":207},[211,459,460],{"class":213,"line":214},[211,461,462],{"class":221},"{\n",[211,464,465,468,471,474],{"class":213,"line":231},[211,466,467],{"class":256},"  \"schema\"",[211,469,470],{"class":221},": ",[211,472,473],{"class":256},"1",[211,475,476],{"class":221},",\n",[211,478,479,482,484,488],{"class":213,"line":238},[211,480,481],{"class":256},"  \"checked_at\"",[211,483,470],{"class":221},[211,485,487],{"class":486},"sZZnC","\"2026-10-02T09:14:03+00:00\"",[211,489,476],{"class":221},[211,491,492,495,497,500],{"class":213,"line":243},[211,493,494],{"class":256},"  \"current\"",[211,496,470],{"class":221},[211,498,499],{"class":486},"\"1.4.2\"",[211,501,476],{"class":221},[211,503,504,507,509,512],{"class":213,"line":291},[211,505,506],{"class":256},"  \"latest\"",[211,508,470],{"class":221},[211,510,511],{"class":486},"\"1.6.0\"",[211,513,476],{"class":221},[211,515,516,519,521],{"class":213,"line":299},[211,517,518],{"class":256},"  \"notified_at\"",[211,520,470],{"class":221},[211,522,523],{"class":486},"\"2026-10-02T09:14:05+00:00\"\n",[211,525,526],{"class":213,"line":311},[211,527,528],{"class":221},"}\n",[10,530,531,534,535,538,539,542,543,546,547,550],{},[14,532,533],{},"checked_at"," decides whether a new check is due. Storing ",[14,536,537],{},"current"," alongside ",[14,540,541],{},"latest"," means that after the user upgrades, the stale \"1.6.0 is available\" result is ignored automatically, because the installed version no longer matches. ",[14,544,545],{},"notified_at"," rate-limits the notice separately from the check, so a user who runs fifty commands a day sees it once. The ",[14,548,549],{},"schema"," field lets a later release change the format without crashing on an old file — if the schema is unknown, ignore the file and start over.",[10,552,553],{},"Read the file defensively and write it atomically:",[202,555,557],{"className":204,"code":556,"language":206,"meta":207,"style":207},"import json\nfrom datetime import datetime, timezone\nfrom pathlib import Path\n\n\ndef load_cache(path: Path) -> dict:\n    try:\n        data = json.loads(path.read_text(encoding=\"utf-8\"))\n    except (OSError, ValueError):\n        return {}\n    return data if isinstance(data, dict) and data.get(\"schema\") == 1 else {}\n\n\ndef is_due(cache: dict, current: str, *, now: datetime, hours: float = 24) -> bool:\n    if cache.get(\"current\") != current:\n        return True                              # upgraded or downgraded since last check\n    try:\n        last = datetime.fromisoformat(cache[\"checked_at\"])\n    except (KeyError, TypeError, ValueError):\n        return True\n    return (now - last).total_seconds() >= hours * 3600\n",[14,558,559,566,578,590,594,598,613,619,641,659,666,708,713,718,756,775,787,794,811,832,840],{"__ignoreMap":207},[211,560,561,563],{"class":213,"line":214},[211,562,225],{"class":217},[211,564,565],{"class":221}," json\n",[211,567,568,570,573,575],{"class":213,"line":231},[211,569,218],{"class":217},[211,571,572],{"class":221}," datetime ",[211,574,225],{"class":217},[211,576,577],{"class":221}," datetime, timezone\n",[211,579,580,582,585,587],{"class":213,"line":238},[211,581,218],{"class":217},[211,583,584],{"class":221}," pathlib ",[211,586,225],{"class":217},[211,588,589],{"class":221}," Path\n",[211,591,592],{"class":213,"line":243},[211,593,235],{"emptyLinePlaceholder":234},[211,595,596],{"class":213,"line":291},[211,597,235],{"emptyLinePlaceholder":234},[211,599,600,602,605,608,611],{"class":213,"line":299},[211,601,246],{"class":217},[211,603,604],{"class":249}," load_cache",[211,606,607],{"class":221},"(path: Path) -> ",[211,609,610],{"class":256},"dict",[211,612,288],{"class":221},[211,614,615,617],{"class":213,"line":311},[211,616,294],{"class":217},[211,618,288],{"class":221},[211,620,621,624,626,629,633,635,638],{"class":213,"line":320},[211,622,623],{"class":221},"        data ",[211,625,305],{"class":217},[211,627,628],{"class":221}," json.loads(path.read_text(",[211,630,632],{"class":631},"s4XuR","encoding",[211,634,305],{"class":217},[211,636,637],{"class":486},"\"utf-8\"",[211,639,640],{"class":221},"))\n",[211,642,643,645,648,651,653,656],{"class":213,"line":329},[211,644,314],{"class":217},[211,646,647],{"class":221}," (",[211,649,650],{"class":256},"OSError",[211,652,265],{"class":221},[211,654,655],{"class":256},"ValueError",[211,657,658],{"class":221},"):\n",[211,660,661,663],{"class":213,"line":353},[211,662,323],{"class":217},[211,664,665],{"class":221}," {}\n",[211,667,668,670,673,676,679,682,684,687,689,692,695,697,700,703,706],{"class":213,"line":360},[211,669,363],{"class":217},[211,671,672],{"class":221}," data ",[211,674,675],{"class":217},"if",[211,677,678],{"class":256}," isinstance",[211,680,681],{"class":221},"(data, ",[211,683,610],{"class":256},[211,685,686],{"class":221},") ",[211,688,338],{"class":217},[211,690,691],{"class":221}," data.get(",[211,693,694],{"class":486},"\"schema\"",[211,696,686],{"class":221},[211,698,699],{"class":217},"==",[211,701,702],{"class":256}," 1",[211,704,705],{"class":217}," else",[211,707,665],{"class":221},[211,709,711],{"class":213,"line":710},12,[211,712,235],{"emptyLinePlaceholder":234},[211,714,716],{"class":213,"line":715},13,[211,717,235],{"emptyLinePlaceholder":234},[211,719,721,723,726,729,731,733,735,737,739,742,745,747,750,752,754],{"class":213,"line":720},14,[211,722,246],{"class":217},[211,724,725],{"class":249}," is_due",[211,727,728],{"class":221},"(cache: ",[211,730,610],{"class":256},[211,732,260],{"class":221},[211,734,257],{"class":256},[211,736,265],{"class":221},[211,738,268],{"class":217},[211,740,741],{"class":221},", now: datetime, hours: ",[211,743,744],{"class":256},"float",[211,746,277],{"class":217},[211,748,749],{"class":256}," 24",[211,751,283],{"class":221},[211,753,274],{"class":256},[211,755,288],{"class":221},[211,757,759,761,764,767,769,772],{"class":213,"line":758},15,[211,760,332],{"class":217},[211,762,763],{"class":221}," cache.get(",[211,765,766],{"class":486},"\"current\"",[211,768,686],{"class":221},[211,770,771],{"class":217},"!=",[211,773,774],{"class":221}," current:\n",[211,776,778,780,783],{"class":213,"line":777},16,[211,779,323],{"class":217},[211,781,782],{"class":256}," True",[211,784,786],{"class":785},"sJ8bj","                              # upgraded or downgraded since last check\n",[211,788,790,792],{"class":213,"line":789},17,[211,791,294],{"class":217},[211,793,288],{"class":221},[211,795,797,800,802,805,808],{"class":213,"line":796},18,[211,798,799],{"class":221},"        last ",[211,801,305],{"class":217},[211,803,804],{"class":221}," datetime.fromisoformat(cache[",[211,806,807],{"class":486},"\"checked_at\"",[211,809,810],{"class":221},"])\n",[211,812,814,816,818,821,823,826,828,830],{"class":213,"line":813},19,[211,815,314],{"class":217},[211,817,647],{"class":221},[211,819,820],{"class":256},"KeyError",[211,822,265],{"class":221},[211,824,825],{"class":256},"TypeError",[211,827,265],{"class":221},[211,829,655],{"class":256},[211,831,658],{"class":221},[211,833,835,837],{"class":213,"line":834},20,[211,836,323],{"class":217},[211,838,839],{"class":256}," True\n",[211,841,843,845,848,851,854,857,860,862],{"class":213,"line":842},21,[211,844,363],{"class":217},[211,846,847],{"class":221}," (now ",[211,849,850],{"class":217},"-",[211,852,853],{"class":221}," last).total_seconds() ",[211,855,856],{"class":217},">=",[211,858,859],{"class":221}," hours ",[211,861,268],{"class":217},[211,863,864],{"class":256}," 3600\n",[10,866,867,868,872,873,877],{},"A corrupt or unreadable cache must never break the command — it simply means a check is due. Two concurrent runs racing to write the file are harmless if each write is atomic, as in ",[22,869,871],{"href":870},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fwriting-files-atomically-in-python-clis\u002F","writing files atomically in Python CLIs","; the worst case is one extra check. Put the file in the ",[874,875,876],"em",{},"state"," directory rather than the cache directory if you want the \"already notified\" marker to survive cache cleaners, and in the cache directory if you would rather it be disposable.",[37,879,881],{"id":880},"showing-the-notice","Showing the notice",[10,883,884],{},"A good notice is short, actionable and in the right place:",[202,886,891],{"className":887,"code":889,"language":890,"meta":207},[888],"language-text","A new version of mytool is available: 1.4.2 → 1.6.0\nUpgrade with: pipx upgrade mytool\n","text",[14,892,889],{"__ignoreMap":207},[10,894,895,896,265,899,902,903,907],{},"Print it to ",[48,897,898],{},"stderr",[48,900,901],{},"after"," the command's own output, and only when stderr is a terminal — the same detection described in ",[22,904,906],{"href":905},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Fdetecting-ci-environments-and-non-interactive-shells\u002F","detecting CI environments and non-interactive shells",". Show the upgrade command that matches how the tool was installed, which is why install-method detection matters even if you never upgrade automatically. And show it at most once per day, not on every run until the user upgrades; a notice that appears every time becomes noise that users learn to resent.",[10,909,910,911,914,915,918,919,922],{},"Respect the conventional switches. Many tools honour a tool-specific variable (",[14,912,913],{},"MYTOOL_NO_UPDATE_CHECK=1","), and some also honour a generic one such as ",[14,916,917],{},"NO_UPDATE_NOTIFIER",". Add a config key for people who want it off permanently. Disable the check automatically when ",[14,920,921],{},"CI"," is set, when running under a test runner, and in any machine-readable output mode.",[37,924,926],{"id":925},"upgrade-commands","Upgrade commands",[10,928,929,930,933],{},"Telling users how to upgrade is good; offering ",[14,931,932],{},"mytool self-update"," is better — if, and only if, it uses the right installer. A Python CLI might be installed in at least six ways, and each has its own correct upgrade path:",[33,935],{"name":936},"upd-install-methods",[10,938,939,940,943,944,947,948,951,952,955,956,959,960,964],{},"Running ",[14,941,942],{},"pip install --upgrade mytool"," from inside the tool is wrong for almost all of them: it writes into a pipx- or uv-managed environment behind the manager's back, it fails in a Homebrew Cellar, and in a project virtual environment it changes a dependency that a lock file is supposed to control. The safe design detects the installer — pipx leaves ",[14,945,946],{},"pipx_metadata.json"," in its environment, ",[14,949,950],{},"uv tool"," leaves ",[14,953,954],{},"uv-receipt.toml",", Homebrew installs under its Cellar, a PyInstaller binary has ",[14,957,958],{},"sys.frozen"," set — and then either runs that installer's upgrade command or prints it when the method is unknown. ",[22,961,963],{"href":962},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Fself-upgrading-a-cli-installed-with-pipx-or-uv\u002F","Self-upgrading a CLI installed with pipx or uv"," implements this detection and the command.",[37,966,968],{"id":967},"telemetry-carefully","Telemetry, carefully",[10,970,971],{},"Once a tool phones home for version information, it is tempting to send a little more: which commands are used, how long they take, which errors occur. That data is genuinely useful for deciding what to fix and what to deprecate. It is also the fastest way to lose trust, especially in a tool that runs in CI with access to source code and credentials.",[33,973],{"name":974},"upd-telemetry-principles",[10,976,977,978,981,982,985,986,989,990,993,994,997,998,1001,1002,1006],{},"The responsible baseline is: ",[48,979,980],{},"off by default",", enabled by an explicit command or config setting; ",[48,983,984],{},"minimal"," — command name, tool version, Python version, OS family, duration and an error class, but never arguments, paths, environment variables or hostnames; ",[48,987,988],{},"documented"," — a page listing every field; ",[48,991,992],{},"inspectable"," — a debug mode that prints the payload instead of sending it; ",[48,995,996],{},"disabled in CI"," unless explicitly enabled there; and ",[48,999,1000],{},"anonymous",", with a random installation ID the user can reset. ",[22,1003,1005],{"href":1004},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Fopt-in-usage-telemetry-for-python-clis\u002F","Opt-in usage telemetry for Python CLIs"," builds a client that follows these rules and sends events without delaying the command.",[37,1008,1010],{"id":1009},"testing-update-logic","Testing update logic",[10,1012,1013],{},"Update checks are easy to get wrong in ways that unit tests catch easily, provided you design for it:",[42,1015,1016,1030,1041,1051],{},[45,1017,1018,1021,1022,1025,1026,1029],{},[48,1019,1020],{},"Inject the clock and the fetcher."," A function that takes ",[14,1023,1024],{},"now"," and a ",[14,1027,1028],{},"fetch_latest"," callable can be tested for \"due\", \"not due\" and \"network failed\" without patching anything global.",[45,1031,1032,1035,1036,1040],{},[48,1033,1034],{},"Mock HTTP at the transport."," With httpx, ",[22,1037,1039],{"href":1038},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Fmocking-http-in-cli-tests-with-respx\u002F","respx"," returns canned PyPI responses, timeouts and errors. Assert that every failure is silent.",[45,1042,1043,1046,1047,1050],{},[48,1044,1045],{},"Isolate the cache directory"," with ",[14,1048,1049],{},"tmp_path"," and an environment variable that overrides the state location.",[45,1052,1053,1056],{},[48,1054,1055],{},"Assert on streams."," The notice must appear on stderr only, and never when stderr is not a TTY or when JSON output is requested.",[10,1058,1059],{},"One end-to-end test that runs the real command with the check enabled and the network blocked is a good guard: it should complete exactly as fast as with the check disabled.",[37,1061,1063],{"id":1062},"common-pitfalls","Common pitfalls",[42,1065,1066,1072,1078,1084,1094,1100],{},[45,1067,1068,1071],{},[48,1069,1070],{},"Checking synchronously."," The single most common mistake, and the one users complain about most.",[45,1073,1074,1077],{},[48,1075,1076],{},"Notices in machine output."," An update message on stdout breaks every script that parses JSON or CSV from the tool.",[45,1079,1080,1083],{},[48,1081,1082],{},"Nagging."," A notice on every run, or one that cannot be turned off, gets the tool uninstalled or aliased with the check disabled.",[45,1085,1086,1089,1090,1093],{},[48,1087,1088],{},"Upgrading with the wrong installer."," ",[14,1091,1092],{},"pip install --upgrade"," inside a pipx or uv environment corrupts the manager's view of it.",[45,1095,1096,1099],{},[48,1097,1098],{},"Trusting the network."," Proxies return HTML error pages with status 200; captive portals return anything. Validate the response shape and treat surprises as \"no information\".",[45,1101,1102,1105],{},[48,1103,1104],{},"Telemetry by default."," Even well-intentioned, it is the sort of surprise that ends up in a security review — or a news story.",[37,1107,1109],{"id":1108},"key-takeaways","Key takeaways",[42,1111,1112,1115,1120,1123,1126],{},[45,1113,1114],{},"Treat an update check as a background, best-effort feature: cached for a day, bounded by a short timeout, silent on failure.",[45,1116,68,1117,1119],{},[14,1118,71],{},", and decide policies for pre-releases and major versions.",[45,1121,1122],{},"Show one short notice on stderr after the output, only for interactive terminals, with an upgrade command that matches the install method.",[45,1124,1125],{},"Offer a self-update command only if it delegates to the installer that owns the environment.",[45,1127,1128],{},"Make telemetry opt-in, minimal, documented and inspectable — or do not collect it.",[37,1130,1132],{"id":1131},"frequently-asked-questions","Frequently asked questions",[1134,1135,1137],"h3",{"id":1136},"is-an-automatic-update-check-acceptable-for-an-open-source-tool","Is an automatic update check acceptable for an open-source tool?",[10,1139,1140],{},"Generally yes, if it only fetches a version number from the package index, is cached, can be disabled and is documented. Many widely used tools do exactly that. Sending anything beyond the request itself — identifiers, usage data — is a different matter and should be opt-in.",[1134,1142,1144],{"id":1143},"should-the-tool-upgrade-itself-automatically","Should the tool upgrade itself automatically?",[10,1146,1147,1148,1151],{},"Almost never. Silent self-upgrades change behaviour under users and scripts without warning and break reproducibility in CI. Offer an explicit ",[14,1149,1150],{},"self-update"," command and a notice; let the user decide when to run it.",[1134,1153,1155],{"id":1154},"how-do-i-force-users-off-a-version-that-no-longer-works","How do I force users off a version that no longer works?",[10,1157,1158],{},"Use your own version endpoint to return a minimum supported version. When the installed version is below it, fail with a clear message and the upgrade command — but only for operations that genuinely cannot work, such as calls to a server API that changed. Do not block offline work.",[1134,1160,1162],{"id":1161},"what-about-tools-distributed-inside-a-company","What about tools distributed inside a company?",[10,1164,1165],{},"The same design works with a private index or an internal endpoint, and internal tools benefit most because nobody upgrades them otherwise. Combine the notice with a minimum-version check if old clients can damage shared systems.",[1134,1167,1169],{"id":1168},"does-the-update-check-need-its-own-dependency","Does the update check need its own dependency?",[10,1171,1172,1173,1176,1177,265,1180,1183,1184,1186],{},"No. ",[14,1174,1175],{},"httpx"," or ",[14,1178,1179],{},"urllib.request",[14,1181,1182],{},"packaging"," and the standard library cover it. ",[14,1185,1182],{}," is usually already present, and a hundred lines of your own code are easier to audit than a third-party notifier that runs on every invocation.",[37,1188,1190],{"id":1189},"related","Related",[42,1192,1193,1198,1203,1208,1212,1216,1223],{},[45,1194,1195,1196],{},"Up: ",[22,1197,25],{"href":24},[45,1199,1200,1201],{},"Down: ",[22,1202,139],{"href":138},[45,1204,1200,1205],{},[22,1206,1207],{"href":143},"Showing non-blocking update notices",[45,1209,1200,1210],{},[22,1211,963],{"href":962},[45,1213,1200,1214],{},[22,1215,1005],{"href":1004},[45,1217,1218,1219],{},"Sideways: ",[22,1220,1222],{"href":1221},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002F","Calling HTTP APIs from Python CLIs",[45,1224,1218,1225],{},[22,1226,1228],{"href":1227},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002F","Filesystem paths and atomic writes",[1230,1231,1232],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}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);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":207,"searchDepth":231,"depth":231,"links":1234},[1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1254],{"id":39,"depth":231,"text":40},{"id":92,"depth":231,"text":93},{"id":148,"depth":231,"text":149},{"id":184,"depth":231,"text":185},{"id":410,"depth":231,"text":411},{"id":446,"depth":231,"text":447},{"id":880,"depth":231,"text":881},{"id":925,"depth":231,"text":926},{"id":967,"depth":231,"text":968},{"id":1009,"depth":231,"text":1010},{"id":1062,"depth":231,"text":1063},{"id":1108,"depth":231,"text":1109},{"id":1131,"depth":231,"text":1132,"children":1248},[1249,1250,1251,1252,1253],{"id":1136,"depth":238,"text":1137},{"id":1143,"depth":238,"text":1144},{"id":1154,"depth":238,"text":1155},{"id":1161,"depth":238,"text":1162},{"id":1168,"depth":238,"text":1169},{"id":1189,"depth":231,"text":1190},"2026-10-02","Tell users a Python CLI is outdated without slowing it: cached PyPI checks, non-blocking notices, upgrade commands for pipx and uv, and opt-in telemetry.","intermediate",false,"md",{},"\u002Fcli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis",{"title":5,"description":1256},"cli-runtime-systems-integration\u002Fupdate-checks-and-self-updating-clis\u002Findex",[1265,1266,1267,1268,1269],"updates","pypi","telemetry","distribution","ux","T7WToGsmvbhwgNI1cxKOco36zXYu4lJ3q1SbtMV3X6E",[1272,1275,1278,1281,1284,1287,1290,1293,1296,1299,1302,1305,1308,1311,1314,1317,1320,1323,1326,1329,1332,1335,1338,1341,1344,1347,1350,1353,1356,1359,1362,1365,1368,1371,1374,1377,1380,1383,1386,1389,1392,1395,1398,1401,1404,1407,1410,1413,1416,1419,1422,1425,1428,1431,1434,1437,1440,1443,1446,1449,1452,1455,1458,1461,1464,1467,1470,1473,1476,1479,1482,1485,1488,1491,1494,1497,1500,1503,1506,1509,1512,1515,1518,1521,1523,1526,1529,1532,1535,1538,1541,1544,1547,1550,1553,1556,1559,1562,1565,1568,1571,1574,1577,1580,1583,1586,1589,1592,1595,1598,1601,1604,1607,1610,1613,1616,1619,1622,1625,1628,1631,1634,1637,1640,1643,1646,1649,1652,1655,1658,1661,1664,1667,1670,1673,1676,1677,1680,1683,1686,1689,1692,1695,1698,1701,1704,1707,1710,1713,1716,1719,1722,1725,1728,1731,1734,1737,1740,1743,1746,1749,1752,1755,1758,1761,1764,1767,1770,1773,1776,1779,1782,1785,1788,1791,1794,1797,1800,1803,1806,1809,1812,1815,1818,1821,1824,1827,1830,1833,1836,1839,1842,1845,1848,1851,1854,1857,1860,1863,1866,1869,1872,1875,1878,1881,1884,1887,1890,1893,1896,1899,1902,1905,1908,1911,1914,1917,1920,1923,1926,1929,1932,1935,1938,1941,1944,1947,1950,1953,1956,1959,1962,1965,1968,1971,1974,1977,1980,1983,1986,1989,1992,1995,1998,2001,2004,2007,2010,2013,2016,2019,2022,2025,2028,2031,2034,2037,2040,2043,2046,2049,2052,2055,2058,2061,2064,2067,2070,2073,2076,2079,2082,2085,2088,2091,2094,2097,2100,2103,2106,2109,2112],{"path":1273,"title":1274},"\u002Fabout","About Python CLI Toolcraft",{"path":1276,"title":1277},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies","Advanced Argument Validation Strategies",{"path":1279,"title":1280},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fparsing-nested-json-arguments-in-python-clis","Parsing Nested JSON Args in Python CLIs",{"path":1282,"title":1283},"\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":1285,"title":1286},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fvalidating-dependent-and-conflicting-options","Validating Dependent and Conflicting CLI Options",{"path":1288,"title":1289},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fvalidating-file-and-directory-paths-in-clis","Validating File and Directory Paths in CLIs",{"path":1291,"title":1292},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fvalidating-urls-hosts-and-ports","Validating URLs, Hosts and Ports in Python CLI Arguments",{"path":1294,"title":1295},"\u002Fadvanced-input-parsing-user-experience\u002Fadvanced-argument-validation-strategies\u002Fwriting-custom-click-parameter-types","Writing Custom Click Parameter Types",{"path":1297,"title":1298},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual\u002Fbrowsing-records-with-a-textual-datatable","Browsing Records with a Textual DataTable Picker",{"path":1300,"title":1301},"\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":1303,"title":1304},"\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":1306,"title":1307},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual","Building Terminal UIs with Textual for Python CLIs",{"path":1309,"title":1310},"\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":1312,"title":1313},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual\u002Fstyling-textual-apps-with-tcss","Styling Textual Apps with TCSS",{"path":1315,"title":1316},"\u002Fadvanced-input-parsing-user-experience\u002Fbuilding-terminal-uis-with-textual\u002Ftesting-textual-apps-with-pilot","Testing Textual Apps with Pilot",{"path":1318,"title":1319},"\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":1321,"title":1322},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation\u002Fdocumenting-environment-variables-in-help","Documenting Environment Variables in CLI Help",{"path":1324,"title":1325},"\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":1327,"title":1328},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation","CLI Help Output and Documentation",{"path":1330,"title":1331},"\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":1333,"title":1334},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation\u002Fversioning-and-deprecating-cli-flags","Versioning and Deprecating CLI Flags",{"path":1336,"title":1337},"\u002Fadvanced-input-parsing-user-experience\u002Fcli-help-output-and-documentation\u002Fwriting-help-text-users-actually-read","Writing Help Text Users Actually Read",{"path":1339,"title":1340},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Fadapting-output-to-terminal-width","Adapting Python CLI Output to Terminal Width",{"path":1342,"title":1343},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Fdetecting-ci-environments-and-non-interactive-shells","Detecting CI Environments and Non-Interactive Shells",{"path":1345,"title":1346},"\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":1348,"title":1349},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility\u002Fhandling-ansi-escape-codes-on-windows-consoles","Handling ANSI Escape Codes on Windows Consoles",{"path":1351,"title":1352},"\u002Fadvanced-input-parsing-user-experience\u002Fcross-platform-terminal-compatibility","Cross-Platform Terminal Compatibility for Python CLIs",{"path":1354,"title":1355},"\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":1357,"title":1358},"\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":1360,"title":1361},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Fchoosing-exit-codes-for-cli-tools","Choosing Exit Codes for CLI Tools",{"path":1363,"title":1364},"\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":1366,"title":1367},"\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":1369,"title":1370},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Ffriendly-error-messages-and-tracebacks","Friendly Error Messages and Tracebacks",{"path":1372,"title":1373},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Fhandling-keyboard-interrupt-cleanly","Handling Keyboard Interrupt Cleanly",{"path":1375,"title":1376},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes","Error Handling and Exit Codes for CLIs",{"path":1378,"title":1379},"\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":1381,"title":1382},"\u002Fadvanced-input-parsing-user-experience\u002Ferror-handling-and-exit-codes\u002Fwriting-crash-reports-users-can-send","Writing Crash Reports Users Can Send",{"path":1384,"title":1385},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Fconfig-precedence-flags-env-files-defaults","Config Precedence: Flags, Env, Files, Defaults",{"path":1387,"title":1388},"\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":1390,"title":1391},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars","Handling Config Files and Env Vars in CLIs",{"path":1393,"title":1394},"\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":1396,"title":1397},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Freading-toml-config-with-tomllib","Reading TOML Config with tomllib in Python CLIs",{"path":1399,"title":1400},"\u002Fadvanced-input-parsing-user-experience\u002Fhandling-configuration-files-env-vars\u002Ftyped-settings-with-pydantic-settings","Typed Settings with pydantic-settings in Python CLIs",{"path":1402,"title":1403},"\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":1405,"title":1406},"\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":1408,"title":1409},"\u002Fadvanced-input-parsing-user-experience","Advanced Input Parsing for Python CLIs",{"path":1411,"title":1412},"\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":1414,"title":1415},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Fbuilding-interactive-prompts-and-menus","Building Interactive Prompts and Menus in Python CLIs",{"path":1417,"title":1418},"\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":1420,"title":1421},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich","Interactive Terminal UI with Rich",{"path":1423,"title":1424},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Flive-dashboards-with-rich-live","Live Dashboards with Rich Live in Python CLIs",{"path":1426,"title":1427},"\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":1429,"title":1430},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Frendering-tables-and-json-with-rich","Rendering Tables and JSON with Rich",{"path":1432,"title":1433},"\u002Fadvanced-input-parsing-user-experience\u002Finteractive-terminal-ui-with-rich\u002Ftheming-rich-output-consistently","Theming Rich Output Consistently in Python CLIs",{"path":1435,"title":1436},"\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":1438,"title":1439},"\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":1441,"title":1442},"\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":1444,"title":1445},"\u002Fadvanced-input-parsing-user-experience\u002Foutput-formats-for-data-clis","Output Formats for Data-Heavy Python CLIs",{"path":1447,"title":1448},"\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":1450,"title":1451},"\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":1453,"title":1454},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis\u002Fargcomplete-for-argparse-clis","Tab Completion for argparse CLIs with argcomplete",{"path":1456,"title":1457},"\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":1459,"title":1460},"\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":1462,"title":1463},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis","Shell Completion for Python CLIs",{"path":1465,"title":1466},"\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":1468,"title":1469},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis\u002Fshipping-completion-scripts-with-packages","Shipping Shell Completion Scripts with a Python CLI",{"path":1471,"title":1472},"\u002Fadvanced-input-parsing-user-experience\u002Fshell-completion-for-python-clis\u002Ftesting-shell-completion-in-python-clis","Testing Shell Completion in Python CLIs",{"path":1474,"title":1475},"\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":1477,"title":1478},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps\u002Fadding-verbose-and-quiet-logging-flags","Adding Verbose and Quiet Logging Flags",{"path":1480,"title":1481},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps","Structured Logging for CLI Apps",{"path":1483,"title":1484},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps\u002Flogging-with-structlog-in-a-cli","Logging with structlog in a Python CLI",{"path":1486,"title":1487},"\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":1489,"title":1490},"\u002Fadvanced-input-parsing-user-experience\u002Fstructured-logging-for-cli-apps\u002Fstructured-json-logging-in-python-clis","Structured JSON Logging in Python CLIs",{"path":1492,"title":1493},"\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":1495,"title":1496},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Fdetecting-tty-and-adapting-output","Detecting a TTY and Adapting Output",{"path":1498,"title":1499},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Femitting-json-output-for-scripting","Emitting JSON Output for Scripting",{"path":1501,"title":1502},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Fhandling-broken-pipe-and-sigpipe","Handling Broken Pipe and SIGPIPE",{"path":1504,"title":1505},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes","Working with stdin, stdout and Pipes",{"path":1507,"title":1508},"\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":1510,"title":1511},"\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":1513,"title":1514},"\u002Fadvanced-input-parsing-user-experience\u002Fworking-with-stdin-stdout-and-pipes\u002Freading-piped-input-in-python-clis","Reading Piped Input in Python CLIs",{"path":1516,"title":1517},"\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":1519,"title":1520},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Fdownloading-files-with-progress-in-python","Downloading Files with Progress in Python CLIs",{"path":1522,"title":1222},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis",{"path":1524,"title":1525},"\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":1527,"title":1528},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Foauth-device-flow-login-for-clis","OAuth Device Flow Login for Python CLIs",{"path":1530,"title":1531},"\u002Fcli-runtime-systems-integration\u002Fcalling-http-apis-from-python-clis\u002Fpaginating-api-results-in-a-cli","Paginating API Results in a Python CLI",{"path":1533,"title":1534},"\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":1536,"title":1537},"\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":1539,"title":1540},"\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":1542,"title":1543},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis","Concurrency and Async in Python CLIs",{"path":1545,"title":1546},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Fmultiprocessing-for-cpu-bound-cli-tasks","Multiprocessing for CPU-Bound CLI Tasks",{"path":1548,"title":1549},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Fparallelising-cli-work-with-thread-pools","Parallelising CLI Work with Thread Pools",{"path":1551,"title":1552},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Frate-limiting-concurrent-requests-in-clis","Rate-Limiting Concurrent Requests in Python CLIs",{"path":1554,"title":1555},"\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":1557,"title":1558},"\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":1560,"title":1561},"\u002Fcli-runtime-systems-integration\u002Fconcurrency-and-async-in-python-clis\u002Fstructured-concurrency-with-taskgroups-in-clis","Structured Concurrency with TaskGroups in Python CLIs",{"path":1563,"title":1564},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fcross-platform-paths-with-pathlib","Cross-Platform Paths with pathlib in CLIs",{"path":1566,"title":1567},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Ffile-locking-for-concurrent-cli-runs","File Locking for Concurrent CLI Runs in Python",{"path":1569,"title":1570},"\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":1572,"title":1573},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes","Filesystem Paths and Atomic Writes for CLIs",{"path":1575,"title":1576},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fsafe-temporary-files-and-directories","Safe Temporary Files and Directories in CLIs",{"path":1578,"title":1579},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fstoring-app-data-with-platformdirs","Storing CLI App Data with platformdirs",{"path":1581,"title":1582},"\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":1584,"title":1585},"\u002Fcli-runtime-systems-integration\u002Ffilesystem-paths-and-atomic-writes\u002Fwriting-files-atomically-in-python-clis","Writing Files Atomically in Python CLIs",{"path":1587,"title":1588},"\u002Fcli-runtime-systems-integration","CLI Runtime & Systems Integration for Python",{"path":1590,"title":1591},"\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":1593,"title":1594},"\u002Fcli-runtime-systems-integration\u002Flocal-state-and-sqlite-in-python-clis","Local State and SQLite in Python CLIs",{"path":1596,"title":1597},"\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":1599,"title":1600},"\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":1602,"title":1603},"\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":1605,"title":1606},"\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":1608,"title":1609},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis\u002Fhandling-sigterm-and-graceful-shutdown","Handling SIGTERM and Graceful Shutdown in CLIs",{"path":1611,"title":1612},"\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":1614,"title":1615},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis","Long-Running and Watch-Mode Python CLIs",{"path":1617,"title":1618},"\u002Fcli-runtime-systems-integration\u002Flong-running-and-watch-mode-clis\u002Freloading-config-on-sighup","Reloading Configuration on SIGHUP in a Python CLI",{"path":1620,"title":1621},"\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":1623,"title":1624},"\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":1626,"title":1627},"\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":1629,"title":1630},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Favoiding-shell-injection-in-python-clis","Avoiding Shell Injection in Python CLIs",{"path":1632,"title":1633},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Fcalling-external-commands-safely-with-subprocess","Calling External Commands Safely with subprocess",{"path":1635,"title":1636},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Fhandling-subprocess-timeouts-and-exit-codes","Handling Subprocess Timeouts and Exit Codes",{"path":1638,"title":1639},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis","Running Subprocesses from Python CLIs",{"path":1641,"title":1642},"\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":1644,"title":1645},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Fpiping-between-subprocesses-in-python","Piping Between Subprocesses in Python Without a Shell",{"path":1647,"title":1648},"\u002Fcli-runtime-systems-integration\u002Frunning-subprocesses-from-python-clis\u002Fstreaming-subprocess-output-in-real-time","Streaming Subprocess Output in Real Time",{"path":1650,"title":1651},"\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":1653,"title":1654},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis","Secrets and Credentials in Python CLIs",{"path":1656,"title":1657},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Fprompting-for-passwords-securely","Prompting for Passwords Securely in Python CLIs",{"path":1659,"title":1660},"\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":1662,"title":1663},"\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":1665,"title":1666},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Frefreshing-expired-tokens-automatically","Refreshing Expired Tokens Automatically in a Python CLI",{"path":1668,"title":1669},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Fstoring-tokens-with-keyring","Storing CLI Tokens Securely with keyring",{"path":1671,"title":1672},"\u002Fcli-runtime-systems-integration\u002Fsecrets-and-credentials-in-python-clis\u002Fsupporting-multiple-profiles-and-accounts","Supporting Multiple Profiles and Accounts in CLIs",{"path":1674,"title":1675},"\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":1261,"title":5},{"path":1678,"title":1679},"\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":1681,"title":1682},"\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":1684,"title":1685},"\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":1687,"title":1688},"\u002F","Python CLI Toolcraft",{"path":1690,"title":1691},"\u002Fmodern-python-cli-frameworks-architecture\u002Falternative-python-cli-frameworks\u002Fbuilding-a-cli-with-cleo","Building a Python CLI with Cleo Command Classes",{"path":1693,"title":1694},"\u002Fmodern-python-cli-frameworks-architecture\u002Falternative-python-cli-frameworks\u002Fbuilding-a-cli-with-cyclopts","Building a Type-Hinted Python CLI with Cyclopts",{"path":1696,"title":1697},"\u002Fmodern-python-cli-frameworks-architecture\u002Falternative-python-cli-frameworks","Beyond Click and Typer: Alternative Python CLI Frameworks",{"path":1699,"title":1700},"\u002Fmodern-python-cli-frameworks-architecture\u002Falternative-python-cli-frameworks\u002Fquick-clis-from-functions-with-python-fire","Quick CLIs from Functions with Python Fire",{"path":1702,"title":1703},"\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":1705,"title":1706},"\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":1708,"title":1709},"\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":1711,"title":1712},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Fguarding-startup-with-import-tests","Guarding CLI Startup with Import Tests",{"path":1714,"title":1715},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading","CLI Startup Performance and Lazy Loading",{"path":1717,"title":1718},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Flazy-loading-subcommands-for-faster-startup","Lazy Loading Subcommands for Faster Startup",{"path":1720,"title":1721},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Fprofiling-python-cli-startup-time","Profiling Python CLI Startup Time",{"path":1723,"title":1724},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcli-startup-performance-and-lazy-loading\u002Freducing-cli-dependency-weight","Reducing CLI Dependency Weight",{"path":1726,"title":1727},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fargparse-subparsers-for-subcommands","argparse Subparsers for Subcommands",{"path":1729,"title":1730},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fargparse-vs-click-vs-typer-comparison","argparse vs Click vs Typer Compared",{"path":1732,"title":1733},"\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":1735,"title":1736},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse","Command-Line Parsing with argparse",{"path":1738,"title":1739},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fmigrating-from-argparse-to-typer","Migrating from argparse to Typer",{"path":1741,"title":1742},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fmutually-exclusive-options-in-argparse","Mutually Exclusive Options in argparse",{"path":1744,"title":1745},"\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":1747,"title":1748},"\u002Fmodern-python-cli-frameworks-architecture\u002Fcommand-line-parsing-with-argparse\u002Fwriting-custom-argparse-actions","Writing Custom argparse Actions in Python",{"path":1750,"title":1751},"\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":1753,"title":1754},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions\u002Fdesigning-idempotent-commands","Designing Idempotent Commands in a Python CLI",{"path":1756,"title":1757},"\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":1759,"title":1760},"\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":1762,"title":1763},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions","Designing CLI Interfaces and Conventions in Python",{"path":1765,"title":1766},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions\u002Fnaming-commands-and-flags-consistently","Naming Commands and Flags Consistently in Python CLIs",{"path":1768,"title":1769},"\u002Fmodern-python-cli-frameworks-architecture\u002Fdesigning-cli-interfaces-and-conventions\u002Fpositional-arguments-vs-options","Positional Arguments vs Options: Designing a CLI Signature",{"path":1771,"title":1772},"\u002Fmodern-python-cli-frameworks-architecture","Python CLI Frameworks and Architecture",{"path":1774,"title":1775},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Fdiscovering-plugins-with-entry-points","Discovering Plugins with Entry Points in Python CLIs",{"path":1777,"title":1778},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Fhook-based-plugins-with-pluggy","Hook-Based Plugins for Python CLIs with pluggy",{"path":1780,"title":1781},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis","Plugin Architectures for Extensible CLIs",{"path":1783,"title":1784},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Fisolating-plugin-failures","Isolating Plugin Failures in an Extensible Python CLI",{"path":1786,"title":1787},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Ftesting-plugins-against-the-host-cli","Testing Plugins Against the Host CLI",{"path":1789,"title":1790},"\u002Fmodern-python-cli-frameworks-architecture\u002Fplugin-architectures-for-extensible-clis\u002Fversioning-a-plugin-api","Versioning a Plugin API for a Python CLI",{"path":1792,"title":1793},"\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":1795,"title":1796},"\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":1798,"title":1799},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fdependency-injection-patterns-for-cli-commands","Dependency Injection Patterns for CLI Commands",{"path":1801,"title":1802},"\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":1804,"title":1805},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis","Structuring Multi-Command Python CLIs",{"path":1807,"title":1808},"\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":1810,"title":1811},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fregistering-commands-from-modules-automatically","Registering CLI Commands from Modules Automatically",{"path":1813,"title":1814},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fsharing-common-options-across-commands","Sharing Common Options Across Python CLI Commands",{"path":1816,"title":1817},"\u002Fmodern-python-cli-frameworks-architecture\u002Fstructuring-multi-command-python-clis\u002Fsharing-state-with-click-context-objects","Sharing State with Click Context Objects",{"path":1819,"title":1820},"\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":1822,"title":1823},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications","Testing Python CLI Applications",{"path":1825,"title":1826},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Fmeasuring-cli-test-coverage","Measuring CLI Test Coverage",{"path":1828,"title":1829},"\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":1831,"title":1832},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Fproperty-based-testing-cli-arguments-with-hypothesis","Property-Based Testing CLI Arguments with Hypothesis",{"path":1834,"title":1835},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Fsnapshot-testing-cli-output","Snapshot Testing CLI Output",{"path":1837,"title":1838},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Ftesting-click-commands-with-clirunner","Testing Click Commands with CliRunner",{"path":1840,"title":1841},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Ftesting-commands-that-call-subprocesses","Testing Python CLI Commands That Call Subprocesses",{"path":1843,"title":1844},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Ftesting-interactive-prompts-and-stdin","Testing Interactive Prompts and stdin",{"path":1846,"title":1847},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftesting-python-cli-applications\u002Ftranscript-tests-for-cli-commands","Transcript Tests for Python CLI Commands",{"path":1849,"title":1850},"\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":1852,"title":1853},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Fbuilding-dynamic-commands-in-click","Building Dynamic Commands in Click",{"path":1855,"title":1856},"\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":1858,"title":1859},"\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":1861,"title":1862},"\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":1864,"title":1865},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each","Typer vs Click: When to Use Each",{"path":1867,"title":1868},"\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":1870,"title":1871},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Ftyper-callback-functions-explained","Typer callback functions explained",{"path":1873,"title":1874},"\u002Fmodern-python-cli-frameworks-architecture\u002Ftyper-vs-click-when-to-use-each\u002Fusing-annotated-options-in-typer","Using Annotated Options in Typer",{"path":1876,"title":1877},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fautomating-releases-from-git-tags","Automating Python CLI Releases from Git Tags",{"path":1879,"title":1880},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fcaching-uv-dependencies-in-ci","Caching uv Dependencies in CI for Python CLIs",{"path":1882,"title":1883},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis","CI\u002FCD Pipelines for Python CLIs",{"path":1885,"title":1886},"\u002Fproject-setup-dependency-management\u002Fci-cd-pipelines-for-python-clis\u002Fpublishing-a-cli-docker-image-from-ci","Publishing a Python CLI as a Docker Image from CI",{"path":1888,"title":1889},"\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":1891,"title":1892},"\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":1894,"title":1895},"\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":1897,"title":1898},"\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":1900,"title":1901},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Fbuilding-a-cookiecutter-template-for-typer-clis","Building a Cookiecutter Template for Typer CLIs",{"path":1903,"title":1904},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Fcopier-vs-cookiecutter-for-cli-templates","Copier vs Cookiecutter for CLI Templates",{"path":1906,"title":1907},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter","CLI Project Scaffolding with Cookiecutter",{"path":1909,"title":1910},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Fpost-generation-hooks-in-cli-templates","Post-Generation Hooks in Python CLI Templates",{"path":1912,"title":1913},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Ftemplate-variables-and-conditional-files","Template Variables and Conditional Files in CLI Templates",{"path":1915,"title":1916},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Ftesting-a-project-template-with-pytest","Testing a CLI Project Template with pytest",{"path":1918,"title":1919},"\u002Fproject-setup-dependency-management\u002Fcli-project-scaffolding-with-cookiecutter\u002Fupdating-generated-projects-with-copier-update","Updating Generated CLI Projects with copier update",{"path":1921,"title":1922},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fbuilding-cross-platform-release-binaries-in-ci","Building Cross-Platform Release Binaries in CI",{"path":1924,"title":1925},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fbundling-a-python-cli-with-pyinstaller","Bundling a Python CLI with PyInstaller",{"path":1927,"title":1928},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fcode-signing-and-notarizing-cli-binaries","Code Signing and Notarizing Python CLI Binaries",{"path":1930,"title":1931},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fhomebrew-and-scoop-packaging-for-python-clis","Homebrew and Scoop Packaging for Python CLIs",{"path":1933,"title":1934},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries","Distributing CLIs as Standalone Binaries",{"path":1936,"title":1937},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Fnuitka-vs-pyinstaller-for-python-clis","Nuitka vs PyInstaller for Python CLI Binaries",{"path":1939,"title":1940},"\u002Fproject-setup-dependency-management\u002Fdistributing-clis-as-standalone-binaries\u002Freducing-pyinstaller-binary-size","Reducing the Size of a PyInstaller CLI Binary",{"path":1942,"title":1943},"\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":1945,"title":1946},"\u002Fproject-setup-dependency-management","Project Setup & Dependency Management",{"path":1948,"title":1949},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code\u002Fconfiguring-ruff-for-a-cli-project","Configuring Ruff for a Python CLI Project",{"path":1951,"title":1952},"\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":1954,"title":1955},"\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":1957,"title":1958},"\u002Fproject-setup-dependency-management\u002Flinting-and-type-checking-cli-code","Linting and Type-Checking Python CLI Code",{"path":1960,"title":1961},"\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":1963,"title":1964},"\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":1966,"title":1967},"\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":1969,"title":1970},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fautomating-changelogs-with-conventional-commits","Automating Changelogs with Conventional Commits",{"path":1972,"title":1973},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fbumping-versions-consistently-across-a-cli-project","Bumping Versions Consistently Across a Python CLI Project",{"path":1975,"title":1976},"\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":1978,"title":1979},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fexposing-version-info-and-build-metadata","Exposing Version Info and Build Metadata",{"path":1981,"title":1982},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs","Managing CLI Versioning & Changelogs",{"path":1984,"title":1985},"\u002Fproject-setup-dependency-management\u002Fmanaging-cli-versioning-changelogs\u002Fsemantic-versioning-policy-for-cli-tools","A Semantic Versioning Policy for CLI Tools",{"path":1987,"title":1988},"\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":1990,"title":1991},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fbuilding-wheels-and-sdists-for-python-clis","Building Wheels and sdists for Python CLIs",{"path":1993,"title":1994},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fbundling-data-files-with-importlib-resources","Bundling Data Files with importlib.resources in CLIs",{"path":1996,"title":1997},"\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":1999,"title":2000},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution","Packaging Python CLIs for Distribution",{"path":2002,"title":2003},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Finstalling-and-distributing-clis-with-pipx","Installing and Distributing CLIs with pipx",{"path":2005,"title":2006},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Foptional-dependencies-and-extras-for-clis","Optional Dependencies and Extras for Python CLIs",{"path":2008,"title":2009},"\u002Fproject-setup-dependency-management\u002Fpackaging-python-clis-for-distribution\u002Fpublishing-a-python-cli-to-pypi","Publishing a Python CLI to PyPI",{"path":2011,"title":2012},"\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":2014,"title":2015},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fdynamic-versioning-with-poetry-plugins","Dynamic Versioning for a Poetry CLI from Git Tags",{"path":2017,"title":2018},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development","Poetry Workflows for CLI Development",{"path":2020,"title":2021},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fmanaging-poetry-lock-files-for-cli-tools","Managing Poetry Lock Files for CLI Tools",{"path":2023,"title":2024},"\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":2026,"title":2027},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fpoetry-dependency-groups-for-cli-tooling","Poetry Dependency Groups for CLI Tooling",{"path":2029,"title":2030},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fpoetry-entry-points-and-scripts-for-clis","Poetry Entry Points and Scripts for CLIs",{"path":2032,"title":2033},"\u002Fproject-setup-dependency-management\u002Fpoetry-workflows-for-cli-development\u002Fpublishing-a-cli-with-poetry","Building and Publishing a Python CLI with Poetry",{"path":2035,"title":2036},"\u002Fproject-setup-dependency-management\u002Fpre-commit-hooks-for-cli-projects","Pre-commit Hooks for CLI Projects",{"path":2038,"title":2039},"\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":2041,"title":2042},"\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":2044,"title":2045},"\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":2047,"title":2048},"\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":2050,"title":2051},"\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":2053,"title":2054},"\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":2056,"title":2057},"\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":2059,"title":2060},"\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":2062,"title":2063},"\u002Fproject-setup-dependency-management\u002Fsecuring-a-python-cli-supply-chain","Securing the Supply Chain of a Python CLI",{"path":2065,"title":2066},"\u002Fproject-setup-dependency-management\u002Fsecuring-a-python-cli-supply-chain\u002Fpinning-dependencies-with-hashes","Pinning a Python CLI’s Dependencies with Hashes",{"path":2068,"title":2069},"\u002Fproject-setup-dependency-management\u002Fsecuring-a-python-cli-supply-chain\u002Fpublishing-attestations-and-verifying-releases","Publishing Attestations and Verifying Python CLI Releases",{"path":2071,"title":2072},"\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":2074,"title":2075},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management","uv for Python CLI Dependency Management",{"path":2077,"title":2078},"\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":2080,"title":2081},"\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":2083,"title":2084},"\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":2086,"title":2087},"\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":2089,"title":2090},"\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":2092,"title":2093},"\u002Fproject-setup-dependency-management\u002Fuv-for-python-cli-dependency-management\u002Fuv-workspaces-for-multi-package-clis","uv Workspaces for Multi-Package Python CLIs",{"path":2095,"title":2096},"\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":2098,"title":2099},"\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":2101,"title":2102},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices","Python CLI Env Isolation Best Practices",{"path":2104,"title":2105},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fisolating-cli-tools-from-project-dependencies","Isolating CLI Tools from Your Project’s Dependencies",{"path":2107,"title":2108},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fmanaging-virtual-environments-for-cross-platform-clis","Managing Python CLI Virtual Environments",{"path":2110,"title":2111},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fpinning-the-python-version-for-a-cli","Pinning the Python Version for a CLI",{"path":2113,"title":2114},"\u002Fproject-setup-dependency-management\u002Fvirtual-environments-isolation-best-practices\u002Fsupporting-multiple-python-versions-with-nox","Supporting Multiple Python Versions with nox",1790967540139]