cmd2 2.7.0__tar.gz → 3.0.0b1__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.0b1}/.pre-commit-config.yaml +4 -4
- {cmd2-2.7.0 → cmd2-3.0.0b1}/CHANGELOG.md +77 -29
- cmd2-3.0.0b1/GEMINI.md +38 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/Makefile +2 -2
- {cmd2-2.7.0 → cmd2-3.0.0b1}/PKG-INFO +22 -44
- {cmd2-2.7.0 → cmd2-3.0.0b1}/README.md +17 -17
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/__init__.py +41 -38
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/argparse_completer.py +80 -81
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/argparse_custom.py +322 -123
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/clipboard.py +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/cmd2.py +1264 -837
- cmd2-3.0.0b1/cmd2/colors.py +270 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/command_definition.py +13 -5
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/constants.py +0 -6
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/decorators.py +41 -104
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/exceptions.py +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/history.py +7 -11
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/parsing.py +12 -17
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/plugin.py +1 -2
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/py_bridge.py +15 -10
- cmd2-3.0.0b1/cmd2/rich_utils.py +451 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/rl_utils.py +12 -8
- cmd2-3.0.0b1/cmd2/string_utils.py +166 -0
- cmd2-3.0.0b1/cmd2/styles.py +72 -0
- cmd2-3.0.0b1/cmd2/terminal_utils.py +144 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/transcript.py +7 -9
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/utils.py +88 -508
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2.egg-info/PKG-INFO +22 -44
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2.egg-info/SOURCES.txt +131 -26
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2.egg-info/requires.txt +4 -1
- cmd2-3.0.0b1/cmd2.png +0 -0
- cmd2-3.0.0b1/docs/api/clipboard.md +3 -0
- cmd2-3.0.0b1/docs/api/colors.md +3 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/index.md +12 -6
- cmd2-3.0.0b1/docs/api/rich_utils.md +3 -0
- cmd2-3.0.0b1/docs/api/rl_utils.md +3 -0
- cmd2-3.0.0b1/docs/api/string_utils.md +3 -0
- cmd2-3.0.0b1/docs/api/styles.md +3 -0
- cmd2-3.0.0b1/docs/api/terminal_utils.md +3 -0
- cmd2-3.0.0b1/docs/api/transcript.md +3 -0
- cmd2-3.0.0b1/docs/api/utils.md +3 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/doc_conventions.md +15 -11
- cmd2-3.0.0b1/docs/examples/alternate_event_loops.md +73 -0
- cmd2-2.7.0/docs/examples/first_app.md → cmd2-3.0.0b1/docs/examples/getting_started.md +46 -45
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/examples/index.md +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/argument_processing.md +115 -53
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/builtin_commands.md +23 -25
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/clipboard.md +5 -11
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/commands.md +35 -32
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/completion.md +35 -34
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/disable_commands.md +17 -7
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/embedded_python_shells.md +11 -10
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/generating_output.md +76 -39
- cmd2-3.0.0b1/docs/features/help.md +203 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/history.md +18 -17
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/hooks.md +36 -35
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/index.md +1 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/initialization.md +8 -76
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/misc.md +13 -11
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/modular_commands.md +47 -46
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/multiline_commands.md +5 -5
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/os.md +32 -23
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/packaging.md +15 -22
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/plugins.md +17 -13
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/prompt.md +16 -19
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/redirection.md +7 -5
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/scripting.md +76 -76
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/settings.md +20 -23
- cmd2-3.0.0b1/docs/features/shortcuts_aliases_macros.md +106 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/startup_commands.md +8 -6
- cmd2-3.0.0b1/docs/features/table_creation.md +12 -0
- cmd2-3.0.0b1/docs/features/theme.md +10 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/features/transcripts.md +6 -6
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/index.md +5 -5
- cmd2-3.0.0b1/docs/migrating/incompatibilities.md +45 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/migrating/index.md +2 -2
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/migrating/minimum.md +5 -3
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/migrating/next_steps.md +16 -15
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/migrating/why.md +21 -17
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/overview/alternatives.md +10 -7
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/overview/index.md +4 -4
- cmd2-3.0.0b1/docs/overview/installation.md +123 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/overview/integrating.md +10 -9
- cmd2-3.0.0b1/docs/overview/resources.md +7 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/plugins/external_test.md +4 -4
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/testing.md +7 -7
- cmd2-3.0.0b1/docs/upgrades.md +108 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/@plugins_snapshot.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_ast.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_ast.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_codecs.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_codecs.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_collections_abc.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_collections_abc.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_typeshed/__init__.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_typeshed/__init__.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_typeshed/importlib.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/_typeshed/importlib.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/abc.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/abc.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/argparse.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/argparse.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/builtins.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/builtins.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/codecs.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/codecs.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/collections/__init__.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/collections/__init__.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/collections/abc.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/collections/abc.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/contextlib.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/contextlib.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/dataclasses.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/dataclasses.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/__init__.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/__init__.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/_policybase.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/_policybase.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/charset.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/charset.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/contentmanager.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/contentmanager.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/errors.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/errors.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/header.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/header.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/message.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/message.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/policy.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/email/policy.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/enum.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/enum.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/genericpath.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/genericpath.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/__init__.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/__init__.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/_abc.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/_abc.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/abc.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/abc.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/machinery.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/machinery.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/metadata/__init__.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/metadata/__init__.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/metadata/_meta.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/metadata/_meta.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/readers.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/readers.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/resources/__init__.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/resources/__init__.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/resources/abc.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/importlib/resources/abc.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/io.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/io.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/os/__init__.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/os/__init__.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/os/path.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/os/path.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/pathlib.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/pathlib.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/posixpath.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/posixpath.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/re.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/re.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/resource.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/resource.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sre_compile.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sre_compile.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sre_constants.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sre_constants.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sre_parse.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sre_parse.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/subprocess.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/subprocess.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sys/__init__.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sys/__init__.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sys/_monitoring.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/sys/_monitoring.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/types.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/types.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/typing.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/typing.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/typing_extensions.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/typing_extensions.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/zipfile/__init__.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/zipfile/__init__.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/zipfile/_path.data.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/3.12/zipfile/_path.meta.json +1 -0
- cmd2-3.0.0b1/examples/.mypy_cache/CACHEDIR.TAG +3 -0
- cmd2-3.0.0b1/examples/README.md +93 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/argparse_completion.py +32 -8
- cmd2-3.0.0b1/examples/argparse_example.py +176 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/async_printing.py +9 -9
- cmd2-3.0.0b1/examples/cmd2_history.dat +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/cmd_as_argument.py +1 -1
- cmd2-3.0.0b1/examples/color.py +51 -0
- cmd2-3.0.0b1/examples/command_sets.py +162 -0
- cmd2-3.0.0b1/examples/custom_parser.py +55 -0
- cmd2-2.7.0/examples/initialization.py → cmd2-3.0.0b1/examples/getting_started.py +50 -16
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/help_categories.py +10 -8
- cmd2-2.7.0/examples/modular_commands_main.py → cmd2-3.0.0b1/examples/modular_commands.py +6 -5
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/python_scripting.py +9 -5
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/remove_builtin_commands.py +1 -1
- cmd2-3.0.0b1/examples/rich_tables.py +123 -0
- cmd2-3.0.0b1/examples/rich_theme.py +51 -0
- cmd2-2.7.0/examples/example.py → cmd2-3.0.0b1/examples/transcript_example.py +3 -3
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/transcripts/exampleSession.txt +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/transcripts/transcript_regex.txt +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0b1}/mkdocs.yml +12 -3
- cmd2-3.0.0b1/package.json +6 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/README.md +2 -2
- {cmd2-2.7.0/plugins/template → cmd2-3.0.0b1/plugins/ext_test}/build-pyenvs.sh +2 -2
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/cmd2_ext_test/cmd2_ext_test.py +1 -2
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/noxfile.py +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/pyproject.toml +18 -32
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/setup.py +2 -3
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/README.md +13 -17
- {cmd2-2.7.0/plugins/ext_test → cmd2-3.0.0b1/plugins/template}/build-pyenvs.sh +2 -2
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/noxfile.py +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/setup.py +1 -2
- {cmd2-2.7.0 → cmd2-3.0.0b1}/pyproject.toml +6 -12
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tasks.py +2 -3
- cmd2-3.0.0b1/tests/conftest.py +166 -0
- cmd2-3.0.0b1/tests/pyscript/stdout_capture.py +4 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_argparse.py +47 -50
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_argparse_completer.py +52 -45
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_argparse_custom.py +10 -33
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_cmd2.py +616 -348
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_completion.py +107 -13
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_future_annotations.py +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_history.py +25 -37
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_parsing.py +2 -2
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_plugin.py +1 -1
- cmd2-3.0.0b1/tests/test_rich_utils.py +331 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_run_pyscript.py +35 -31
- cmd2-3.0.0b1/tests/test_string_utils.py +215 -0
- cmd2-3.0.0b1/tests/test_terminal_utils.py +81 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_transcript.py +2 -3
- cmd2-3.0.0b1/tests/test_utils.py +376 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/from_cmdloop.txt +1 -1
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests_isolated/test_commandset/conftest.py +2 -44
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests_isolated/test_commandset/test_argparse_subcommands.py +20 -20
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests_isolated/test_commandset/test_commandset.py +19 -19
- cmd2-2.7.0/cmd2/ansi.py +0 -1093
- cmd2-2.7.0/cmd2/table_creator.py +0 -1122
- 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/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/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 → cmd2-3.0.0b1}/.prettierignore +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/.prettierrc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/LICENSE +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/MANIFEST.in +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2/py.typed +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2.egg-info/dependency_links.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/cmd2.egg-info/top_level.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/codecov.yml +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/argparse_completer.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/argparse_custom.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/cmd.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/command_definition.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/constants.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/decorators.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/exceptions.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/history.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/parsing.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/plugin.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/api/py_bridge.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/examples/examples.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/javascripts/readthedocs.js +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/overrides/main.html +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/plugins/index.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/stylesheets/cmd2.css +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/docs/stylesheets/readthedocs.css +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/.cmd2rc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/basic_completion.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/default_categories.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/dynamic_commands.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/environment.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/event_loops.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/exit_code.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/hello_cmd2.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/hooks.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/migrating.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/modular_commands/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/modular_commands/commandset_basic.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/modular_commands/commandset_complex.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/modular_commands/commandset_custominit.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/paged_output.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/persistent_history.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/pretty_print.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/read_input.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/remove_settable.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/scripts/arg_printer.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/scripts/conditional.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/scripts/nested.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/scripts/quit.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/scripts/save_help_text.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/scripts/script.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/scripts/script.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/tmux_launch.sh +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/tmux_split.sh +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/transcripts/pirate.transcript +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/transcripts/quit.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/examples/unicode_commands.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/README.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/CHANGELOG.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/cmd2_ext_test/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/cmd2_ext_test/py.typed +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/cmd2_ext_test/pylintrc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/examples/example.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/tasks.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/tests/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/tests/pylintrc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/ext_test/tests/test_ext_test.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/tasks.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/CHANGELOG.md +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/LICENSE +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/cmd2_myplugin/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/cmd2_myplugin/myplugin.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/cmd2_myplugin/pylintrc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/examples/example.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/tasks.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/tests/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/tests/pylintrc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/plugins/template/tests/test_myplugin.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/setup.cfg +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/.cmd2rc +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/pyscript/echo.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/pyscript/environment.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/pyscript/help.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/pyscript/py_locals.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/pyscript/pyscript_dir.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/pyscript/raises_exception.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/pyscript/recursive.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/pyscript/self_in_py.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/pyscript/stop.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/relative_multiple.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/script.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/script.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/scripts/binary.bin +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/scripts/empty.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/scripts/help.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/scripts/nested.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/scripts/one_down.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/scripts/postcmds.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/scripts/precmds.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/scripts/utf8.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/test_utils_defining_class.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/bol_eol.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/characterclass.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/dotstar.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/extension_notation.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/failure.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/multiline_no_regex.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/multiline_regex.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/no_output.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/no_output_last.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/singleslash.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/slashes_escaped.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/slashslash.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/spaces.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests/transcripts/word_boundaries.txt +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests_isolated/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests_isolated/test_commandset/__init__.py +0 -0
- {cmd2-2.7.0 → cmd2-3.0.0b1}/tests_isolated/test_commandset/test_categories.py +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,7 +9,7 @@ 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.13.0"
|
13
13
|
hooks:
|
14
14
|
- id: ruff-format
|
15
15
|
args: [--config=pyproject.toml]
|
@@ -21,5 +21,5 @@ repos:
|
|
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,56 @@
|
|
1
|
+
## 3.0.0 (TBD, 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
|
+
- Consolidated all string styling functions from `ansi.py` into `string_utils.py`
|
20
|
+
- Replaced all text style enums from `ansi.py` with modern `rich` styles
|
21
|
+
- Renamed `ansi.py` to `terminal_utils.py` to better reflect its purpose
|
22
|
+
- Dropped support for Python 3.9. `cmd2` now requires Python 3.10 or later
|
23
|
+
- Replaced `Settable.get_value()` and `Settable.set_value()` methods with a more Pythonic
|
24
|
+
`value` property
|
25
|
+
- Removed redundant setting of a parser's `prog` value in the `with_argparser()` decorator, as
|
26
|
+
this is now handled centrally in `Cmd._build_parser()`
|
27
|
+
|
28
|
+
- Enhancements
|
29
|
+
- Enhanced all print methods (`poutput()`, `perror()`, `ppaged()`, etc.) to natively render
|
30
|
+
`rich` objects, enabling beautiful and complex output
|
31
|
+
- Simplified the process for setting a custom parser for `cmd2`'s built-in commands. See the
|
32
|
+
[custom_parser.py](https://github.com/python-cmd2/cmd2/blob/main/examples/custom_parser.py)
|
33
|
+
example for an updated guide
|
34
|
+
- Introduced `Cmd.macro_arg_complete()` for tab-completing macro arguments, with default path
|
35
|
+
completion that can be easily customized
|
36
|
+
- Added `colors.py` and `styles.py` to provide easy access to `rich` color names and manage
|
37
|
+
`cmd2`-specific style definitions using `StrEnum` (see the
|
38
|
+
[colors.py](https://github.com/python-cmd2/cmd2/blob/main/examples/color.py) example for a
|
39
|
+
demonstration of all colors available to your `cmd2` application)
|
40
|
+
- Added ability to create a custom theme for a `cmd2` application using `rich_utils.set_theme`
|
41
|
+
(see the [rich_theme.py](https://github.com/python-cmd2/cmd2/blob/main/examples/rich_theme.py)
|
42
|
+
example for more info)
|
43
|
+
- Consolidated multiple redundant examples into a few more comprehensive ones, see:
|
44
|
+
- [argparse_example.py](https://github.com/python-cmd2/cmd2/blob/main/examples/argparse_example.py)
|
45
|
+
- [command_sets.py](https://github.com/python-cmd2/cmd2/blob/main/examples/command_sets.py)
|
46
|
+
- [getting_started.py](https://github.com/python-cmd2/cmd2/blob/main/examples/getting_started.py)
|
47
|
+
- Optimized performance of terminal fixup during command finalization by replacing `stty sane`
|
48
|
+
with `termios.tcsetattr`
|
49
|
+
|
50
|
+
- Bug Fixes
|
51
|
+
- Fixed a redirection bug where `cmd2` could unintentionally overwrite an application's
|
52
|
+
`sys.stdout`
|
53
|
+
|
1
54
|
## 2.7.0 (June 30, 2025)
|
2
55
|
|
3
56
|
- Enhancements
|
@@ -6,7 +59,6 @@
|
|
6
59
|
## 2.6.2 (June 26, 2025)
|
7
60
|
|
8
61
|
- Enhancements
|
9
|
-
|
10
62
|
- Added explicit support for free-threaded versions of Python, starting with version 3.14
|
11
63
|
|
12
64
|
- Bug Fixes
|
@@ -101,7 +153,7 @@
|
|
101
153
|
prompts.
|
102
154
|
- This fix introduces behavior where an updated prompt won't display after an aborted search
|
103
155
|
until a user presses Enter. See
|
104
|
-
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/
|
156
|
+
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/main/examples/async_printing.py)
|
105
157
|
example for how to handle this case using `Cmd.need_prompt_refresh()` and
|
106
158
|
`Cmd.async_refresh_prompt()`.
|
107
159
|
- Enhancements
|
@@ -321,8 +373,8 @@
|
|
321
373
|
persistent history files created with versions older than 2.0.0 are not compatible.
|
322
374
|
- Enhancements
|
323
375
|
- 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
|
-
|
376
|
+
See [read_input.py](https://github.com/python-cmd2/cmd2/blob/main/examples/read_input.py) for
|
377
|
+
an example.
|
326
378
|
- Added `cmd2.exceptions.PassThroughException` to raise unhandled command exceptions instead of
|
327
379
|
printing them.
|
328
380
|
- Added support for ANSI styles and newlines in tab completion results using
|
@@ -534,7 +586,7 @@
|
|
534
586
|
- See [table_creation](https://cmd2.readthedocs.io/en/latest/features/table_creation.html)
|
535
587
|
documentation for an overview.
|
536
588
|
- See
|
537
|
-
[table_creation.py](https://github.com/python-cmd2/cmd2/blob/
|
589
|
+
[table_creation.py](https://github.com/python-cmd2/cmd2/blob/main/examples/table_creation.py)
|
538
590
|
for an example.
|
539
591
|
- Added the following exceptions to the public API
|
540
592
|
- `SkipPostcommandHooks` - Custom exception class for when a command has a failure bad
|
@@ -786,7 +838,7 @@
|
|
786
838
|
- Greatly simplified using argparse-based tab completion. The new interface is a complete
|
787
839
|
overhaul that breaks the previous way of specifying completion and choices functions. See
|
788
840
|
header of
|
789
|
-
[argparse_custom.py](https://github.com/python-cmd2/cmd2/blob/
|
841
|
+
[argparse_custom.py](https://github.com/python-cmd2/cmd2/blob/main/cmd2/argparse_custom.py)
|
790
842
|
for more information.
|
791
843
|
- Enabled tab completion on multiline commands
|
792
844
|
- **Renamed Commands Notice**
|
@@ -1109,7 +1161,7 @@
|
|
1109
1161
|
- Added `async_alert`, `async_update_prompt`, and `set_window_title` functions
|
1110
1162
|
- These allow you to provide feedback to the user in an asynchronous fashion, meaning alerts
|
1111
1163
|
can display when the user is still entering text at the prompt. See
|
1112
|
-
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/
|
1164
|
+
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/main/examples/async_printing.py)
|
1113
1165
|
for an example.
|
1114
1166
|
- Cross-platform colored output support
|
1115
1167
|
- `colorama` gets initialized properly in `Cmd.__init()`
|
@@ -1147,7 +1199,7 @@
|
|
1147
1199
|
- New dependency on `attrs` third party module
|
1148
1200
|
- Added `matches_sorted` member to support custom sorting of tab completion matches
|
1149
1201
|
- Added
|
1150
|
-
[tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/
|
1202
|
+
[tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/main/examples/tab_autocomp_dynamic.py)
|
1151
1203
|
example
|
1152
1204
|
- Demonstrates updating the argparse object during init instead of during class construction
|
1153
1205
|
- Deprecations
|
@@ -1190,7 +1242,7 @@
|
|
1190
1242
|
- If `chop` is `False`, then `self.pager` is used as the pager
|
1191
1243
|
- Otherwise `self.pager_chop` is used as the pager
|
1192
1244
|
- Greatly improved the
|
1193
|
-
[table_display.py](https://github.com/python-cmd2/cmd2/blob/
|
1245
|
+
[table_display.py](https://github.com/python-cmd2/cmd2/blob/main/examples/table_display.py)
|
1194
1246
|
example
|
1195
1247
|
- Now uses the new [tableformatter](https://github.com/python-tableformatter/tableformatter)
|
1196
1248
|
module which looks better than `tabulate`
|
@@ -1224,7 +1276,7 @@
|
|
1224
1276
|
- Enhancements
|
1225
1277
|
- Automatic completion of `argparse` arguments via `cmd2.argparse_completer.AutoCompleter`
|
1226
1278
|
- See the
|
1227
|
-
[tab_autocompletion.py](https://github.com/python-cmd2/cmd2/blob/
|
1279
|
+
[tab_autocompletion.py](https://github.com/python-cmd2/cmd2/blob/main/examples/tab_autocompletion.py)
|
1228
1280
|
example for a demonstration of how to use this feature
|
1229
1281
|
- `cmd2` no longer depends on the `six` module
|
1230
1282
|
- `cmd2` is now a multi-file Python package instead of a single-file module
|
@@ -1262,7 +1314,7 @@
|
|
1262
1314
|
[Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html)
|
1263
1315
|
section of the documentation for more information on these decorators
|
1264
1316
|
- Alternatively, see the
|
1265
|
-
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/
|
1317
|
+
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/main/examples/argparse_example.py)
|
1266
1318
|
- Deleted `cmd_with_subs_completer`, `get_subcommands`, and `get_subcommand_completer`
|
1267
1319
|
- Replaced by default AutoCompleter implementation for all commands using argparse
|
1268
1320
|
- Deleted support for old method of calling application commands with `cmd()` and `self`
|
@@ -1292,12 +1344,10 @@
|
|
1292
1344
|
## 0.8.5 (April 15, 2018)
|
1293
1345
|
|
1294
1346
|
- Bug Fixes
|
1295
|
-
|
1296
1347
|
- Fixed a bug with all argument decorators where the wrapped function wasn't returning a value
|
1297
1348
|
and thus couldn't cause the cmd2 app to quit
|
1298
1349
|
|
1299
1350
|
- Enhancements
|
1300
|
-
|
1301
1351
|
- Added support for verbose help with -v where it lists a brief summary of what each command
|
1302
1352
|
does
|
1303
1353
|
- Added support for categorizing commands into groups within the help menu
|
@@ -1305,7 +1355,7 @@
|
|
1305
1355
|
[Grouping Commands](http://cmd2.readthedocs.io/en/latest/argument_processing.html?highlight=verbose#grouping-commands)
|
1306
1356
|
section of the docs for more info
|
1307
1357
|
- See
|
1308
|
-
[help_categories.py](https://github.com/python-cmd2/cmd2/blob/
|
1358
|
+
[help_categories.py](https://github.com/python-cmd2/cmd2/blob/main/examples/help_categories.py)
|
1309
1359
|
for an example
|
1310
1360
|
- Tab completion of paths now supports ~user user path expansion
|
1311
1361
|
- Simplified implementation of various tab completion functions so they no longer require
|
@@ -1329,12 +1379,10 @@
|
|
1329
1379
|
## 0.8.3 (April 09, 2018)
|
1330
1380
|
|
1331
1381
|
- Bug Fixes
|
1332
|
-
|
1333
1382
|
- Fixed `help` command not calling functions for help topics
|
1334
1383
|
- Fixed not being able to use quoted paths when redirecting with `<` and `>`
|
1335
1384
|
|
1336
1385
|
- Enhancements
|
1337
|
-
|
1338
1386
|
- Tab completion has been overhauled and now supports completion of strings with quotes and
|
1339
1387
|
spaces.
|
1340
1388
|
- Tab completion will automatically add an opening quote if a string with a space is completed.
|
@@ -1357,8 +1405,8 @@
|
|
1357
1405
|
- `cmd_with_subs_completer()` no longer takes an argument called `base`. Adding tab completion
|
1358
1406
|
to subcommands has been simplified to declaring it in the subcommand parser's default
|
1359
1407
|
settings. This easily allows arbitrary completers like path_complete to be used. See
|
1360
|
-
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/
|
1361
|
-
|
1408
|
+
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/main/examples/subcommands.py) for an
|
1409
|
+
example of how to use tab completion in subcommands. In addition, the docstring for
|
1362
1410
|
`cmd_with_subs_completer()` offers more details.
|
1363
1411
|
|
1364
1412
|
## 0.8.2 (March 21, 2018)
|
@@ -1376,12 +1424,12 @@
|
|
1376
1424
|
attribute to enable canceling current line instead of quitting when Ctrl+C is typed
|
1377
1425
|
- Added possibility of having readline history preservation in a SubMenu
|
1378
1426
|
- Added
|
1379
|
-
[table_display.py](https://github.com/python-cmd2/cmd2/blob/
|
1427
|
+
[table_display.py](https://github.com/python-cmd2/cmd2/blob/main/examples/table_display.py)
|
1380
1428
|
example to demonstrate how to display tabular data
|
1381
1429
|
- Added command aliasing with `alias` and `unalias` commands
|
1382
1430
|
- Added the ability to load an initialization script at startup
|
1383
1431
|
- See
|
1384
|
-
[alias_startup.py](https://github.com/python-cmd2/cmd2/blob/
|
1432
|
+
[alias_startup.py](https://github.com/python-cmd2/cmd2/blob/main/examples/alias_startup.py)
|
1385
1433
|
for an example
|
1386
1434
|
- Added a default SIGINT handler which terminates any open pipe subprocesses and re-raises a
|
1387
1435
|
KeyboardInterrupt
|
@@ -1394,14 +1442,14 @@
|
|
1394
1442
|
- Fixed a bug in a unit test which would fail if your home directory was empty on a Linux system
|
1395
1443
|
- Fixed outdated help text for the **edit** command
|
1396
1444
|
- Fixed outdated
|
1397
|
-
[remove_unused.py](https://github.com/python-cmd2/cmd2/blob/
|
1445
|
+
[remove_unused.py](https://github.com/python-cmd2/cmd2/blob/main/examples/remove_unused.py)
|
1398
1446
|
- Enhancements
|
1399
1447
|
- Added support for sub-menus.
|
1400
|
-
- See [submenus.py](https://github.com/python-cmd2/cmd2/blob/
|
1401
|
-
|
1448
|
+
- See [submenus.py](https://github.com/python-cmd2/cmd2/blob/main/examples/submenus.py) for
|
1449
|
+
an example of how to use it
|
1402
1450
|
- Added option for persistent readline history
|
1403
1451
|
- See
|
1404
|
-
[persistent_history.py](https://github.com/python-cmd2/cmd2/blob/
|
1452
|
+
[persistent_history.py](https://github.com/python-cmd2/cmd2/blob/main/examples/persistent_history.py)
|
1405
1453
|
for an example
|
1406
1454
|
- See the
|
1407
1455
|
[Searchable command history](http://cmd2.readthedocs.io/en/latest/freefeatures.html#searchable-command-history)
|
@@ -1412,10 +1460,10 @@
|
|
1412
1460
|
- `exclude_from_help` and `excludeFromHistory` are now instance instead of class attributes
|
1413
1461
|
- Added flag and index based tab completion helper functions
|
1414
1462
|
- See
|
1415
|
-
[tab_completion.py](https://github.com/python-cmd2/cmd2/blob/
|
1463
|
+
[tab_completion.py](https://github.com/python-cmd2/cmd2/blob/main/examples/tab_completion.py)
|
1416
1464
|
- Added support for displaying output which won't fit on the screen via a pager using `ppaged()`
|
1417
1465
|
- See
|
1418
|
-
[paged_output.py](https://github.com/python-cmd2/cmd2/blob/
|
1466
|
+
[paged_output.py](https://github.com/python-cmd2/cmd2/blob/main/examples/paged_output.py)
|
1419
1467
|
- Attributes Removed (**can cause breaking changes**)
|
1420
1468
|
- `abbrev` - Removed support for abbreviated commands
|
1421
1469
|
- Good tab completion makes this unnecessary and its presence could cause harmful unintended
|
@@ -1442,13 +1490,13 @@
|
|
1442
1490
|
- See the [Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html)
|
1443
1491
|
section of the documentation for more information on these decorators
|
1444
1492
|
- 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/
|
1493
|
+
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/main/examples/argparse_example.py)
|
1494
|
+
and [arg_print.py](https://github.com/python-cmd2/cmd2/blob/main/examples/arg_print.py)
|
1447
1495
|
examples
|
1448
1496
|
- Added support for Argparse subcommands when using the **with_argument_parser** or \*
|
1449
1497
|
\*with_argparser_and_unknown_args\*\* decorators
|
1450
1498
|
- See
|
1451
|
-
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/
|
1499
|
+
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/main/examples/subcommands.py)
|
1452
1500
|
for an example of how to use subcommands
|
1453
1501
|
- Tab completion of subcommand names is automatically supported
|
1454
1502
|
- The **\_\_relative_load** command is now hidden from the help menu by default
|
cmd2-3.0.0b1/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.
|
@@ -33,8 +33,8 @@ 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
|
37
|
+
@uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests_isolated
|
38
38
|
|
39
39
|
.PHONY: docs-test
|
40
40
|
docs-test: ## Test if documentation can be built without warnings or errors
|
@@ -1,39 +1,16 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cmd2
|
3
|
-
Version:
|
3
|
+
Version: 3.0.0b1
|
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
|
@@ -41,21 +18,22 @@ Classifier: Programming Language :: Python :: 3.13
|
|
41
18
|
Classifier: Programming Language :: Python :: 3.14
|
42
19
|
Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
|
43
20
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
44
|
-
Requires-Python: >=3.
|
21
|
+
Requires-Python: >=3.10
|
45
22
|
Description-Content-Type: text/markdown
|
46
23
|
License-File: LICENSE
|
24
|
+
Requires-Dist: backports.strenum; python_version == "3.10"
|
47
25
|
Requires-Dist: gnureadline>=8; platform_system == "Darwin"
|
48
26
|
Requires-Dist: pyperclip>=1.8
|
49
27
|
Requires-Dist: pyreadline3>=3.4; platform_system == "Windows"
|
28
|
+
Requires-Dist: rich>=14.1.0
|
50
29
|
Requires-Dist: rich-argparse>=1.7.1
|
51
|
-
Requires-Dist: wcwidth>=0.2.10
|
52
30
|
Dynamic: license-file
|
53
31
|
|
54
32
|
<h1 align="center">cmd2 : immersive interactive command line applications</h1>
|
55
33
|
|
56
34
|
[](https://pypi.python.org/pypi/cmd2/)
|
57
35
|
[](https://github.com/python-cmd2/cmd2/actions?query=workflow%3ACI)
|
58
|
-
[](https://codecov.io/gh/python-cmd2/cmd2)
|
59
37
|
[](http://cmd2.readthedocs.io/en/latest/?badge=latest)
|
60
38
|
<a href="https://discord.gg/RpVG6tk"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg" alt="Chat"></a>
|
61
39
|
|
@@ -69,7 +47,7 @@ Dynamic: license-file
|
|
69
47
|
<a href="#projects-using-cmd2">Projects using cmd2</a> •
|
70
48
|
</p>
|
71
49
|
|
72
|
-
[](https://youtu.be/DDU_JH6cFsA)
|
73
51
|
|
74
52
|
cmd2 is a tool for building interactive command line applications in Python. Its goal is to make it
|
75
53
|
quick and easy for developers to build feature-rich and user-friendly interactive command line
|
@@ -78,9 +56,13 @@ applications. It provides a simple API which is an extension of Python's built-i
|
|
78
56
|
of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
|
79
57
|
when using cmd.
|
80
58
|
|
59
|
+
> :warning: **cmd2 is now "feature complete" for the `2.x` branch and is actively working on the
|
60
|
+
> 3.0.0 release on the `main` branch. New features will only be addressed in 3.x moving forwards. If
|
61
|
+
> need be, we will still fix bugs in 2.x.**
|
62
|
+
|
81
63
|
## The developers toolbox
|
82
64
|
|
83
|
-

|
84
66
|
|
85
67
|
When creating solutions developers have no shortage of tools to create rich and smart user
|
86
68
|
interfaces. System administrators have long been duct taping together brittle workflows based on a
|
@@ -88,7 +70,7 @@ menagerie of simple command line tools created by strangers on github and the gu
|
|
88
70
|
Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to
|
89
71
|
fade quickly. On the other hand, Web and traditional desktop GUIs are first in class when it comes
|
90
72
|
to easily discovering functionality. The price we pay for beautifully colored displays is complexity
|
91
|
-
required to aggregate
|
73
|
+
required to aggregate disparate applications into larger systems. `cmd2` fills the niche between
|
92
74
|
high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart
|
93
75
|
workflow automation systems.
|
94
76
|
|
@@ -136,7 +118,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
|
|
136
118
|
pip install -U cmd2
|
137
119
|
```
|
138
120
|
|
139
|
-
cmd2 works with Python 3.
|
121
|
+
cmd2 works with Python 3.10+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party
|
140
122
|
dependencies. It works with both conventional CPython and free-threaded variants.
|
141
123
|
|
142
124
|
For information on other installation options, see
|
@@ -154,20 +136,16 @@ examples.
|
|
154
136
|
|
155
137
|
## Tutorials
|
156
138
|
|
157
|
-
-
|
158
|
-
-
|
159
|
-
|
160
|
-
-
|
139
|
+
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/main/examples)
|
140
|
+
- Basic cmd2 examples to demonstrate how to use various features
|
141
|
+
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
142
|
+
- More complex examples that demonstrate more featuers about how to put together a complete
|
143
|
+
application
|
161
144
|
- [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
|
162
145
|
- Basic cookiecutter template for cmd2 application :
|
163
146
|
https://github.com/jayrod/cookiecutter-python-cmd2
|
164
147
|
- Advanced cookiecutter template with external plugin support :
|
165
148
|
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
149
|
|
172
150
|
## Hello World
|
173
151
|
|
@@ -180,9 +158,8 @@ import cmd2
|
|
180
158
|
class FirstApp(cmd2.Cmd):
|
181
159
|
"""A simple cmd2 application."""
|
182
160
|
|
183
|
-
|
184
|
-
|
185
|
-
self.poutput('Hello World')
|
161
|
+
def do_hello_world(self, _: cmd2.Statement):
|
162
|
+
self.poutput('Hello World')
|
186
163
|
|
187
164
|
|
188
165
|
if __name__ == '__main__':
|
@@ -224,6 +201,7 @@ reproduce the bug. At a minimum, please state the following:
|
|
224
201
|
| [tomcatmanager](https://github.com/tomcatmanager/tomcatmanager) | A command line tool and python library for managing a tomcat server | [tomcatmanager](https://github.com/tomcatmanager) |
|
225
202
|
| [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
203
|
| [EXPLIoT](https://gitlab.com/expliot_framework/expliot) | Internet of Things Security Testing and Exploitation framework | [expliot_framework](https://gitlab.com/expliot_framework/) |
|
204
|
+
| [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
205
|
|
228
206
|
Possibly defunct but still good examples
|
229
207
|
|
@@ -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,13 @@ 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 is now "feature complete" for the `2.x` branch and is actively working on the
|
29
|
+
> 3.0.0 release on the `main` branch. New features will only be addressed in 3.x moving forwards. If
|
30
|
+
> need be, we will still fix bugs in 2.x.**
|
31
|
+
|
28
32
|
## The developers toolbox
|
29
33
|
|
30
|
-

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