cmd2 4.2.2__tar.gz → 4.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cmd2-4.2.2 → cmd2-4.2.3}/.pre-commit-config.yaml +3 -2
- cmd2-4.2.3/AGENTS.md +40 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/CHANGELOG.md +8 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/Makefile +12 -1
- {cmd2-4.2.2 → cmd2-4.2.3}/PKG-INFO +134 -85
- {cmd2-4.2.2 → cmd2-4.2.3}/README.md +133 -84
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/annotated.py +113 -46
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/argparse_completer.py +6 -6
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/argparse_utils.py +14 -14
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/cmd2.py +57 -44
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/decorators.py +3 -2
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/rich_utils.py +2 -2
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/types.py +33 -3
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/utils.py +1 -1
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2.egg-info/PKG-INFO +134 -85
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2.egg-info/SOURCES.txt +3 -1
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2.egg-info/scm_file_list.json +3 -2
- cmd2-4.2.3/cmd2.egg-info/scm_version.json +8 -0
- cmd2-4.2.3/docs/assets/cmd2-readme-demo.gif +0 -0
- cmd2-4.2.3/docs/assets/getting-started-demo.gif +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/examples/alternate_event_loops.md +3 -1
- cmd2-4.2.3/docs/examples/getting_started.md +289 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/annotated.md +40 -15
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/argument_processing.md +35 -26
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/async_commands.md +6 -1
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/builtin_commands.md +1 -1
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/commands.md +8 -2
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/disable_commands.md +12 -11
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/embedded_python_shells.md +4 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/help.md +16 -14
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/hooks.md +2 -2
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/initialization.md +2 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/misc.md +3 -3
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/modular_commands.md +58 -51
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/plugins.md +5 -3
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/prompt.md +9 -8
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/redirection.md +2 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/scripting.md +32 -31
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/settings.md +2 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/shortcuts_aliases_macros.md +1 -1
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/startup_commands.md +4 -2
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/mixins/mixin_template.md +3 -5
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/testing.md +4 -4
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/getting_started.py +1 -1
- {cmd2-4.2.2 → cmd2-4.2.3}/pyproject.toml +32 -5
- {cmd2-4.2.2 → cmd2-4.2.3}/ruff.toml +1 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_annotated.py +61 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_cmd2.py +2 -2
- {cmd2-4.2.2 → cmd2-4.2.3}/ty.toml +0 -1
- cmd2-4.2.2/cmd2.egg-info/scm_version.json +0 -8
- cmd2-4.2.2/cmd2.png +0 -0
- cmd2-4.2.2/docs/examples/getting_started.md +0 -303
- {cmd2-4.2.2 → cmd2-4.2.3}/.prettierignore +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/.prettierrc +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/.typos.toml +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/GEMINI.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/LICENSE +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/MANIFEST.in +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/__init__.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/clipboard.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/colors.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/command_set.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/completion.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/constants.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/exceptions.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/history.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/parsing.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/plugin.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/pt_utils.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/py.typed +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/py_bridge.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/string_utils.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/styles.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2/theme.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2.egg-info/dependency_links.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2.egg-info/requires.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/cmd2.egg-info/top_level.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/codecov.yml +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/annotated.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/argparse_completer.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/argparse_utils.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/clipboard.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/cmd.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/colors.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/command_set.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/completion.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/constants.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/decorators.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/exceptions.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/history.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/index.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/parsing.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/plugin.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/pt_utils.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/py_bridge.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/rich_utils.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/string_utils.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/styles.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/theme.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/api/utils.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/doc_conventions.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/examples/examples.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/examples/index.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/clipboard.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/completion.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/generating_output.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/history.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/index.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/multiline_commands.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/os.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/packaging.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/table_creation.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/features/theme.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/index.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/javascripts/readthedocs.js +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/migrating/incompatibilities.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/migrating/index.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/migrating/minimum.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/migrating/next_steps.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/migrating/why.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/mixins/index.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/overrides/main.html +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/overview/alternatives.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/overview/index.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/overview/installation.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/overview/integrating.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/overview/resources.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/stylesheets/cmd2.css +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/docs/upgrades.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/.cmd2rc +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/README.md +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/annotated_example.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/argparse_completion.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/argparse_example.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/async_call.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/async_commands.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/async_printing.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/basic_completion.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/cmd2_history.dat +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/cmd_as_argument.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/color.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/command_sets.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/completion_item_choices.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/custom_parser.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/custom_types.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/default_categories.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/dynamic_commands.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/environment.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/event_loops.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/exit_code.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/hello_cmd2.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/help_categories.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/hooks.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/migrating.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/mixin.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/modular_commands/__init__.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/modular_commands/commandset_basic.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/modular_commands/commandset_complex.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/modular_commands/commandset_custominit.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/modular_commandsets.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/paged_output.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/persistent_history.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/pretty_print.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/python_scripting.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/read_input.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/remove_builtin_commands.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/remove_settable.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/rich_tables.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/rich_theme.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/scripts/arg_printer.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/scripts/conditional.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/scripts/nested.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/scripts/quit.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/scripts/save_help_text.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/scripts/script.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/scripts/script.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/tmux_launch.sh +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/tmux_split.sh +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/examples/unicode_commands.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/mkdocs.yml +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/package.json +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/scripts/validate_tag.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/setup.cfg +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/.cmd2rc +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/__init__.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/conftest.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/echo.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/environment.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/help.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/py_locals.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/pyscript_dir.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/raises_exception.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/recursive.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/self_in_py.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/stop.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/pyscript/test_print.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/relative_multiple.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/script.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/script.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/scripts/binary.bin +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/scripts/empty.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/scripts/help.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/scripts/nested.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/scripts/one_down.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/scripts/postcmds.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/scripts/precmds.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/scripts/utf8.txt +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_argparse.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_argparse_completer.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_argparse_subcommands.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_argparse_utils.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_categories.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_commandset.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_completion.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_dynamic_complete_style.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_future_annotations.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_history.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_parsing.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_plugin.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_pt_utils.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_py_completion.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_rich_utils.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_run_pyscript.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_string_utils.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_theme.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_utils.py +0 -0
- {cmd2-4.2.2 → cmd2-4.2.3}/tests/test_utils_defining_class.py +0 -0
|
@@ -7,6 +7,7 @@ repos:
|
|
|
7
7
|
- id: check-merge-conflict
|
|
8
8
|
- id: check-toml
|
|
9
9
|
- id: check-yaml
|
|
10
|
+
exclude: mkdocs.yml
|
|
10
11
|
- id: detect-private-key
|
|
11
12
|
- id: end-of-file-fixer
|
|
12
13
|
- id: fix-byte-order-marker
|
|
@@ -14,7 +15,7 @@ repos:
|
|
|
14
15
|
- id: trailing-whitespace
|
|
15
16
|
|
|
16
17
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
17
|
-
rev: "v0.16.
|
|
18
|
+
rev: "v0.16.5"
|
|
18
19
|
hooks:
|
|
19
20
|
- id: ruff-format
|
|
20
21
|
args: [--config=ruff.toml]
|
|
@@ -30,7 +31,7 @@ repos:
|
|
|
30
31
|
- prettier-plugin-toml@2.0.6
|
|
31
32
|
|
|
32
33
|
- repo: https://github.com/crate-ci/typos
|
|
33
|
-
rev: v1.
|
|
34
|
+
rev: v1.50.0
|
|
34
35
|
hooks:
|
|
35
36
|
- id: typos
|
|
36
37
|
exclude: |
|
cmd2-4.2.3/AGENTS.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Instructions for AI Agents
|
|
2
|
+
|
|
3
|
+
This file provides context and instructions for the agentic AI tools when working with this Python
|
|
4
|
+
project, which utilizes `uv` for environment and package management.
|
|
5
|
+
|
|
6
|
+
## General Instructions
|
|
7
|
+
|
|
8
|
+
- **Environment Management:** Prefer using `uv` for all Python environment management tasks.
|
|
9
|
+
- **Package Installation:** Always use `uv` to install packages and ensure they are installed within
|
|
10
|
+
the project's virtual environment.
|
|
11
|
+
- **Running Scripts/Commands:**
|
|
12
|
+
- To run Python scripts within the project's virtual environment, use `uv run ...`.
|
|
13
|
+
- To run programs directly from a PyPI package (installing it on the fly if necessary), use
|
|
14
|
+
`uvx ...` (shortcut for `uv tool run`).
|
|
15
|
+
- **New Dependencies:** If a new dependency is required, please state the reason for its inclusion.
|
|
16
|
+
- Do not commit spec, plan, or markdown documents to git without asking first.
|
|
17
|
+
- Save plans to `~/.superpowers/plans/` instead of the project directory.
|
|
18
|
+
|
|
19
|
+
## Python Code Standards
|
|
20
|
+
|
|
21
|
+
To ensure Python code adheres to required standards, the following commands **must** be run before
|
|
22
|
+
creating or modifying any `.py` files:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
make check
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
To run unit tests use the following command:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
make test
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
To make sure the documentation builds properly, use the following command:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
make docs-test
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
All 3 of the above commands should be run prior to committing code.
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 4.2.3 (September 2, 2026)
|
|
2
|
+
|
|
3
|
+
- Bug Fixes
|
|
4
|
+
- Fix some links which were broken when published to PyPI
|
|
5
|
+
- Enhancements
|
|
6
|
+
- Converted `BoundCommandFunc` and `UnboundCommandFunc` TypeAliases in `types.py` to Protocol
|
|
7
|
+
classes for stricter type checking on `cmd2` command method references
|
|
8
|
+
|
|
1
9
|
## 4.2.2 (August 25, 2026)
|
|
2
10
|
|
|
3
11
|
- Documentation Improvements
|
|
@@ -20,6 +20,8 @@ check: ## Run code quality tools.
|
|
|
20
20
|
@uv run prek run -a
|
|
21
21
|
@echo "🚀 Static type checking: Running ty"
|
|
22
22
|
@uv run ty check
|
|
23
|
+
@echo "🚀 Static type checking: Running mypy"
|
|
24
|
+
@uv run mypy .
|
|
23
25
|
|
|
24
26
|
.PHONY: format
|
|
25
27
|
format: ## Perform ruff formatting
|
|
@@ -29,8 +31,17 @@ format: ## Perform ruff formatting
|
|
|
29
31
|
lint: ## Perform ruff linting
|
|
30
32
|
@uv run ruff check --fix
|
|
31
33
|
|
|
34
|
+
.PHONY: mypy
|
|
35
|
+
mypy: ## Perform type checking using mypy
|
|
36
|
+
@uv run mypy .
|
|
37
|
+
|
|
38
|
+
.PHONY: ty
|
|
39
|
+
ty: ## Perform type checking using ty
|
|
40
|
+
@uv run ty check
|
|
41
|
+
|
|
32
42
|
.PHONY: typecheck
|
|
33
|
-
typecheck: ## Perform type checking
|
|
43
|
+
typecheck: ## Perform type checking using both mypy and ty
|
|
44
|
+
@uv run mypy .
|
|
34
45
|
@uv run ty check
|
|
35
46
|
|
|
36
47
|
.PHONY: test
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmd2
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.3
|
|
4
4
|
Summary: cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
|
|
5
5
|
Author: cmd2 Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -27,7 +27,7 @@ Requires-Dist: rich>=15.0.0
|
|
|
27
27
|
Requires-Dist: rich-argparse>=1.7.2
|
|
28
28
|
Dynamic: license-file
|
|
29
29
|
|
|
30
|
-
<h1 align="center">cmd2
|
|
30
|
+
<h1 align="center">cmd2: build feature-rich command-line applications in Python</h1>
|
|
31
31
|
|
|
32
32
|
[](https://pypi.python.org/pypi/cmd2/)
|
|
33
33
|
[](https://github.com/python-cmd2/cmd2/actions/workflows/tests.yml)
|
|
@@ -36,77 +36,145 @@ Dynamic: license-file
|
|
|
36
36
|
<a href="https://discord.gg/RpVG6tk"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg" alt="Chat"></a>
|
|
37
37
|
|
|
38
38
|
<p align="center">
|
|
39
|
-
<a href="#
|
|
40
|
-
<a href="#
|
|
39
|
+
<a href="#quick-start">Quick start</a> •
|
|
40
|
+
<a href="#why-cmd2">Why cmd2?</a> •
|
|
41
41
|
<a href="#installation">Installation</a> •
|
|
42
42
|
<a href="#documentation">Documentation</a> •
|
|
43
|
-
<a href="#
|
|
44
|
-
<a href="#hello-world">Hello World</a> •
|
|
45
|
-
<a href="#projects-using-cmd2">Projects using cmd2</a> •
|
|
43
|
+
<a href="#projects-using-cmd2">Projects using cmd2</a>
|
|
46
44
|
</p>
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
`cmd2` makes it quick to build powerful, polished command-line applications and REPLs in Python.
|
|
47
|
+
Start with a subclass of the standard library's
|
|
48
|
+
[`cmd.Cmd`](https://docs.python.org/3/library/cmd.html), then add commands while `cmd2` handles the
|
|
49
|
+
details that make an application pleasant to build and use: argument parsing, generated help, tab
|
|
50
|
+
completion, command history, scripting, output styling, and much more.
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
applications. It provides a simple API which is an extension of Python's built-in
|
|
53
|
-
[cmd](https://docs.python.org/3/library/cmd.html) module. cmd2 provides a wealth of features on top
|
|
54
|
-
of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
|
|
55
|
-
when using cmd.
|
|
52
|
+
You can use `cmd2` for a small internal tool and grow the same application into an extensible,
|
|
53
|
+
scriptable interface without replacing the framework or writing the usual CLI boilerplate.
|
|
56
54
|
|
|
57
|
-
|
|
58
|
-
> significant backwards incompatibilities from previous versions. Please see the
|
|
59
|
-
> [CHANGELOG](./CHANGELOG.md) for info on what has changed and the
|
|
60
|
-
> [Migration Guide](https://cmd2.readthedocs.io/en/latest/upgrades/) for tips on upgrading from an
|
|
61
|
-
> older version of `cmd2` to `4.x`**
|
|
55
|
+
## Quick start
|
|
62
56
|
|
|
63
|
-
|
|
57
|
+
Install `cmd2`:
|
|
64
58
|
|
|
65
|
-
|
|
59
|
+
```bash
|
|
60
|
+
pip install cmd2
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then create `app.py`:
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
from typing import Annotated
|
|
67
|
+
|
|
68
|
+
import cmd2
|
|
69
|
+
from cmd2.annotated import Argument, Option
|
|
66
70
|
|
|
67
|
-
When creating solutions developers have no shortage of tools to create rich and smart user
|
|
68
|
-
interfaces. System administrators have long been duct taping together brittle workflows based on a
|
|
69
|
-
menagerie of simple command line tools created by strangers on github and the guy down the hall.
|
|
70
|
-
Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to
|
|
71
|
-
fade quickly. On the other hand, Web and traditional desktop GUIs are first in class when it comes
|
|
72
|
-
to easily discovering functionality. The price we pay for beautifully colored displays is complexity
|
|
73
|
-
required to aggregate disparate applications into larger systems. `cmd2` fills the niche between
|
|
74
|
-
high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart
|
|
75
|
-
workflow automation systems.
|
|
76
71
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
extensive tab completion. When users become comfortable with functionality, cmd2 turns into a
|
|
80
|
-
feature rich library enabling a smooth transition to full automation. If designed with enough
|
|
81
|
-
forethought, a well implemented cmd2 application can serve as a boutique workflow tool. `cmd2` pulls
|
|
82
|
-
off this flexibility based on two pillars of philosophy:
|
|
72
|
+
class App(cmd2.Cmd):
|
|
73
|
+
"""A small interactive application."""
|
|
83
74
|
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
@cmd2.with_annotated
|
|
76
|
+
def do_greet(
|
|
77
|
+
self,
|
|
78
|
+
name: Annotated[str, Argument(help_text="person to greet")],
|
|
79
|
+
count: Annotated[int, Option(help_text="number of greetings")] = 1,
|
|
80
|
+
) -> None:
|
|
81
|
+
"""Greet a person."""
|
|
82
|
+
for _ in range(count):
|
|
83
|
+
self.poutput(f"Hello, {name}!")
|
|
86
84
|
|
|
87
|
-
## Philosophy
|
|
88
85
|
|
|
89
|
-
|
|
86
|
+
if __name__ == "__main__":
|
|
87
|
+
App().cmdloop()
|
|
88
|
+
```
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
`cmd2` supports [Typer](https://typer.tiangolo.com/)-style syntax for specifying command arguments
|
|
91
|
+
with type annotations. In this example, `@cmd2.with_annotated` turns `name` and `count` into a
|
|
92
|
+
positional argument and an option.
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- Automatic tab completion of `argparse` flags and optional arguments.
|
|
98
|
-
- Path completion easily enabled.
|
|
99
|
-
- When all else fails, custom tab completion based on `choices_provider` can fill any gaps.
|
|
94
|
+
Run it with `python app.py`. Your new `greet` command already has input validation, generated help,
|
|
95
|
+
and tab completion for its options. The application also includes discoverable help, command
|
|
96
|
+
history, aliases, macros, scripting, shell integration, and other built-in commands.
|
|
100
97
|
|
|
101
|
-
|
|
98
|
+
```console
|
|
99
|
+
(Cmd) help greet
|
|
100
|
+
Usage: greet [-h] [--count COUNT] name
|
|
102
101
|
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
(Cmd) greet --count 2 Ada
|
|
103
|
+
Hello, Ada!
|
|
104
|
+
Hello, Ada!
|
|
105
|
+
```
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
[](https://raw.githubusercontent.com/python-cmd2/cmd2/main/docs/assets/cmd2-readme-demo.gif)
|
|
108
|
+
|
|
109
|
+
See the [getting started tutorial](https://cmd2.readthedocs.io/en/latest/examples/getting_started/)
|
|
110
|
+
to build a more complete application.
|
|
111
|
+
|
|
112
|
+
## Why cmd2?
|
|
113
|
+
|
|
114
|
+
### Build more with less code
|
|
115
|
+
|
|
116
|
+
- Define commands as Python methods and use familiar
|
|
117
|
+
[`argparse`](https://cmd2.readthedocs.io/en/latest/features/argument_processing/) parsers for
|
|
118
|
+
arguments and subcommands. A single parser definition drives validation, help, and completion.
|
|
119
|
+
- Render Rich tables and other styled objects, with consistent helpers for
|
|
120
|
+
[normal output, errors, warnings, and paging](https://cmd2.readthedocs.io/en/latest/features/generating_output/).
|
|
121
|
+
- Organize large applications into independently testable and dynamically loadable
|
|
122
|
+
[CommandSets](https://cmd2.readthedocs.io/en/latest/features/modular_commands/), and customize the
|
|
123
|
+
command lifecycle with [hooks](https://cmd2.readthedocs.io/en/latest/features/hooks/).
|
|
124
|
+
- Integrate existing Python code, shell tools, or asynchronous work instead of restructuring your
|
|
125
|
+
application around the framework.
|
|
126
|
+
- Run on Windows, macOS, and Linux with a pure-Python package and a small dependency footprint.
|
|
127
|
+
|
|
128
|
+
### Give users a capable interface from day one
|
|
129
|
+
|
|
130
|
+
- **Tab completion:** provide context-aware completion for commands, subcommands, options, choices,
|
|
131
|
+
file paths, and custom data sources, with descriptive hints for completion candidates. Learn more
|
|
132
|
+
about [completion](https://cmd2.readthedocs.io/en/latest/features/completion/).
|
|
133
|
+
- **History:** search, edit, rerun, save, and optionally persist previously entered commands. Users
|
|
134
|
+
also get familiar navigation and reverse search such as <kbd>Ctrl</kbd>+<kbd>R</kbd>. Learn more
|
|
135
|
+
about [history](https://cmd2.readthedocs.io/en/latest/features/history/).
|
|
136
|
+
- **Unicode:** accept Unicode in commands, arguments, file names, and output, and run UTF-8 command
|
|
137
|
+
scripts for applications used in any language. Learn more about
|
|
138
|
+
[command scripts](https://cmd2.readthedocs.io/en/latest/features/scripting/#command-scripts).
|
|
139
|
+
- **Shell shortcuts and hotkeys:** use familiar Readline-style keyboard shortcuts for navigating and
|
|
140
|
+
editing the command line, including Emacs-style bindings provided by `prompt-toolkit`. Learn more
|
|
141
|
+
about [keyboard shortcuts](https://cmd2.readthedocs.io/en/latest/features/history/#for-users).
|
|
142
|
+
- **Help:** generate discoverable, categorized help for commands, subcommands, and arguments
|
|
143
|
+
directly from their argument parsers. Learn more about
|
|
144
|
+
[help](https://cmd2.readthedocs.io/en/latest/features/help/).
|
|
145
|
+
- **Rich UI/UX:** offer syntax highlighting, Fish-style history suggestions, multiline input,
|
|
146
|
+
configurable prompts, completion menus, themes, and an optional bottom toolbar. Learn more about
|
|
147
|
+
[prompts and toolbars](https://cmd2.readthedocs.io/en/latest/features/prompt/) and
|
|
148
|
+
[themes](https://cmd2.readthedocs.io/en/latest/features/theme/).
|
|
149
|
+
|
|
150
|
+
### Grow from exploration to automation
|
|
151
|
+
|
|
152
|
+
- **Shell scripting:** automate the same commands users run interactively by passing them as command
|
|
153
|
+
arguments or standard input from shell scripts. Learn more about
|
|
154
|
+
[automating cmd2 applications](https://cmd2.readthedocs.io/en/latest/features/os/#automating-cmd2-apps-from-other-cliclu-tools).
|
|
155
|
+
- **Python scripting:** run Python scripts inside the application for loops, branching, complex
|
|
156
|
+
control flow, and integration with the application's commands and data. Learn more about
|
|
157
|
+
[Python scripts](https://cmd2.readthedocs.io/en/latest/features/scripting/#python-scripts).
|
|
158
|
+
- **Run shell commands:** execute operating-system commands without leaving the application, using
|
|
159
|
+
the built-in `shell` command or its `!` shortcut. Learn more about
|
|
160
|
+
[OS integration](https://cmd2.readthedocs.io/en/latest/features/os/#executing-os-commands-from-within-cmd2).
|
|
161
|
+
- **Redirect output:** send command output to files or the clipboard, or pipe it through one or more
|
|
162
|
+
shell commands. Learn more about
|
|
163
|
+
[output redirection and pipes](https://cmd2.readthedocs.io/en/latest/features/redirection/).
|
|
164
|
+
- **Aliases, macros, and shortcuts:** let users customize names, parameterized commands, and terse
|
|
165
|
+
shortcuts for repetitive workflows without changing the application. Learn more about
|
|
166
|
+
[aliases, macros, and shortcuts](https://cmd2.readthedocs.io/en/latest/features/shortcuts_aliases_macros/).
|
|
167
|
+
- **Startup scripts:** initialize an application consistently by running saved commands every time
|
|
168
|
+
it starts. Learn more about
|
|
169
|
+
[startup commands and scripts](https://cmd2.readthedocs.io/en/latest/features/startup_commands/).
|
|
170
|
+
- **Embedded Python and IPython shells:** drop into an interactive Python or IPython session for
|
|
171
|
+
experimentation, debugging, object introspection, and access to application state. Learn more
|
|
172
|
+
about
|
|
173
|
+
[embedded Python shells](https://cmd2.readthedocs.io/en/latest/features/embedded_python_shells/).
|
|
174
|
+
- **Color, style, and tables:** produce readable output with Rich colors and styles, custom themes,
|
|
175
|
+
paging, and flexible table layouts. Learn more about
|
|
176
|
+
[generating output](https://cmd2.readthedocs.io/en/latest/features/generating_output/) and
|
|
177
|
+
[creating tables](https://cmd2.readthedocs.io/en/latest/features/table_creation/).
|
|
110
178
|
|
|
111
179
|
## Installation
|
|
112
180
|
|
|
@@ -120,17 +188,21 @@ cmd2 works with Python 3.11+ on Windows, macOS, and Linux. It is pure Python cod
|
|
|
120
188
|
dependencies. It works with both conventional CPython and free-threaded variants.
|
|
121
189
|
|
|
122
190
|
For information on other installation options, see
|
|
123
|
-
[Installation Instructions](https://cmd2.readthedocs.io/en/latest/overview/installation
|
|
191
|
+
[Installation Instructions](https://cmd2.readthedocs.io/en/latest/overview/installation/) in the
|
|
124
192
|
cmd2 documentation.
|
|
125
193
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
194
|
+
<!-- prettier-ignore -->
|
|
195
|
+
> [!IMPORTANT]
|
|
196
|
+
> Upgrading from an older release? Versions 3.x and 4.x include significant
|
|
197
|
+
> backwards-incompatible changes. Review the [changelog](https://github.com/python-cmd2/cmd2/blob/main/CHANGELOG.md)
|
|
198
|
+
> and [migration guide](https://cmd2.readthedocs.io/en/latest/upgrades/) before upgrading.
|
|
129
199
|
|
|
130
|
-
|
|
200
|
+
## Documentation
|
|
131
201
|
|
|
132
|
-
|
|
133
|
-
|
|
202
|
+
Read the [latest documentation](https://cmd2.readthedocs.io/en/latest/) online or download it in
|
|
203
|
+
HTML, PDF, and ePub formats. The
|
|
204
|
+
[`examples`](https://github.com/python-cmd2/cmd2/tree/main/examples) directory contains focused,
|
|
205
|
+
runnable demonstrations of individual features.
|
|
134
206
|
|
|
135
207
|
## Tutorials
|
|
136
208
|
|
|
@@ -145,29 +217,6 @@ examples.
|
|
|
145
217
|
- Advanced cookiecutter template with external plugin support :
|
|
146
218
|
https://github.com/jayrod/cookiecutter-python-cmd2-ext-plug
|
|
147
219
|
|
|
148
|
-
## Hello World
|
|
149
|
-
|
|
150
|
-
```python
|
|
151
|
-
#!/usr/bin/env python
|
|
152
|
-
"""A simple cmd2 application."""
|
|
153
|
-
import cmd2
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
class FirstApp(cmd2.Cmd):
|
|
157
|
-
"""A simple cmd2 application."""
|
|
158
|
-
|
|
159
|
-
def do_hello_world(self, _: cmd2.Statement):
|
|
160
|
-
self.poutput('Hello World')
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
if __name__ == '__main__':
|
|
164
|
-
import sys
|
|
165
|
-
|
|
166
|
-
c = FirstApp()
|
|
167
|
-
sys.exit(c.cmdloop())
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
|
|
171
220
|
## Found a bug?
|
|
172
221
|
|
|
173
222
|
If you think you've found a bug, please first read through the open
|