cmd2 2.7.0__tar.gz → 3.0.0__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-2.7.0 → cmd2-3.0.0}/.pre-commit-config.yaml +6 -6
- {cmd2-2.7.0 → cmd2-3.0.0}/CHANGELOG.md +96 -29
- cmd2-3.0.0/GEMINI.md +38 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/MANIFEST.in +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0}/Makefile +3 -4
- {cmd2-2.7.0 → cmd2-3.0.0}/PKG-INFO +25 -45
- {cmd2-2.7.0 → cmd2-3.0.0}/README.md +18 -17
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/__init__.py +41 -38
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/argparse_completer.py +80 -81
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/argparse_custom.py +322 -123
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/clipboard.py +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/cmd2.py +1265 -838
- cmd2-3.0.0/cmd2/colors.py +270 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/command_definition.py +13 -5
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/constants.py +0 -6
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/decorators.py +41 -104
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/exceptions.py +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/history.py +7 -11
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/parsing.py +15 -20
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/plugin.py +2 -3
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/py_bridge.py +15 -10
- cmd2-3.0.0/cmd2/rich_utils.py +451 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/rl_utils.py +12 -8
- cmd2-3.0.0/cmd2/string_utils.py +166 -0
- cmd2-3.0.0/cmd2/styles.py +72 -0
- cmd2-3.0.0/cmd2/terminal_utils.py +144 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/transcript.py +7 -9
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/utils.py +88 -508
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2.egg-info/PKG-INFO +25 -45
- cmd2-3.0.0/cmd2.egg-info/SOURCES.txt +328 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2.egg-info/requires.txt +5 -2
- cmd2-3.0.0/cmd2.png +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/codecov.yml +0 -5
- cmd2-3.0.0/docs/api/clipboard.md +3 -0
- cmd2-3.0.0/docs/api/colors.md +3 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/index.md +12 -6
- cmd2-3.0.0/docs/api/rich_utils.md +3 -0
- cmd2-3.0.0/docs/api/rl_utils.md +3 -0
- cmd2-3.0.0/docs/api/string_utils.md +3 -0
- cmd2-3.0.0/docs/api/styles.md +3 -0
- cmd2-3.0.0/docs/api/terminal_utils.md +3 -0
- cmd2-3.0.0/docs/api/transcript.md +3 -0
- cmd2-3.0.0/docs/api/utils.md +3 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/doc_conventions.md +15 -11
- cmd2-3.0.0/docs/examples/alternate_event_loops.md +73 -0
- cmd2-2.7.0/docs/examples/first_app.md → cmd2-3.0.0/docs/examples/getting_started.md +46 -45
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/examples/index.md +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/argument_processing.md +115 -53
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/builtin_commands.md +23 -25
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/clipboard.md +5 -11
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/commands.md +35 -32
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/completion.md +35 -34
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/disable_commands.md +17 -7
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/embedded_python_shells.md +11 -10
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/generating_output.md +76 -39
- cmd2-3.0.0/docs/features/help.md +203 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/history.md +19 -18
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/hooks.md +36 -35
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/index.md +1 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/initialization.md +8 -76
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/misc.md +13 -11
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/modular_commands.md +53 -49
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/multiline_commands.md +5 -5
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/os.md +32 -23
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/packaging.md +15 -22
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/plugins.md +17 -13
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/prompt.md +16 -19
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/redirection.md +7 -5
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/scripting.md +76 -76
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/settings.md +20 -23
- cmd2-3.0.0/docs/features/shortcuts_aliases_macros.md +106 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/startup_commands.md +8 -6
- cmd2-3.0.0/docs/features/table_creation.md +12 -0
- cmd2-3.0.0/docs/features/theme.md +10 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/features/transcripts.md +6 -6
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/index.md +7 -7
- cmd2-3.0.0/docs/migrating/incompatibilities.md +45 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/migrating/index.md +2 -2
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/migrating/minimum.md +5 -3
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/migrating/next_steps.md +16 -15
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/migrating/why.md +21 -17
- cmd2-3.0.0/docs/mixins/index.md +7 -0
- cmd2-3.0.0/docs/mixins/mixin_template.md +170 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/overview/alternatives.md +10 -7
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/overview/index.md +4 -4
- cmd2-3.0.0/docs/overview/installation.md +123 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/overview/integrating.md +10 -9
- cmd2-3.0.0/docs/overview/resources.md +7 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/testing.md +10 -9
- cmd2-3.0.0/docs/upgrades.md +141 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/@plugins_snapshot.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_ast.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_ast.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_codecs.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_codecs.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_collections_abc.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_collections_abc.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_typeshed/__init__.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_typeshed/__init__.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_typeshed/importlib.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/_typeshed/importlib.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/abc.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/abc.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/argparse.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/argparse.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/builtins.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/builtins.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/codecs.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/codecs.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/collections/__init__.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/collections/__init__.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/collections/abc.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/collections/abc.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/contextlib.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/contextlib.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/dataclasses.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/dataclasses.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/__init__.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/__init__.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/_policybase.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/_policybase.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/charset.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/charset.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/contentmanager.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/contentmanager.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/errors.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/errors.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/header.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/header.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/message.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/message.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/policy.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/email/policy.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/enum.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/enum.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/genericpath.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/genericpath.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/__init__.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/__init__.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/_abc.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/_abc.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/abc.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/abc.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/machinery.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/machinery.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/metadata/__init__.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/metadata/__init__.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/metadata/_meta.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/metadata/_meta.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/readers.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/readers.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/resources/__init__.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/resources/__init__.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/resources/abc.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/importlib/resources/abc.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/io.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/io.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/os/__init__.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/os/__init__.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/os/path.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/os/path.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/pathlib.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/pathlib.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/posixpath.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/posixpath.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/re.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/re.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/resource.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/resource.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sre_compile.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sre_compile.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sre_constants.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sre_constants.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sre_parse.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sre_parse.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/subprocess.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/subprocess.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sys/__init__.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sys/__init__.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sys/_monitoring.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/sys/_monitoring.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/types.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/types.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/typing.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/typing.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/typing_extensions.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/typing_extensions.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/zipfile/__init__.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/zipfile/__init__.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/zipfile/_path.data.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/3.12/zipfile/_path.meta.json +1 -0
- cmd2-3.0.0/examples/.mypy_cache/CACHEDIR.TAG +3 -0
- cmd2-3.0.0/examples/README.md +95 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/argparse_completion.py +32 -8
- cmd2-3.0.0/examples/argparse_example.py +176 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/async_printing.py +9 -9
- cmd2-3.0.0/examples/cmd2_history.dat +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/cmd_as_argument.py +1 -1
- cmd2-3.0.0/examples/color.py +51 -0
- cmd2-3.0.0/examples/command_sets.py +162 -0
- cmd2-3.0.0/examples/custom_parser.py +55 -0
- cmd2-3.0.0/examples/custom_types.py +165 -0
- cmd2-2.7.0/examples/initialization.py → cmd2-3.0.0/examples/getting_started.py +50 -16
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/help_categories.py +10 -8
- cmd2-2.7.0/plugins/template/cmd2_myplugin/myplugin.py → cmd2-3.0.0/examples/mixin.py +29 -11
- cmd2-2.7.0/examples/modular_commands_main.py → cmd2-3.0.0/examples/modular_commands.py +6 -5
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/python_scripting.py +9 -5
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/remove_builtin_commands.py +1 -1
- cmd2-3.0.0/examples/rich_tables.py +123 -0
- cmd2-3.0.0/examples/rich_theme.py +51 -0
- cmd2-2.7.0/examples/example.py → cmd2-3.0.0/examples/transcript_example.py +3 -3
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/transcripts/exampleSession.txt +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/transcripts/transcript_regex.txt +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0}/mkdocs.yml +15 -6
- cmd2-3.0.0/package.json +6 -0
- cmd2-3.0.0/pyproject.toml +122 -0
- cmd2-2.7.0/pyproject.toml → cmd2-3.0.0/ruff.toml +7 -143
- {cmd2-2.7.0 → cmd2-3.0.0}/tasks.py +13 -29
- cmd2-3.0.0/tests/conftest.py +251 -0
- cmd2-3.0.0/tests/pyscript/stdout_capture.py +4 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_argparse.py +47 -50
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_argparse_completer.py +52 -45
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_argparse_custom.py +10 -33
- {cmd2-2.7.0/tests_isolated/test_commandset → cmd2-3.0.0/tests}/test_argparse_subcommands.py +20 -20
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_cmd2.py +616 -348
- {cmd2-2.7.0/tests_isolated/test_commandset → cmd2-3.0.0/tests}/test_commandset.py +137 -136
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_completion.py +107 -13
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_future_annotations.py +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_history.py +25 -37
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_parsing.py +2 -2
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_plugin.py +1 -1
- cmd2-3.0.0/tests/test_rich_utils.py +331 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_run_pyscript.py +35 -31
- cmd2-3.0.0/tests/test_string_utils.py +215 -0
- cmd2-3.0.0/tests/test_terminal_utils.py +81 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_transcript.py +2 -3
- cmd2-3.0.0/tests/test_utils.py +376 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/from_cmdloop.txt +1 -1
- cmd2-2.7.0/cmd2/ansi.py +0 -1093
- cmd2-2.7.0/cmd2/table_creator.py +0 -1122
- cmd2-2.7.0/cmd2.egg-info/SOURCES.txt +0 -254
- cmd2-2.7.0/cmd2.png +0 -0
- cmd2-2.7.0/docs/api/ansi.md +0 -3
- cmd2-2.7.0/docs/api/table_creator.md +0 -3
- cmd2-2.7.0/docs/api/utils.md +0 -57
- cmd2-2.7.0/docs/examples/alternate_event_loops.md +0 -72
- cmd2-2.7.0/docs/features/help.md +0 -187
- cmd2-2.7.0/docs/features/shortcuts_aliases_macros.md +0 -94
- cmd2-2.7.0/docs/features/table_creation.md +0 -33
- cmd2-2.7.0/docs/migrating/incompatibilities.md +0 -46
- cmd2-2.7.0/docs/overview/installation.md +0 -109
- cmd2-2.7.0/docs/overview/resources.md +0 -11
- cmd2-2.7.0/docs/plugins/external_test.md +0 -74
- cmd2-2.7.0/docs/plugins/index.md +0 -7
- cmd2-2.7.0/docs/requirements.txt +0 -7
- cmd2-2.7.0/examples/README.md +0 -114
- cmd2-2.7.0/examples/alias_startup.py +0 -27
- cmd2-2.7.0/examples/arg_decorators.py +0 -60
- cmd2-2.7.0/examples/arg_print.py +0 -67
- cmd2-2.7.0/examples/basic.py +0 -51
- cmd2-2.7.0/examples/colors.py +0 -89
- cmd2-2.7.0/examples/custom_parser.py +0 -37
- cmd2-2.7.0/examples/decorator_example.py +0 -113
- cmd2-2.7.0/examples/first_app.py +0 -58
- cmd2-2.7.0/examples/modular_commands_basic.py +0 -35
- cmd2-2.7.0/examples/modular_commands_dynamic.py +0 -88
- cmd2-2.7.0/examples/modular_subcommands.py +0 -116
- cmd2-2.7.0/examples/override_parser.py +0 -23
- cmd2-2.7.0/examples/pirate.py +0 -100
- cmd2-2.7.0/examples/subcommands.py +0 -116
- cmd2-2.7.0/examples/table_creation.py +0 -274
- cmd2-2.7.0/package.json +0 -6
- cmd2-2.7.0/plugins/README.txt +0 -1
- cmd2-2.7.0/plugins/ext_test/CHANGELOG.md +0 -22
- cmd2-2.7.0/plugins/ext_test/README.md +0 -82
- cmd2-2.7.0/plugins/ext_test/build-pyenvs.sh +0 -53
- cmd2-2.7.0/plugins/ext_test/cmd2_ext_test/__init__.py +0 -18
- cmd2-2.7.0/plugins/ext_test/cmd2_ext_test/cmd2_ext_test.py +0 -68
- cmd2-2.7.0/plugins/ext_test/cmd2_ext_test/py.typed +0 -1
- cmd2-2.7.0/plugins/ext_test/cmd2_ext_test/pylintrc +0 -10
- cmd2-2.7.0/plugins/ext_test/examples/example.py +0 -37
- cmd2-2.7.0/plugins/ext_test/noxfile.py +0 -7
- cmd2-2.7.0/plugins/ext_test/pyproject.toml +0 -194
- cmd2-2.7.0/plugins/ext_test/setup.py +0 -50
- cmd2-2.7.0/plugins/ext_test/tasks.py +0 -209
- cmd2-2.7.0/plugins/ext_test/tests/__init__.py +0 -2
- cmd2-2.7.0/plugins/ext_test/tests/pylintrc +0 -19
- cmd2-2.7.0/plugins/ext_test/tests/test_ext_test.py +0 -74
- cmd2-2.7.0/plugins/tasks.py +0 -144
- cmd2-2.7.0/plugins/template/CHANGELOG.md +0 -12
- cmd2-2.7.0/plugins/template/LICENSE +0 -21
- cmd2-2.7.0/plugins/template/README.md +0 -294
- cmd2-2.7.0/plugins/template/build-pyenvs.sh +0 -53
- cmd2-2.7.0/plugins/template/cmd2_myplugin/__init__.py +0 -17
- cmd2-2.7.0/plugins/template/cmd2_myplugin/pylintrc +0 -10
- cmd2-2.7.0/plugins/template/examples/example.py +0 -20
- cmd2-2.7.0/plugins/template/noxfile.py +0 -7
- cmd2-2.7.0/plugins/template/setup.py +0 -51
- cmd2-2.7.0/plugins/template/tasks.py +0 -198
- cmd2-2.7.0/plugins/template/tests/__init__.py +0 -2
- cmd2-2.7.0/plugins/template/tests/pylintrc +0 -19
- cmd2-2.7.0/plugins/template/tests/test_myplugin.py +0 -69
- cmd2-2.7.0/tests/conftest.py +0 -199
- cmd2-2.7.0/tests/pyscript/stdout_capture.py +0 -25
- cmd2-2.7.0/tests/test_ansi.py +0 -298
- cmd2-2.7.0/tests/test_table_creator.py +0 -725
- cmd2-2.7.0/tests/test_utils.py +0 -935
- cmd2-2.7.0/tests/transcripts/regex_set.txt +0 -28
- cmd2-2.7.0/tests_isolated/__init__.py +0 -0
- cmd2-2.7.0/tests_isolated/test_commandset/__init__.py +0 -0
- cmd2-2.7.0/tests_isolated/test_commandset/conftest.py +0 -186
- {cmd2-2.7.0 → cmd2-3.0.0}/.prettierignore +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/.prettierrc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/LICENSE +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2/py.typed +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2.egg-info/dependency_links.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/cmd2.egg-info/top_level.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/argparse_completer.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/argparse_custom.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/cmd.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/command_definition.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/constants.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/decorators.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/exceptions.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/history.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/parsing.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/plugin.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/api/py_bridge.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/examples/examples.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/javascripts/readthedocs.js +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/overrides/main.html +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/stylesheets/cmd2.css +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/docs/stylesheets/readthedocs.css +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/.cmd2rc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/basic_completion.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/default_categories.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/dynamic_commands.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/environment.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/event_loops.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/exit_code.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/hello_cmd2.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/hooks.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/migrating.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/modular_commands/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/modular_commands/commandset_basic.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/modular_commands/commandset_complex.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/modular_commands/commandset_custominit.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/paged_output.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/persistent_history.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/pretty_print.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/read_input.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/remove_settable.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/scripts/arg_printer.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/scripts/conditional.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/scripts/nested.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/scripts/quit.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/scripts/save_help_text.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/scripts/script.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/scripts/script.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/tmux_launch.sh +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/tmux_split.sh +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/transcripts/pirate.transcript +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/transcripts/quit.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/examples/unicode_commands.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/setup.cfg +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/.cmd2rc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/pyscript/echo.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/pyscript/environment.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/pyscript/help.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/pyscript/py_locals.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/pyscript/pyscript_dir.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/pyscript/raises_exception.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/pyscript/recursive.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/pyscript/self_in_py.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/pyscript/stop.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/relative_multiple.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/script.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/script.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/scripts/binary.bin +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/scripts/empty.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/scripts/help.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/scripts/nested.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/scripts/one_down.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/scripts/postcmds.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/scripts/precmds.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/scripts/utf8.txt +0 -0
- {cmd2-2.7.0/tests_isolated/test_commandset → cmd2-3.0.0/tests}/test_categories.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/test_utils_defining_class.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/bol_eol.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/characterclass.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/dotstar.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/extension_notation.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/failure.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/multiline_no_regex.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/multiline_regex.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/no_output.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/no_output_last.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/singleslash.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/slashes_escaped.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/slashslash.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/spaces.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0}/tests/transcripts/word_boundaries.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
repos:
|
|
2
2
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
-
rev: "
|
|
3
|
+
rev: "v6.0.0"
|
|
4
4
|
hooks:
|
|
5
5
|
- id: check-case-conflict
|
|
6
6
|
- id: check-merge-conflict
|
|
@@ -9,17 +9,17 @@ repos:
|
|
|
9
9
|
- id: trailing-whitespace
|
|
10
10
|
|
|
11
11
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
12
|
-
rev: "v0.
|
|
12
|
+
rev: "v0.14.8"
|
|
13
13
|
hooks:
|
|
14
14
|
- id: ruff-format
|
|
15
|
-
args: [--config=
|
|
15
|
+
args: [--config=ruff.toml]
|
|
16
16
|
- id: ruff-check
|
|
17
|
-
args: [--config=
|
|
17
|
+
args: [--config=ruff.toml, --fix, --exit-non-zero-on-fix]
|
|
18
18
|
|
|
19
19
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
20
20
|
rev: "v3.1.0"
|
|
21
21
|
hooks:
|
|
22
22
|
- id: prettier
|
|
23
23
|
additional_dependencies:
|
|
24
|
-
- prettier@3.
|
|
25
|
-
- prettier-plugin-toml@2.0.
|
|
24
|
+
- prettier@3.6.2
|
|
25
|
+
- prettier-plugin-toml@2.0.6
|
|
@@ -1,3 +1,75 @@
|
|
|
1
|
+
## 3.0.0 (December 7, 2025)
|
|
2
|
+
|
|
3
|
+
### Summary
|
|
4
|
+
|
|
5
|
+
`cmd2` now has a dependency on [rich](https://github.com/Textualize/rich) for rich text and pretty
|
|
6
|
+
formatting in the terminal. Previously, `cmd2` had a large amount of custom code for this purpose
|
|
7
|
+
that predated the existence of `rich`. This opens the door to even more beautiful `cmd2`
|
|
8
|
+
applications. To get the most out of the new capabilities, we encourage you to spend a little bit of
|
|
9
|
+
time reading the [rich documentation](https://rich.readthedocs.io/).
|
|
10
|
+
|
|
11
|
+
### Details
|
|
12
|
+
|
|
13
|
+
- Breaking Changes
|
|
14
|
+
- Refactored and modernized styling and utility modules:
|
|
15
|
+
- Removed the legacy `table_creator.py` module in favor of `rich` tables (see the
|
|
16
|
+
[rich_tables.py](https://github.com/python-cmd2/cmd2/blob/main/examples/rich_tables.py)
|
|
17
|
+
example for more info)
|
|
18
|
+
- Moved all string-related functions from `utils.py` to a new `string_utils.py` module
|
|
19
|
+
- Removed redundant `string` from some of the names so `quote_string` is now just
|
|
20
|
+
`quote` and `quote_string_if_needed` is now `quote_if_needed`
|
|
21
|
+
- Consolidated all string styling functions from `ansi.py` into `string_utils.py`
|
|
22
|
+
- Replaced all text style enums from `ansi.py` with modern `rich` styles
|
|
23
|
+
- Renamed `ansi.py` to `terminal_utils.py` to better reflect its purpose
|
|
24
|
+
- Dropped support for Python 3.9. `cmd2` now requires Python 3.10 or later
|
|
25
|
+
- Replaced `Settable.get_value()` and `Settable.set_value()` methods with a more Pythonic
|
|
26
|
+
`value` property
|
|
27
|
+
- Removed redundant setting of a parser's `prog` value in the `with_argparser()` decorator, as
|
|
28
|
+
this is now handled centrally in `Cmd._build_parser()`
|
|
29
|
+
- The `auto_load_commands` argument to `cmd2.Cmd.__init__` now defaults to `False`
|
|
30
|
+
- `argparse_custom` module breaking changes:
|
|
31
|
+
- `descriptive_header: str` replaced with `descriptive_headers: Sequence[str | rich.Column]`
|
|
32
|
+
- Applies to parameter name when adding an argument to a parser as well as
|
|
33
|
+
`set_descriptive_headers` and `get_descriptive_headers`
|
|
34
|
+
- `CompletionItem.description: str` changed to
|
|
35
|
+
`CompletionItem.descriptive_data: Sequence[str | rich.Column]`
|
|
36
|
+
- `decorators` module breaking changes:
|
|
37
|
+
- `_set_parser_prog` renamed to `set_parser_prog` (without the leading underscore) and moved
|
|
38
|
+
to `argparse_custom` module
|
|
39
|
+
- Renamed history `--output_file` to `--output-file` to follow common command-line practices
|
|
40
|
+
|
|
41
|
+
- Enhancements
|
|
42
|
+
- Enhanced all print methods (`poutput()`, `perror()`, `ppaged()`, etc.) to natively render
|
|
43
|
+
`rich` objects, enabling beautiful and complex output
|
|
44
|
+
- Simplified the process for setting a custom parser for `cmd2`'s built-in commands. See the
|
|
45
|
+
[custom_parser.py](https://github.com/python-cmd2/cmd2/blob/main/examples/custom_parser.py)
|
|
46
|
+
example for an updated guide
|
|
47
|
+
- Introduced `Cmd.macro_arg_complete()` for tab-completing macro arguments, with default path
|
|
48
|
+
completion that can be easily customized
|
|
49
|
+
- Added `colors.py` and `styles.py` to provide easy access to `rich` color names and manage
|
|
50
|
+
`cmd2`-specific style definitions using `StrEnum` (see the
|
|
51
|
+
[colors.py](https://github.com/python-cmd2/cmd2/blob/main/examples/color.py) example for a
|
|
52
|
+
demonstration of all colors available to your `cmd2` application)
|
|
53
|
+
- Added ability to create a custom theme for a `cmd2` application using `rich_utils.set_theme`
|
|
54
|
+
(see the [rich_theme.py](https://github.com/python-cmd2/cmd2/blob/main/examples/rich_theme.py)
|
|
55
|
+
example for more info)
|
|
56
|
+
- Consolidated multiple redundant examples into a few more comprehensive ones, see:
|
|
57
|
+
- [argparse_example.py](https://github.com/python-cmd2/cmd2/blob/main/examples/argparse_example.py)
|
|
58
|
+
- [command_sets.py](https://github.com/python-cmd2/cmd2/blob/main/examples/command_sets.py)
|
|
59
|
+
- [getting_started.py](https://github.com/python-cmd2/cmd2/blob/main/examples/getting_started.py)
|
|
60
|
+
- Optimized performance of terminal fixup during command finalization by replacing `stty sane`
|
|
61
|
+
with `termios.tcsetattr`
|
|
62
|
+
|
|
63
|
+
- Bug Fixes
|
|
64
|
+
- Fixed a redirection bug where `cmd2` could unintentionally overwrite an application's
|
|
65
|
+
`sys.stdout`
|
|
66
|
+
|
|
67
|
+
- Migration Aids - these will help you iteratively migrate to `cmd2` 3.x in stages
|
|
68
|
+
- Published new [cmd2-ansi](https://pypi.org/project/cmd2-ansi/) module which is a backport of
|
|
69
|
+
the `cmd2.ansi` module present in `cmd2` 2.7.0
|
|
70
|
+
- Published new [cmd2-table](https://pypi.org/project/cmd2-table/) module which is a backport of
|
|
71
|
+
the `cmd2.table_creator` module present in `cmd2` 2.7.0
|
|
72
|
+
|
|
1
73
|
## 2.7.0 (June 30, 2025)
|
|
2
74
|
|
|
3
75
|
- Enhancements
|
|
@@ -6,7 +78,6 @@
|
|
|
6
78
|
## 2.6.2 (June 26, 2025)
|
|
7
79
|
|
|
8
80
|
- Enhancements
|
|
9
|
-
|
|
10
81
|
- Added explicit support for free-threaded versions of Python, starting with version 3.14
|
|
11
82
|
|
|
12
83
|
- Bug Fixes
|
|
@@ -101,7 +172,7 @@
|
|
|
101
172
|
prompts.
|
|
102
173
|
- This fix introduces behavior where an updated prompt won't display after an aborted search
|
|
103
174
|
until a user presses Enter. See
|
|
104
|
-
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/
|
|
175
|
+
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/main/examples/async_printing.py)
|
|
105
176
|
example for how to handle this case using `Cmd.need_prompt_refresh()` and
|
|
106
177
|
`Cmd.async_refresh_prompt()`.
|
|
107
178
|
- Enhancements
|
|
@@ -321,8 +392,8 @@
|
|
|
321
392
|
persistent history files created with versions older than 2.0.0 are not compatible.
|
|
322
393
|
- Enhancements
|
|
323
394
|
- Added support for custom tab completion and up-arrow input history to `cmd2.Cmd2.read_input`.
|
|
324
|
-
See [read_input.py](https://github.com/python-cmd2/cmd2/blob/
|
|
325
|
-
|
|
395
|
+
See [read_input.py](https://github.com/python-cmd2/cmd2/blob/main/examples/read_input.py) for
|
|
396
|
+
an example.
|
|
326
397
|
- Added `cmd2.exceptions.PassThroughException` to raise unhandled command exceptions instead of
|
|
327
398
|
printing them.
|
|
328
399
|
- Added support for ANSI styles and newlines in tab completion results using
|
|
@@ -534,7 +605,7 @@
|
|
|
534
605
|
- See [table_creation](https://cmd2.readthedocs.io/en/latest/features/table_creation.html)
|
|
535
606
|
documentation for an overview.
|
|
536
607
|
- See
|
|
537
|
-
[table_creation.py](https://github.com/python-cmd2/cmd2/blob/
|
|
608
|
+
[table_creation.py](https://github.com/python-cmd2/cmd2/blob/main/examples/table_creation.py)
|
|
538
609
|
for an example.
|
|
539
610
|
- Added the following exceptions to the public API
|
|
540
611
|
- `SkipPostcommandHooks` - Custom exception class for when a command has a failure bad
|
|
@@ -786,7 +857,7 @@
|
|
|
786
857
|
- Greatly simplified using argparse-based tab completion. The new interface is a complete
|
|
787
858
|
overhaul that breaks the previous way of specifying completion and choices functions. See
|
|
788
859
|
header of
|
|
789
|
-
[argparse_custom.py](https://github.com/python-cmd2/cmd2/blob/
|
|
860
|
+
[argparse_custom.py](https://github.com/python-cmd2/cmd2/blob/main/cmd2/argparse_custom.py)
|
|
790
861
|
for more information.
|
|
791
862
|
- Enabled tab completion on multiline commands
|
|
792
863
|
- **Renamed Commands Notice**
|
|
@@ -1109,7 +1180,7 @@
|
|
|
1109
1180
|
- Added `async_alert`, `async_update_prompt`, and `set_window_title` functions
|
|
1110
1181
|
- These allow you to provide feedback to the user in an asynchronous fashion, meaning alerts
|
|
1111
1182
|
can display when the user is still entering text at the prompt. See
|
|
1112
|
-
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1183
|
+
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/main/examples/async_printing.py)
|
|
1113
1184
|
for an example.
|
|
1114
1185
|
- Cross-platform colored output support
|
|
1115
1186
|
- `colorama` gets initialized properly in `Cmd.__init()`
|
|
@@ -1147,7 +1218,7 @@
|
|
|
1147
1218
|
- New dependency on `attrs` third party module
|
|
1148
1219
|
- Added `matches_sorted` member to support custom sorting of tab completion matches
|
|
1149
1220
|
- Added
|
|
1150
|
-
[tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1221
|
+
[tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/main/examples/tab_autocomp_dynamic.py)
|
|
1151
1222
|
example
|
|
1152
1223
|
- Demonstrates updating the argparse object during init instead of during class construction
|
|
1153
1224
|
- Deprecations
|
|
@@ -1190,7 +1261,7 @@
|
|
|
1190
1261
|
- If `chop` is `False`, then `self.pager` is used as the pager
|
|
1191
1262
|
- Otherwise `self.pager_chop` is used as the pager
|
|
1192
1263
|
- Greatly improved the
|
|
1193
|
-
[table_display.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1264
|
+
[table_display.py](https://github.com/python-cmd2/cmd2/blob/main/examples/table_display.py)
|
|
1194
1265
|
example
|
|
1195
1266
|
- Now uses the new [tableformatter](https://github.com/python-tableformatter/tableformatter)
|
|
1196
1267
|
module which looks better than `tabulate`
|
|
@@ -1224,7 +1295,7 @@
|
|
|
1224
1295
|
- Enhancements
|
|
1225
1296
|
- Automatic completion of `argparse` arguments via `cmd2.argparse_completer.AutoCompleter`
|
|
1226
1297
|
- See the
|
|
1227
|
-
[tab_autocompletion.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1298
|
+
[tab_autocompletion.py](https://github.com/python-cmd2/cmd2/blob/main/examples/tab_autocompletion.py)
|
|
1228
1299
|
example for a demonstration of how to use this feature
|
|
1229
1300
|
- `cmd2` no longer depends on the `six` module
|
|
1230
1301
|
- `cmd2` is now a multi-file Python package instead of a single-file module
|
|
@@ -1262,7 +1333,7 @@
|
|
|
1262
1333
|
[Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html)
|
|
1263
1334
|
section of the documentation for more information on these decorators
|
|
1264
1335
|
- Alternatively, see the
|
|
1265
|
-
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1336
|
+
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/main/examples/argparse_example.py)
|
|
1266
1337
|
- Deleted `cmd_with_subs_completer`, `get_subcommands`, and `get_subcommand_completer`
|
|
1267
1338
|
- Replaced by default AutoCompleter implementation for all commands using argparse
|
|
1268
1339
|
- Deleted support for old method of calling application commands with `cmd()` and `self`
|
|
@@ -1292,12 +1363,10 @@
|
|
|
1292
1363
|
## 0.8.5 (April 15, 2018)
|
|
1293
1364
|
|
|
1294
1365
|
- Bug Fixes
|
|
1295
|
-
|
|
1296
1366
|
- Fixed a bug with all argument decorators where the wrapped function wasn't returning a value
|
|
1297
1367
|
and thus couldn't cause the cmd2 app to quit
|
|
1298
1368
|
|
|
1299
1369
|
- Enhancements
|
|
1300
|
-
|
|
1301
1370
|
- Added support for verbose help with -v where it lists a brief summary of what each command
|
|
1302
1371
|
does
|
|
1303
1372
|
- Added support for categorizing commands into groups within the help menu
|
|
@@ -1305,7 +1374,7 @@
|
|
|
1305
1374
|
[Grouping Commands](http://cmd2.readthedocs.io/en/latest/argument_processing.html?highlight=verbose#grouping-commands)
|
|
1306
1375
|
section of the docs for more info
|
|
1307
1376
|
- See
|
|
1308
|
-
[help_categories.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1377
|
+
[help_categories.py](https://github.com/python-cmd2/cmd2/blob/main/examples/help_categories.py)
|
|
1309
1378
|
for an example
|
|
1310
1379
|
- Tab completion of paths now supports ~user user path expansion
|
|
1311
1380
|
- Simplified implementation of various tab completion functions so they no longer require
|
|
@@ -1329,12 +1398,10 @@
|
|
|
1329
1398
|
## 0.8.3 (April 09, 2018)
|
|
1330
1399
|
|
|
1331
1400
|
- Bug Fixes
|
|
1332
|
-
|
|
1333
1401
|
- Fixed `help` command not calling functions for help topics
|
|
1334
1402
|
- Fixed not being able to use quoted paths when redirecting with `<` and `>`
|
|
1335
1403
|
|
|
1336
1404
|
- Enhancements
|
|
1337
|
-
|
|
1338
1405
|
- Tab completion has been overhauled and now supports completion of strings with quotes and
|
|
1339
1406
|
spaces.
|
|
1340
1407
|
- Tab completion will automatically add an opening quote if a string with a space is completed.
|
|
@@ -1357,8 +1424,8 @@
|
|
|
1357
1424
|
- `cmd_with_subs_completer()` no longer takes an argument called `base`. Adding tab completion
|
|
1358
1425
|
to subcommands has been simplified to declaring it in the subcommand parser's default
|
|
1359
1426
|
settings. This easily allows arbitrary completers like path_complete to be used. See
|
|
1360
|
-
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1361
|
-
|
|
1427
|
+
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/main/examples/subcommands.py) for an
|
|
1428
|
+
example of how to use tab completion in subcommands. In addition, the docstring for
|
|
1362
1429
|
`cmd_with_subs_completer()` offers more details.
|
|
1363
1430
|
|
|
1364
1431
|
## 0.8.2 (March 21, 2018)
|
|
@@ -1376,12 +1443,12 @@
|
|
|
1376
1443
|
attribute to enable canceling current line instead of quitting when Ctrl+C is typed
|
|
1377
1444
|
- Added possibility of having readline history preservation in a SubMenu
|
|
1378
1445
|
- Added
|
|
1379
|
-
[table_display.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1446
|
+
[table_display.py](https://github.com/python-cmd2/cmd2/blob/main/examples/table_display.py)
|
|
1380
1447
|
example to demonstrate how to display tabular data
|
|
1381
1448
|
- Added command aliasing with `alias` and `unalias` commands
|
|
1382
1449
|
- Added the ability to load an initialization script at startup
|
|
1383
1450
|
- See
|
|
1384
|
-
[alias_startup.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1451
|
+
[alias_startup.py](https://github.com/python-cmd2/cmd2/blob/main/examples/alias_startup.py)
|
|
1385
1452
|
for an example
|
|
1386
1453
|
- Added a default SIGINT handler which terminates any open pipe subprocesses and re-raises a
|
|
1387
1454
|
KeyboardInterrupt
|
|
@@ -1394,14 +1461,14 @@
|
|
|
1394
1461
|
- Fixed a bug in a unit test which would fail if your home directory was empty on a Linux system
|
|
1395
1462
|
- Fixed outdated help text for the **edit** command
|
|
1396
1463
|
- Fixed outdated
|
|
1397
|
-
[remove_unused.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1464
|
+
[remove_unused.py](https://github.com/python-cmd2/cmd2/blob/main/examples/remove_unused.py)
|
|
1398
1465
|
- Enhancements
|
|
1399
1466
|
- Added support for sub-menus.
|
|
1400
|
-
- See [submenus.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1401
|
-
|
|
1467
|
+
- See [submenus.py](https://github.com/python-cmd2/cmd2/blob/main/examples/submenus.py) for
|
|
1468
|
+
an example of how to use it
|
|
1402
1469
|
- Added option for persistent readline history
|
|
1403
1470
|
- See
|
|
1404
|
-
[persistent_history.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1471
|
+
[persistent_history.py](https://github.com/python-cmd2/cmd2/blob/main/examples/persistent_history.py)
|
|
1405
1472
|
for an example
|
|
1406
1473
|
- See the
|
|
1407
1474
|
[Searchable command history](http://cmd2.readthedocs.io/en/latest/freefeatures.html#searchable-command-history)
|
|
@@ -1412,10 +1479,10 @@
|
|
|
1412
1479
|
- `exclude_from_help` and `excludeFromHistory` are now instance instead of class attributes
|
|
1413
1480
|
- Added flag and index based tab completion helper functions
|
|
1414
1481
|
- See
|
|
1415
|
-
[tab_completion.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1482
|
+
[tab_completion.py](https://github.com/python-cmd2/cmd2/blob/main/examples/tab_completion.py)
|
|
1416
1483
|
- Added support for displaying output which won't fit on the screen via a pager using `ppaged()`
|
|
1417
1484
|
- See
|
|
1418
|
-
[paged_output.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1485
|
+
[paged_output.py](https://github.com/python-cmd2/cmd2/blob/main/examples/paged_output.py)
|
|
1419
1486
|
- Attributes Removed (**can cause breaking changes**)
|
|
1420
1487
|
- `abbrev` - Removed support for abbreviated commands
|
|
1421
1488
|
- Good tab completion makes this unnecessary and its presence could cause harmful unintended
|
|
@@ -1442,13 +1509,13 @@
|
|
|
1442
1509
|
- See the [Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html)
|
|
1443
1510
|
section of the documentation for more information on these decorators
|
|
1444
1511
|
- Alternatively, see the
|
|
1445
|
-
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1446
|
-
and [arg_print.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1512
|
+
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/main/examples/argparse_example.py)
|
|
1513
|
+
and [arg_print.py](https://github.com/python-cmd2/cmd2/blob/main/examples/arg_print.py)
|
|
1447
1514
|
examples
|
|
1448
1515
|
- Added support for Argparse subcommands when using the **with_argument_parser** or \*
|
|
1449
1516
|
\*with_argparser_and_unknown_args\*\* decorators
|
|
1450
1517
|
- See
|
|
1451
|
-
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/
|
|
1518
|
+
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/main/examples/subcommands.py)
|
|
1452
1519
|
for an example of how to use subcommands
|
|
1453
1520
|
- Tab completion of subcommand names is automatically supported
|
|
1454
1521
|
- The **\_\_relative_load** command is now hidden from the help menu by default
|
cmd2-3.0.0/GEMINI.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Instructions for Gemini CLI in a `uv` Python project
|
|
2
|
+
|
|
3
|
+
This `GEMINI.md` file provides context and instructions for the Gemini CLI when working with this
|
|
4
|
+
Python 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
|
+
|
|
17
|
+
## Python Code Standards
|
|
18
|
+
|
|
19
|
+
To ensure Python code adheres to required standards, the following commands **must** be run before
|
|
20
|
+
creating or modifying any `.py` files:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
make check
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To run unit tests use the following command:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
make test
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
To make sure the documentation builds properly, use the following command:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
make docs-test
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
All 3 of the above commands should be run prior to committing code.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
.PHONY: install
|
|
3
3
|
install: ## Install the virtual environment with dependencies
|
|
4
4
|
@echo "🚀 Creating uv Python virtual environment"
|
|
5
|
-
@uv python install 3.
|
|
6
|
-
@uv sync --python=3.
|
|
5
|
+
@uv python install 3.14
|
|
6
|
+
@uv sync --python=3.14
|
|
7
7
|
@echo "🚀 Installing Git pre-commit hooks locally"
|
|
8
8
|
@uv run pre-commit install
|
|
9
9
|
@echo "🚀 Installing Prettier using npm"
|
|
@@ -33,8 +33,7 @@ typecheck: ## Perform type checking
|
|
|
33
33
|
.PHONY: test
|
|
34
34
|
test: ## Test the code with pytest.
|
|
35
35
|
@echo "🚀 Testing code: Running pytest"
|
|
36
|
-
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
|
|
37
|
-
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests_isolated
|
|
36
|
+
@uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
|
|
38
37
|
|
|
39
38
|
.PHONY: docs-test
|
|
40
39
|
docs-test: ## Test if documentation can be built without warnings or errors
|
|
@@ -1,61 +1,40 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmd2
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
|
|
5
5
|
Author: cmd2 Contributors
|
|
6
|
-
License:
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2008-2025 Catherine Devlin and others
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in
|
|
18
|
-
all copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
26
|
-
THE SOFTWARE.
|
|
27
|
-
|
|
6
|
+
License-Expression: MIT
|
|
28
7
|
Keywords: CLI,cmd,command,interactive,prompt,Python
|
|
29
8
|
Classifier: Development Status :: 5 - Production/Stable
|
|
30
9
|
Classifier: Environment :: Console
|
|
31
10
|
Classifier: Operating System :: OS Independent
|
|
32
11
|
Classifier: Intended Audience :: Developers
|
|
33
12
|
Classifier: Intended Audience :: System Administrators
|
|
34
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
35
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
36
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
37
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
38
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
39
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
40
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
41
18
|
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
42
20
|
Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
|
|
43
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
44
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.10
|
|
45
23
|
Description-Content-Type: text/markdown
|
|
46
24
|
License-File: LICENSE
|
|
25
|
+
Requires-Dist: backports.strenum; python_version == "3.10"
|
|
47
26
|
Requires-Dist: gnureadline>=8; platform_system == "Darwin"
|
|
48
|
-
Requires-Dist: pyperclip>=1.8
|
|
27
|
+
Requires-Dist: pyperclip>=1.8.2
|
|
49
28
|
Requires-Dist: pyreadline3>=3.4; platform_system == "Windows"
|
|
29
|
+
Requires-Dist: rich>=14.1.0
|
|
50
30
|
Requires-Dist: rich-argparse>=1.7.1
|
|
51
|
-
Requires-Dist: wcwidth>=0.2.10
|
|
52
31
|
Dynamic: license-file
|
|
53
32
|
|
|
54
33
|
<h1 align="center">cmd2 : immersive interactive command line applications</h1>
|
|
55
34
|
|
|
56
35
|
[](https://pypi.python.org/pypi/cmd2/)
|
|
57
36
|
[](https://github.com/python-cmd2/cmd2/actions?query=workflow%3ACI)
|
|
58
|
-
[](https://codecov.io/gh/python-cmd2/cmd2)
|
|
59
38
|
[](http://cmd2.readthedocs.io/en/latest/?badge=latest)
|
|
60
39
|
<a href="https://discord.gg/RpVG6tk"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg" alt="Chat"></a>
|
|
61
40
|
|
|
@@ -69,7 +48,7 @@ Dynamic: license-file
|
|
|
69
48
|
<a href="#projects-using-cmd2">Projects using cmd2</a> •
|
|
70
49
|
</p>
|
|
71
50
|
|
|
72
|
-
[](https://youtu.be/DDU_JH6cFsA)
|
|
73
52
|
|
|
74
53
|
cmd2 is a tool for building interactive command line applications in Python. Its goal is to make it
|
|
75
54
|
quick and easy for developers to build feature-rich and user-friendly interactive command line
|
|
@@ -78,9 +57,14 @@ applications. It provides a simple API which is an extension of Python's built-i
|
|
|
78
57
|
of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
|
|
79
58
|
when using cmd.
|
|
80
59
|
|
|
60
|
+
> :warning: **`cmd2` 3.0.0 has been released and there are some significant backwards
|
|
61
|
+
> incompatibilities from version `2.x`. Please see the
|
|
62
|
+
> [Migration Guide](https://cmd2.readthedocs.io/en/latest/upgrades/) for tips on upgrading from
|
|
63
|
+
> `cmd2` 2.x to 3.x.**
|
|
64
|
+
|
|
81
65
|
## The developers toolbox
|
|
82
66
|
|
|
83
|
-

|
|
84
68
|
|
|
85
69
|
When creating solutions developers have no shortage of tools to create rich and smart user
|
|
86
70
|
interfaces. System administrators have long been duct taping together brittle workflows based on a
|
|
@@ -88,7 +72,7 @@ menagerie of simple command line tools created by strangers on github and the gu
|
|
|
88
72
|
Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to
|
|
89
73
|
fade quickly. On the other hand, Web and traditional desktop GUIs are first in class when it comes
|
|
90
74
|
to easily discovering functionality. The price we pay for beautifully colored displays is complexity
|
|
91
|
-
required to aggregate
|
|
75
|
+
required to aggregate disparate applications into larger systems. `cmd2` fills the niche between
|
|
92
76
|
high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart
|
|
93
77
|
workflow automation systems.
|
|
94
78
|
|
|
@@ -136,7 +120,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
|
|
|
136
120
|
pip install -U cmd2
|
|
137
121
|
```
|
|
138
122
|
|
|
139
|
-
cmd2 works with Python 3.
|
|
123
|
+
cmd2 works with Python 3.10+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party
|
|
140
124
|
dependencies. It works with both conventional CPython and free-threaded variants.
|
|
141
125
|
|
|
142
126
|
For information on other installation options, see
|
|
@@ -154,20 +138,16 @@ examples.
|
|
|
154
138
|
|
|
155
139
|
## Tutorials
|
|
156
140
|
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
-
|
|
141
|
+
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/main/examples)
|
|
142
|
+
- Basic cmd2 examples to demonstrate how to use various features
|
|
143
|
+
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
|
144
|
+
- More complex examples that demonstrate more featuers about how to put together a complete
|
|
145
|
+
application
|
|
161
146
|
- [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
|
|
162
147
|
- Basic cookiecutter template for cmd2 application :
|
|
163
148
|
https://github.com/jayrod/cookiecutter-python-cmd2
|
|
164
149
|
- Advanced cookiecutter template with external plugin support :
|
|
165
150
|
https://github.com/jayrod/cookiecutter-python-cmd2-ext-plug
|
|
166
|
-
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/master/examples)
|
|
167
|
-
- Basic cmd2 examples to demonstrate how to use various features
|
|
168
|
-
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
|
169
|
-
- More complex examples that demonstrate more featuers about how to put together a complete
|
|
170
|
-
application
|
|
171
151
|
|
|
172
152
|
## Hello World
|
|
173
153
|
|
|
@@ -180,9 +160,8 @@ import cmd2
|
|
|
180
160
|
class FirstApp(cmd2.Cmd):
|
|
181
161
|
"""A simple cmd2 application."""
|
|
182
162
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
self.poutput('Hello World')
|
|
163
|
+
def do_hello_world(self, _: cmd2.Statement):
|
|
164
|
+
self.poutput('Hello World')
|
|
186
165
|
|
|
187
166
|
|
|
188
167
|
if __name__ == '__main__':
|
|
@@ -224,6 +203,7 @@ reproduce the bug. At a minimum, please state the following:
|
|
|
224
203
|
| [tomcatmanager](https://github.com/tomcatmanager/tomcatmanager) | A command line tool and python library for managing a tomcat server | [tomcatmanager](https://github.com/tomcatmanager) |
|
|
225
204
|
| [Falcon Toolkit](https://github.com/CrowdStrike/Falcon-Toolkit) | Unleash the power of the CrowdStrike Falcon Platform at the CLI | [CrowdStrike](https://github.com/CrowdStrike) |
|
|
226
205
|
| [EXPLIoT](https://gitlab.com/expliot_framework/expliot) | Internet of Things Security Testing and Exploitation framework | [expliot_framework](https://gitlab.com/expliot_framework/) |
|
|
206
|
+
| [Pobshell](https://github.com/pdalloz/pobshell) | A Bash‑like shell for live Python objects: `cd`, `ls`, `cat`, `find` and _CLI piping_ for object code, str values & more | [Peter Dalloz](https://www.linkedin.com/in/pdalloz) |
|
|
227
207
|
|
|
228
208
|
Possibly defunct but still good examples
|
|
229
209
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://pypi.python.org/pypi/cmd2/)
|
|
4
4
|
[](https://github.com/python-cmd2/cmd2/actions?query=workflow%3ACI)
|
|
5
|
-
[](https://codecov.io/gh/python-cmd2/cmd2)
|
|
6
6
|
[](http://cmd2.readthedocs.io/en/latest/?badge=latest)
|
|
7
7
|
<a href="https://discord.gg/RpVG6tk"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg" alt="Chat"></a>
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<a href="#projects-using-cmd2">Projects using cmd2</a> •
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
|
-
[](https://youtu.be/DDU_JH6cFsA)
|
|
20
20
|
|
|
21
21
|
cmd2 is a tool for building interactive command line applications in Python. Its goal is to make it
|
|
22
22
|
quick and easy for developers to build feature-rich and user-friendly interactive command line
|
|
@@ -25,9 +25,14 @@ applications. It provides a simple API which is an extension of Python's built-i
|
|
|
25
25
|
of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
|
|
26
26
|
when using cmd.
|
|
27
27
|
|
|
28
|
+
> :warning: **`cmd2` 3.0.0 has been released and there are some significant backwards
|
|
29
|
+
> incompatibilities from version `2.x`. Please see the
|
|
30
|
+
> [Migration Guide](https://cmd2.readthedocs.io/en/latest/upgrades/) for tips on upgrading from
|
|
31
|
+
> `cmd2` 2.x to 3.x.**
|
|
32
|
+
|
|
28
33
|
## The developers toolbox
|
|
29
34
|
|
|
30
|
-

|
|
31
36
|
|
|
32
37
|
When creating solutions developers have no shortage of tools to create rich and smart user
|
|
33
38
|
interfaces. System administrators have long been duct taping together brittle workflows based on a
|
|
@@ -35,7 +40,7 @@ menagerie of simple command line tools created by strangers on github and the gu
|
|
|
35
40
|
Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to
|
|
36
41
|
fade quickly. On the other hand, Web and traditional desktop GUIs are first in class when it comes
|
|
37
42
|
to easily discovering functionality. The price we pay for beautifully colored displays is complexity
|
|
38
|
-
required to aggregate
|
|
43
|
+
required to aggregate disparate applications into larger systems. `cmd2` fills the niche between
|
|
39
44
|
high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart
|
|
40
45
|
workflow automation systems.
|
|
41
46
|
|
|
@@ -83,7 +88,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
|
|
|
83
88
|
pip install -U cmd2
|
|
84
89
|
```
|
|
85
90
|
|
|
86
|
-
cmd2 works with Python 3.
|
|
91
|
+
cmd2 works with Python 3.10+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party
|
|
87
92
|
dependencies. It works with both conventional CPython and free-threaded variants.
|
|
88
93
|
|
|
89
94
|
For information on other installation options, see
|
|
@@ -101,20 +106,16 @@ examples.
|
|
|
101
106
|
|
|
102
107
|
## Tutorials
|
|
103
108
|
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
-
|
|
109
|
+
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/main/examples)
|
|
110
|
+
- Basic cmd2 examples to demonstrate how to use various features
|
|
111
|
+
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
|
112
|
+
- More complex examples that demonstrate more featuers about how to put together a complete
|
|
113
|
+
application
|
|
108
114
|
- [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
|
|
109
115
|
- Basic cookiecutter template for cmd2 application :
|
|
110
116
|
https://github.com/jayrod/cookiecutter-python-cmd2
|
|
111
117
|
- Advanced cookiecutter template with external plugin support :
|
|
112
118
|
https://github.com/jayrod/cookiecutter-python-cmd2-ext-plug
|
|
113
|
-
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/master/examples)
|
|
114
|
-
- Basic cmd2 examples to demonstrate how to use various features
|
|
115
|
-
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
|
116
|
-
- More complex examples that demonstrate more featuers about how to put together a complete
|
|
117
|
-
application
|
|
118
119
|
|
|
119
120
|
## Hello World
|
|
120
121
|
|
|
@@ -127,9 +128,8 @@ import cmd2
|
|
|
127
128
|
class FirstApp(cmd2.Cmd):
|
|
128
129
|
"""A simple cmd2 application."""
|
|
129
130
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
self.poutput('Hello World')
|
|
131
|
+
def do_hello_world(self, _: cmd2.Statement):
|
|
132
|
+
self.poutput('Hello World')
|
|
133
133
|
|
|
134
134
|
|
|
135
135
|
if __name__ == '__main__':
|
|
@@ -171,6 +171,7 @@ reproduce the bug. At a minimum, please state the following:
|
|
|
171
171
|
| [tomcatmanager](https://github.com/tomcatmanager/tomcatmanager) | A command line tool and python library for managing a tomcat server | [tomcatmanager](https://github.com/tomcatmanager) |
|
|
172
172
|
| [Falcon Toolkit](https://github.com/CrowdStrike/Falcon-Toolkit) | Unleash the power of the CrowdStrike Falcon Platform at the CLI | [CrowdStrike](https://github.com/CrowdStrike) |
|
|
173
173
|
| [EXPLIoT](https://gitlab.com/expliot_framework/expliot) | Internet of Things Security Testing and Exploitation framework | [expliot_framework](https://gitlab.com/expliot_framework/) |
|
|
174
|
+
| [Pobshell](https://github.com/pdalloz/pobshell) | A Bash‑like shell for live Python objects: `cd`, `ls`, `cat`, `find` and _CLI piping_ for object code, str values & more | [Peter Dalloz](https://www.linkedin.com/in/pdalloz) |
|
|
174
175
|
|
|
175
176
|
Possibly defunct but still good examples
|
|
176
177
|
|