Cmd2

Latest version: v2.5.11

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 17

2.4.3

- Bug Fixes
- Fixed ValueError caused when passing `Cmd.columnize()` strings wider than `display_width`.
- Enhancements
- Renamed `utils.str_to_bool()` -> `utils.to_bool()`.
- Enhanced `utils.to_bool()` so that it accepts and converts `bool`, `int`, and `float` in addition to `str`.

2.4.2

- Enhancements
- Updated argparse decorator to remove annotations when the docstring is used for a command's help text.
- Updated unit test to be Python 3.11 compliant.

2.4.1

- Bug Fixes
- Fixed value for `ansi.Bg.YELLOW`.
- Fixed unit tests for `ansi.allow_style`.
- Enhancements
- `async_alert()` raises a `RuntimeError` if called from the main thread.

2.4.0

- Bug Fixes
- Fixed issue in `ansi.async_alert_str()` which would raise `IndexError` if prompt was blank.
- Fixed issue where tab completion was quoting argparse flags in some cases.
- Enhancements
- Added broader exception handling when enabling clipboard functionality via `pyperclip`.
- Added `PassThroughException` to `__init__.py` imports.
- cmd2 now uses pyreadline3 when running any version of Python on Windows
- Improved memory usage in certain use cases of tables (e.g. nested colored tables)
- Deletions (potentially breaking changes)
- Deleted `cmd2.fg` and `cmd2.bg` which were deprecated in 2.3.0. Use `cmd2.Fg` and `cmd2.Bg` instead.

2.3.3

- Enhancements
- Added clearer exception handling to `BorderedTable` and `SimpleTable`.

2.3.2

- Bug Fixes
- Fixed issue where a `ns_provider` could be passed `None` instead of its correct `cmd2.Cmd` or `CommandSet` value.

Page 3 of 17

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.