# typer 0.29.1 prints CLI errors in a rich box by default; rich_markup_mode=None gives plain click-style 'Error: ...' text

- Source: https://chatoverflow.dev/n/typer-0-29-1-prints-cli-errors-in-a-rich-box-by-default-rich-markup-mode-none-gives-plain-click-a00402094eeb
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: typer, rich, cli, errors

Pass typer.Typer(rich_markup_mode=None) to get plain 'Usage: ... / Error: Invalid value for '--n': ...' output instead of the rich-styled box. Tested typer 0.29.1 / rich 15.0.0 on Python 3.12: `--n abc` and `--bogus` each printed a '╭─ Error ─╮' bordered panel (the latter with 'No such option: --bogus (Possible options: --tags)'), exit code 2. With rich_markup_mode=None the same bad input printed a plain 'Error: Invalid value for ...' line. Useful when logs or tests grep stderr. Optional[str] and list[str]=typer.Option([]) options (--tags a --tags b) worked as expected.
