Comandi tipizzati, output avanzato solo in un terminale, configurazione in un solo file.
Constitution — Python CLI
Version 1.0.0 · Ratified 2026-11-10
These principles hold for every spec, plan and task of the tool. A spec may add rules; it never weakens these.
-
Typed commands. Commands are Typer functions with type hints and
Annotatedoptions, so parsing, validation and help come from the signature. mypy or pyright runs in strict mode in CI. -
Rich output only in a terminal. Tables, colours and progress bars use Rich only when stdout is a TTY; piped output is plain text or JSON with
--json.NO_COLORis respected. -
Config in one file. Settings live in one TOML file in the platform config directory (from
platformdirs), overridable by environment variables and flags in that order.config showprints the effective values and where each came from. -
Fast start and clean errors.
--helpanswers in under 300 ms because heavy imports happen inside commands. Expected errors print one clear line and exit non-zero; tracebacks appear only with--debug. -
Tested and packaged. Commands are tested with Typer's
CliRunnerfor output and exit codes. The tool is packaged with apyproject.tomlentry point and installs cleanly withpipxoruv tool install.