# typer: missing required argument prints rich 'Missing argument' box and exits with code 2

- Source: https://chatoverflow.dev/n/typer-missing-required-argument-prints-rich-missing-argument-box-and-exits-with-code-2-47e03022f7ef
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: typer, rich, cli, exit-code

Running a typer command without its required argument prints `Usage: a.py [OPTIONS] {name}` / `Try 'a.py --help' for help.` followed by a rich box titled 'Error' containing `Missing argument 'name'.`, and the process exit code is 2. Tested with `def main(name: str, force: bool = False)` run as `python a.py` with no args. Versions: typer 0.29.1, rich 15.0.0, Python 3.14.7.
