Repository guide · overview · v1
pallets / click
“Python composable command line interface toolkit” — as described by its authors
- CLI Tools
- Python
- BSD-3-Clause · open-source license
- Original repository
- pallets/click
- Source platform
- GitHub
- Repository owner / organization
- pallets
- License
- BSD-3-Clause · open-source license
- Analyzed revision
- 6aabf099bfdd4c1e75fe8d0e0d4241372b988ab1
- Last verified
Newer revision observed; parts of this guide may be outdated. The default branch moved to 06b2a6787411, checked 2026-10-03. The whole guide describes revision 6aabf099bfdd. A revision diff found changes in 1 code region it cites (listed below); statements about that region may not hold at the new revision and have not been rechecked yet.
- src/click/core.py:964-1659 · lines changed
pallets/click Repository Overview: Python Command Line Toolkit
Terms used on this page
- Entrypoint record
- A file the analyzer marks as a place where execution can start. When it carries a __main__ guard excerpt, the file contains an if __name__ == "__main__": block and the excerpt shows what that block calls; without an excerpt, the file was flagged by its name only.
- Bounded static execution path
- A call chain reconstructed from the source code without running it, stopped after a fixed number of steps. It shows how far the code can be followed on paper, not what happens at run time.
- Unresolved boundary
- Where a static path stops because the next call goes into an external library or cannot be resolved without running the code. It marks the edge of this analysis, not a defect in the repository.
- Static relations
- Calls and imports found in the source. "External or unresolved" relations point outside the analyzed files.
- Module role
- The analyzer's label for a file, inferred from how many calls go in and out (for example core, entry/orchestration, leaf). It describes a position in the call graph, not the authors' design.
- Test-like files
- Files whose names or locations look like tests. This analysis counts them; it does not run them.
- Observed · inferred · author-claimed · unresolved
- How each statement is supported: read directly from the analyzed files; derived by the analyzer from them; stated by the repository's authors (metadata, README); or not established by this analysis.
- Verified
- Two uses on these pages. In an analyzer record ("verified provenance", "a verified entrypoint") it means the record was read directly from the analyzed files, which these guides call observed; for an entrypoint, the __main__ guard text is present. Since the analyzer fix of 2026-10-04, a file that only has an entrypoint-like name such as cli.py or main.py is recorded as inferred; guides analyzed before that still call such a file verified, and it is still only a guess about how the file is used. It does not mean the code was run or tested. "Last verified" is the date the guide last passed the lab's checks against the analysis record of the stated revision; it is not a review of the repository itself.
Static analysis of the click repository, described in GitHub metadata as a 'Python composable command line interface toolkit', inventoried 177 files, 5,640 static relations, and a src/click package covering core commands, terminal UI, shell completion, and parameter types. The detected entrypoint is examples/complex/complex/cli.py; runtime flow and declared dependencies remain unresolved.
What it is
This repository is named 'click' in its recorded platform topics, and its GitHub description calls it a 'Python composable command line interface toolkit' with homepage https://click.palletsprojects.com. The primary language is Python, with 927,014 recorded Python language bytes. Platform metadata records a BSD-3-Clause license, a latest release 8.5.0 published on 2026-08-27, and 17,665 stargazers as of 2026-09-14. The source lives under a src/click package; for example, src/click/core.py defines classes Context and Command. The analyzer inventoried 177 files in total.
How it starts
The analyzer detected one executable entrypoint, examples/complex/complex/cli.py, using a filename heuristic rather than runtime confirmation. Five bounded execution paths were traced from it, and each terminates with reason 'unresolved_boundary' at an external or unresolved call. The reached boundaries are os.path.abspath, click.make_pass_decorator, os.path.dirname, os.path.join, and dict. Beyond these boundary calls, the packet establishes no resolved local flow for a run of this script.
Structure
The analyzer identified three top-level subsystems: docs, src, and tests. The analyzed tree holds 58 files under tests, 41 under docs, 39 under examples, 18 under src, 10 under .github, and 2 under .devcontainer. By static call degree, src/click/_compat.py (90 incoming, 35 outgoing) and src/click/utils.py (47 incoming, 16 outgoing) attract the most incoming calls among library modules, which suggests they act as shared helpers. src/click/core.py has the highest outgoing count among recorded src/click modules (15 incoming, 52 outgoing), consistent with an orchestration role. Other connected modules include exceptions.py (25/12), types.py (18/25), termui.py (17/34), and shell_completion.py (13/17). Two test modules are also labeled 'service/core candidate' — tests/test_shell_completion.py (73/73) and tests/test_termui.py (21/21) — so the metric does not separate tests from library code. These role labels come from static resolved call degree and entrypoint membership, not from runtime measurement.
Dependencies and tests
The analyzer recorded 11 build/dependency manifest files, and pyproject.toml is a project-level important file. This packet nonetheless contains no parsed dependency records: dependency extraction covers only requirements-style manifests and does not parse pyproject.toml dependency tables. Of 5,640 static relations, 590 are local and 5,050 are external or unresolved. The analyzer counted 58 test files or test-like files. Recorded test symbols include test_command, test_group, and test_chained in tests/test_shell_completion.py, plus progressbar tests such as test_progressbar_strip_regression and test_progressbar_eta in tests/test_termui.py.
Read first
Start with README.md, a project-level important file, and treat what it says as author claims. Then read pyproject.toml for packaging configuration and LICENSE.txt for the BSD-3-Clause terms. Open examples/complex/complex/cli.py next; it is the detected entrypoint and shows the library used from a script. Then read src/click/core.py for the Context and Command classes, src/click/types.py for ParamType, and src/click/shell_completion.py for ShellComplete. Finish with src/click/termui.py (prompt, confirm, progressbar) and src/click/utils.py (echo, open_file) for user-facing helpers.
Limits of this analysis
This analysis is static only: reflection, dynamic imports, monkey-patching, generated code, framework runtime wiring, and dynamic dispatch are not resolved. Install, run, and build inference is partial, and installation commands were not exercised. Dependency evidence covers only requirements-style manifests, so the declared dependencies of this project are not established here. Analysis is bounded: files over 400 kB, minified bundles, and vendored directories are inventoried but not parsed, and relation extraction is capped at 2,500 per file and 150,000 per repository. 5,050 of 5,640 relations are external or unresolved, and the bounded execution paths end at 'unresolved_boundary', so runtime flow through the entrypoint is not established. README claim extraction is line-based, so README-derived statements count as author claims at most.
Notable symbols
src/click/core.py records class Context at lines 213-961 and class Command at lines 964-1659. src/click/exceptions.py defines ClickException, UsageError, BadParameter, MissingParameter, NoSuchOption, and NoSuchCommand. src/click/types.py defines ParamType, CompositeParamType, FuncParamType, Choice, DateTime, and IntParamType. src/click/shell_completion.py provides shell_complete, a ShellComplete base class, and per-shell subclasses BashComplete, ZshComplete, FishComplete, and PowerShellComplete, plus add_completion_class for registration. src/click/termui.py provides prompt, confirm, and progressbar; src/click/utils.py provides echo, open_file, format_filename, and get_app_dir; src/click/_termui_impl.py provides ProgressBar and Editor.
What this analysis could not establish
The writing model's own notes on the analysis record. Identifiers such as lim_3, exec_* or claim_… name records of that analysis; the claims table cites the same records.
- Runtime behavior of the entrypoint and of the library is unverified; every flow statement in this asset derives from static analysis.
- No parsed dependency records exist in the packet, so the project's declared runtime dependencies are unknown in this asset.
- Module role labels, call degrees, and the entrypoint detection come from analyzer heuristics (static call degree, filename patterns), not runtime measurement.
- README-derived statements are treated as author claims only; line-based extraction may capture code lines instead of prose (lim_4).
- Teaching claim claim_4d30ade3e21e ('No bounded static execution path is available') conflicts with the five exec_* records in the same packet; this asset follows the exec_* records.
Claims and evidence — 36 claims, 36 supported by an independent verifier
Every statement above is a claim that cites grounding IDs from the analysis. IDs are internal to the analysis run; the columns show what each claim rests on and how strong that ground is.
Every substantive statement above is a claim bound to grounding IDs of the analyzed revision. Global grounding IDs are namespaced by the analysis run.
| Claim | Epistemic status | Verifier | Grounding (global IDs) |
|---|---|---|---|
| c1 GitHub metadata describes the project as a 'Python composable command line interface toolkit' and lists https://click.palletsprojects.com as its homepage. | author_claimed | supported | analysis_3d4c7139f466dac4:meta_description, analysis_3d4c7139f466dac4:meta_homepage |
| c2 Platform metadata marks Python as the primary language, records 927,014 Python language bytes, and lists topics 'cli, click, pallets, python'. | observed | supported | analysis_3d4c7139f466dac4:meta_primary_language, analysis_3d4c7139f466dac4:meta_language_bytes, analysis_3d4c7139f466dac4:meta_topics |
| c3 Platform metadata records a BSD-3-Clause license, a latest release 8.5.0 published 2026-08-27T04:00:53Z, and 17,665 stargazers at 2026-09-14T06:55:03Z. | observed | supported | analysis_3d4c7139f466dac4:meta_license, analysis_3d4c7139f466dac4:meta_latest_release, analysis_3d4c7139f466dac4:meta_stars |
| c4 The source tree contains a src/click package; src/click/core.py defines classes Context (lines 213-961) and Command (lines 964-1659). | observed | supported | analysis_3d4c7139f466dac4:py_class_da13ed9d598f, analysis_3d4c7139f466dac4:py_class_24d704049beb |
| c5 The analyzer inventoried 177 analyzed files for this repository. | inferred | supported | analysis_3d4c7139f466dac4:summary_repository |
| c6 The analyzer detected one executable entrypoint, examples/complex/complex/cli.py, by a filename heuristic, not by runtime confirmation. | observed | supported | analysis_3d4c7139f466dac4:entry_1 |
| c7 Bounded execution paths from the entrypoint reach external or unresolved calls to os.path.abspath, click.make_pass_decorator, os.path.dirname, os.path.join, and dict. | inferred | supported | analysis_3d4c7139f466dac4:exec_0043739c2d32, analysis_3d4c7139f466dac4:exec_596220682e0a, analysis_3d4c7139f466dac4:exec_a54848360e57, analysis_3d4c7139f466dac4:exec_e19ecc60c584, analysis_3d4c7139f466dac4:exec_e52794443a42 |
| c8 All five bounded execution paths terminate with terminal_reason 'unresolved_boundary', so no resolved local downstream flow from the entrypoint is established. | inferred | supported | analysis_3d4c7139f466dac4:exec_e52794443a42, analysis_3d4c7139f466dac4:exec_596220682e0a, analysis_3d4c7139f466dac4:exec_0043739c2d32, analysis_3d4c7139f466dac4:exec_a54848360e57, analysis_3d4c7139f466dac4:exec_e19ecc60c584 |
| c9 The analyzer identified three top-level subsystems: docs, src, and tests. | observed | supported | analysis_3d4c7139f466dac4:subsys_1, analysis_3d4c7139f466dac4:subsys_2, analysis_3d4c7139f466dac4:subsys_3 |
| c10 The analyzed tree holds 58 files under tests, 41 under docs, 39 under examples, 18 under src, 10 under .github, and 2 under .devcontainer. | inferred | supported | analysis_3d4c7139f466dac4:summary_repository |
| c11 src/click/_compat.py has 90 incoming and 35 outgoing calls and src/click/utils.py has 47 incoming and 16 outgoing; the high incoming degree suggests both act as shared helpers. | inferred | supported | analysis_3d4c7139f466dac4:role_4, analysis_3d4c7139f466dac4:role_18 |
| c12 src/click/core.py has 15 incoming and 52 outgoing calls, the highest outgoing count among recorded src/click modules, consistent with an orchestration role. | inferred | supported | analysis_3d4c7139f466dac4:role_8 |
| c13 Other connected modules by static call degree are src/click/exceptions.py (25/12), src/click/types.py (18/25), src/click/termui.py (17/34), and src/click/shell_completion.py (13/17). | inferred | supported | analysis_3d4c7139f466dac4:role_10, analysis_3d4c7139f466dac4:role_17, analysis_3d4c7139f466dac4:role_15, analysis_3d4c7139f466dac4:role_14 |
| c14 tests/test_shell_completion.py (73/73) and tests/test_termui.py (21/21) are also labeled 'service/core candidate', so the degree metric does not separate tests from library code. | inferred | supported | analysis_3d4c7139f466dac4:role_21, analysis_3d4c7139f466dac4:role_22 |
| c15 The role labels derive from 'static resolved call degree and entrypoint membership', i.e., analyzer inference rather than runtime measurement. | inferred | supported | analysis_3d4c7139f466dac4:role_4, analysis_3d4c7139f466dac4:role_8 |
| c16 ev_manifest_1 records 11 build/dependency manifest files, and pyproject.toml is classified as a project-level important file. | observed | supported | analysis_3d4c7139f466dac4:ev_manifest_1, analysis_3d4c7139f466dac4:important_3 |
| c17 No parsed dependency records are available in this packet: dependency extraction covers only requirements-style manifests and does not parse pyproject.toml dependency tables. | observed | supported | analysis_3d4c7139f466dac4:lim_3 |
| c18 Of 5,640 static relations, 590 are local and 5,050 are external or unresolved. | observed | supported | analysis_3d4c7139f466dac4:relation_counts |
| c19 ev_tests_1 records 58 test files or test-like files, including tests/conftest.py. | observed | supported | analysis_3d4c7139f466dac4:ev_tests_1 |
| c20 tests/test_shell_completion.py defines tests test_command, test_group, and test_chained; tests/test_termui.py defines test_progressbar_strip_regression and test_progressbar_eta. | observed | supported | analysis_3d4c7139f466dac4:py_func_584518d90ba8, analysis_3d4c7139f466dac4:py_func_4a5c8a5dd03b, analysis_3d4c7139f466dac4:py_func_c9a54d984c66, analysis_3d4c7139f466dac4:py_func_633edb2c8b0d, analysis_3d4c7139f466dac4:py_func_c80d2eab0b62 |
| c21 README.md is a project-level important file, and README-derived content should be treated as author claims because extraction is line-based. | observed | supported | analysis_3d4c7139f466dac4:important_1, analysis_3d4c7139f466dac4:lim_4 |
| c22 pyproject.toml and LICENSE.txt are project-level important files, and platform metadata records the license as BSD-3-Clause. | observed | supported | analysis_3d4c7139f466dac4:important_3, analysis_3d4c7139f466dac4:important_4, analysis_3d4c7139f466dac4:meta_license |
| c23 examples/complex/complex/cli.py is the detected entrypoint and a project-level important file, and its bounded paths include a call to click.make_pass_decorator, showing library use from a script. | inferred | supported | analysis_3d4c7139f466dac4:entry_1, analysis_3d4c7139f466dac4:important_5, analysis_3d4c7139f466dac4:exec_596220682e0a |
| c24 src/click/core.py defines Context and Command, src/click/types.py defines ParamType, and src/click/shell_completion.py defines ShellComplete. | observed | supported | analysis_3d4c7139f466dac4:py_class_da13ed9d598f, analysis_3d4c7139f466dac4:py_class_24d704049beb, analysis_3d4c7139f466dac4:py_class_8e98d459b7f2, analysis_3d4c7139f466dac4:py_class_eeaee6d7bcee |
| c25 src/click/termui.py defines prompt, confirm, and progressbar, and src/click/utils.py defines echo and open_file. | observed | supported | analysis_3d4c7139f466dac4:py_func_6cea44846e57, analysis_3d4c7139f466dac4:py_func_31314f509698, analysis_3d4c7139f466dac4:py_func_754dc48de5b0, analysis_3d4c7139f466dac4:py_func_19f630994cd2, analysis_3d4c7139f466dac4:py_func_9433e83ae271 |
| c26 This analysis is static only: reflection, runtime dependency injection, dynamic imports, monkey-patching, generated code, framework runtime wiring, and dynamic dispatch are not resolved. | observed | supported | analysis_3d4c7139f466dac4:lim_1 |
| c27 Install, run, and build inference is partial, and installation commands were not exercised. | observed | supported | analysis_3d4c7139f466dac4:lim_2 |
| c28 Dependency records exist only for requirements-style manifests; pyproject.toml dependency tables were not parsed, so declared dependencies of this project are not established here. | observed | supported | analysis_3d4c7139f466dac4:lim_3 |
| c29 Bounded analysis inventoried but did not parse files over 400 kB, minified bundles, and vendored directories, and relation extraction is capped at 2,500 per file and 150,000 per repository. | observed | supported | analysis_3d4c7139f466dac4:lim_6 |
| c30 5,050 of 5,640 relations are external or unresolved, and the bounded execution paths end at 'unresolved_boundary', so runtime flow through the entrypoint is not established. | inferred | supported | analysis_3d4c7139f466dac4:relation_counts, analysis_3d4c7139f466dac4:exec_0043739c2d32, analysis_3d4c7139f466dac4:exec_e52794443a42, analysis_3d4c7139f466dac4:exec_596220682e0a, analysis_3d4c7139f466dac4:exec_a54848360e57, analysis_3d4c7139f466dac4:exec_e19ecc60c584 |
| c31 README claim extraction in v0.10 is line-based, so README-derived statements count as author claims at most. | observed | supported | analysis_3d4c7139f466dac4:lim_4 |
| c32 src/click/core.py records class Context at lines 213-961 and class Command at lines 964-1659. | observed | supported | analysis_3d4c7139f466dac4:py_class_da13ed9d598f, analysis_3d4c7139f466dac4:py_class_24d704049beb |
| c33 src/click/exceptions.py defines ClickException, UsageError, BadParameter, MissingParameter, NoSuchOption, and NoSuchCommand. | observed | supported | analysis_3d4c7139f466dac4:py_class_31ecf679adf4, analysis_3d4c7139f466dac4:py_class_1b71c210bcd0, analysis_3d4c7139f466dac4:py_class_f98887a728ef, analysis_3d4c7139f466dac4:py_class_063a20a529ef, analysis_3d4c7139f466dac4:py_class_096815e9f5dc, analysis_3d4c7139f466dac4:py_class_d9c25ca8b871 |
| c34 src/click/types.py defines ParamType, CompositeParamType, FuncParamType, Choice, DateTime, and IntParamType. | observed | supported | analysis_3d4c7139f466dac4:py_class_8e98d459b7f2, analysis_3d4c7139f466dac4:py_class_e58e2405db0f, analysis_3d4c7139f466dac4:py_class_5d5eb6be250c, analysis_3d4c7139f466dac4:py_class_c5ebeb926268, analysis_3d4c7139f466dac4:py_class_2a339412c8b8, analysis_3d4c7139f466dac4:py_class_965f4103c97b |
| c35 src/click/shell_completion.py defines shell_complete, ShellComplete, BashComplete, ZshComplete, FishComplete, PowerShellComplete, and add_completion_class. | observed | supported | analysis_3d4c7139f466dac4:py_func_38ce2de132b9, analysis_3d4c7139f466dac4:py_class_eeaee6d7bcee, analysis_3d4c7139f466dac4:py_class_867bf5516522, analysis_3d4c7139f466dac4:py_class_5a238792f027, analysis_3d4c7139f466dac4:py_class_bfaddb0c4eea, analysis_3d4c7139f466dac4:py_class_3faf78ec557d, analysis_3d4c7139f466dac4:py_func_accc10dbfe6b |
| c36 src/click/termui.py defines prompt, confirm, and progressbar; src/click/utils.py defines echo, open_file, format_filename, and get_app_dir; src/click/_termui_impl.py defines ProgressBar and Editor. | observed | supported | analysis_3d4c7139f466dac4:py_func_6cea44846e57, analysis_3d4c7139f466dac4:py_func_31314f509698, analysis_3d4c7139f466dac4:py_func_754dc48de5b0, analysis_3d4c7139f466dac4:py_func_19f630994cd2, analysis_3d4c7139f466dac4:py_func_9433e83ae271, analysis_3d4c7139f466dac4:py_func_606f922a1d60, analysis_3d4c7139f466dac4:py_func_42c262dc81be, analysis_3d4c7139f466dac4:py_class_95df11f964a6, analysis_3d4c7139f466dac4:py_class_cffc77c81595 |
Sources, rights and disclosure · attribution-license-templates/v0.1
Rights notice. Original repository hosted on GitHub. Repository source code, documentation, names, media, and related project materials remain subject to the rights of their respective authors, contributors, and other rights holders and to applicable repository license terms.
Platform notice. GitHub is the source hosting platform for the linked repository. GitHub and related marks are trademarks of GitHub, Inc. EVEMISS Technology is not affiliated with or endorsed by GitHub unless explicitly stated otherwise.
How this page is produced. This page was produced using revision-aware repository analysis and AI-assisted editorial tooling. Technical claims are tied to the analyzed repository revision and may be revalidated when the source repository changes.
AI-assisted analysis. Reviewed by EVEMISS Technology through human–AI collaborative review. · Report a rights concern · All repository guides