Help us improve
Share bugs, ideas, or general feedback.
From python-output-styler
Applies gorgeous terminal styling to Python scripts using Rich with plain-text fallback. Use when creating or modifying Python scripts that produce user-facing terminal output. Use when asked to "style python output", "make python pretty", "add colors to python script", or "improve python terminal UX".
npx claudepluginhub tsilva/claudeskillz --plugin python-output-stylerHow this skill is triggered — by the user, by Claude, or both
Slash command
/python-output-styler:python-output-stylerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Style all user-facing Python script output using the bundled `style.py` module.
Writes Python code using Rich library for styled console output, markup, tables, progress bars, syntax highlighting, pretty printing, logging, and tracebacks.
Guides Typer and Rich best practices for Python CLI apps, covering non-TTY output, table rendering, testing patterns, exception handling, and integration pitfalls.
Provides Python CLI patterns using Typer for commands/groups/options and Rich for tables, progress bars, panels, and error handling in terminal apps.
Share bugs, ideas, or general feedback.
Style all user-facing Python script output using the bundled style.py module.
style.py doesn't exist alongside the target script, copy from references/style.py into the same directoryfrom style import header, success, error, info, sectionprint() statements with styled output function callsinput() prompts with styled_input, confirm, or choose as appropriateprogress for animated feedbackspin for animated spinner feedbackRich is the preferred rendering backend. Install via:
uv run --with rich script.py
When Rich is unavailable, all functions fall back to plain print() output automatically.
| Name | Hex | Rich Markup | Use |
|---|---|---|---|
| Brand | #AF87FF | [bold #AF87FF] | Headers, emphasis |
| Success | #87D787 | [#87D787] | Checkmarks, completion |
| Error | #FF5F5F | [#FF5F5F] | Errors, failures |
| Warning | #FFD75F | [#FFD75F] | Warnings, caution |
| Info | #87CEEB | [#87CEEB] | Info messages, tips |
| Muted | #808080 | [#808080] | Paths, secondary text |
| Function | Symbol | Color | Purpose |
|---|---|---|---|
header(title, subtitle="") | box | Brand | Bordered header panel |
section(text) | ━━ | Brand | Horizontal rule divider |
success(text) | ✓ | Success | Completed actions |
error(text) | ✗ | Error | Error messages |
warn(text) | ⚠ | Warning | Warnings |
info(text) | ● | Info | Informational |
step(text) | → | Muted | Action log (suppressed when quiet) |
note(text) | — | Muted | "Note:" prefixed |
banner(text) | box | Success | Completion banner |
error_block(*lines) | │ | Error | Multi-line error box |
list_item(label, value) | • | Brand+Muted | Key-value display |
dim(text) | — | Muted | De-emphasized text (suppressed when quiet) |
| Function | Purpose |
|---|---|
table(headers, *rows) | Formatted table with headers. headers is a list of strings, each row is a list of strings |
pretty(obj) | Rich inspect for any Python object (falls back to pprint) |
| Function | Returns | Purpose |
|---|---|---|
progress(iterable, label="") | Wrapped iterable | Rich progress bar wrapping any iterable |
spin(title, func, *args, **kwargs) | Function result | Animated spinner wrapping a function call |
| Function | Returns | Purpose |
|---|---|---|
confirm(prompt, default=True) | bool | y/n prompt |
choose(header, *options) | str | Numbered selection menu |
styled_input(prompt, password=False) | str | Styled text input (avoids shadowing built-in input) |
| Old Pattern | New Pattern |
|---|---|
print("Title") + print("=====") | header("Title", "Subtitle") |
print("✓ done") | success("done") |
print("Error: ...") | error("...") |
print("Warning: ...") | warn("...") |
print(" - Label: value") | list_item("Label", "value") |
input("Continue? (y/n) ") | confirm("Continue?") |
print("Section...") between blocks | section("Section") |
print("Note: ...") | note("...") |
| Multi-line error block | error_block("line1", "line2") |
Numbered menu with input() | choose("Pick one:", "A", "B", "C") |
input("Name: ") | styled_input("Name:") |
getpass.getpass("Password: ") | styled_input("Password:", password=True) |
for item in items: ... (slow) | for item in progress(items, "Processing"): ... |
| Long function call with no feedback | result = spin("Installing...", install_pkg, "name") |
pprint(obj) | pretty(obj) |
| Variable | Default | Effect |
|---|---|---|
NO_COLOR | unset | Disables all color output when set to any value |
STYLE_VERBOSE | 1 | 0=quiet (suppresses step/dim), 1=default, 2=verbose |
style.py — never use Rich directly in scriptsstyle.py functions exclusivelystyled_input instead of input for styled prompts to avoid shadowing the built-inconfirm returns a bool — use directly in if confirm("Continue?"): ...spin returns the wrapped function's return value — use: result = spin("Building...", build_fn)choose returns the selected option string — use: choice = choose("Pick:", "A", "B")progress wraps an iterable — use: for item in progress(items, "Processing"): ...spin — only use for functions that take noticeable time