v5.0.0b2
Pre-release
Pre-release
Changes since v5.0.0b1. All v4 features up to 4.25.2 have been merged into this release. This is hopefully the final beta release before v5.0.0 proper.
Breaking
- Dropped Python 3.10 support (Python 3.10 EoL is Oct 31, 2026) #889
Features
- Dynamic per-parameter shell completion #917
- A
Parameter.completercallable receives aCompletionContextand returns context-aware suggestions, so completions can depend on values only known at runtime (git branches, running containers, rows from a database). Works in bash/zsh/fish. -
def complete_user(ctx): return load_users() # e.g. {"alice": "admin", "bob": "member"} -> {value: description} @app.command def promote(user: Annotated[str, Parameter(completer=complete_user)]): ...
- A
Parameter.metavarand type-derived value placeholders #919- Keyword-only parameters now show a value placeholder in the help panel (e.g.
--config PATH), separating a value's shape from a positional parameter's display identifier. - Set
Parameter.metavarto override the placeholder, or turn it off via the formatter. Closes #885. -
def main(config: Annotated[Path, Parameter(metavar="FILE")]): ... # shows "--config FILE"
- Keyword-only parameters now show a value placeholder in the help panel (e.g.
- Themeable help colors #916
- Every color in the help output is now a bare
cyclopts.*Rich named style, so you can recolor any part of the help page by supplying your own theme; your overrides win over the built-in defaults. - This includes the panel border (
cyclopts.border), the usage line (cyclopts.usage), parameter/command names (cyclopts.name), and the metadata annotation styles ([default],[choices],[required], ...).
- Every color in the help output is now a bare
- Per-group help panel styling via
Group.theme#916- A
Groupcan now carry its own theme (adictor RichTheme) to style just that group's panel independently of the rest of the help page. -
danger = Group("Danger Zone", theme={"cyclopts.border": "red", "cyclopts.name": "bright_red"})
- A
App.interactive_shell()improvements #941- New
introbanner (supports Rich markup;Noneuses the default banner,""prints nothing). - New
historyoption (Truefor a default history-file location, or a path) backed by readline. - New
remap_flagsso barehelp/versionwords at the root map to their long flags. quitwords and registered commands are handled more robustly, with registered commands and meta commands taking precedence over quit words.- readline is now imported lazily.
- New
Full Changelog: v5.0.0b1...v5.0.0b2