ASCII Animations
Add motion that improves feedback and personality without breaking terminal
compatibility, accessibility, or non-interactive use.
Choose the smallest useful effect
- Use a spinner for indeterminate work.
- Use progress text or a bar when progress is measurable.
- Use a short splash animation only at intentional product moments.
- Use full-screen effects only when the animation is the experience.
- Keep logs and piped output static.
Common libraries
| Language |
Lightweight feedback |
Full TUI/effects |
| Go |
briandowns/spinner |
Bubble Tea, Lip Gloss |
| JavaScript/TypeScript |
ora, cli-spinners |
Ink |
| Rust |
indicatif |
Ratatui, TachyonFX |
| Python |
yaspin |
Textual, asciimatics |
Prefer an existing project dependency or native framework facility before
adding another animation library.
Implementation rules
- Detect whether stdout is an interactive terminal.
- Disable motion for
NO_COLOR, TERM=dumb, CI, redirected output, and an
explicit --no-animation option.
- Never make animation the only signal that work succeeded or failed.
- Hide the cursor only while animating and restore it with cleanup handlers on
success, error, cancellation, and interrupts.
- Render frames into memory and write each frame in one operation.
- Update only changed lines instead of repeatedly clearing the whole screen.
- Use elapsed-time frame selection so slow frames do not permanently drift.
- Cap refresh rates; spinners rarely need more than 10–15 frames per second.
- Test narrow terminals, Unicode-disabled environments, and interrupted runs.
Portable frame format
For custom reusable animations, prefer plain JSON:
{
"interval_ms": 100,
"frames": ["⠋", "⠙", "⠹", "⠸"]
}
Keep a basic ASCII fallback such as | / - \\ for environments without Unicode.
Verification
Run the relevant tests and manually verify interactive, redirected, disabled,
and interrupted behavior. Report any terminal-specific assumptions introduced.
1---2name: ascii-animations3description: Design or implement polished ASCII and ANSI animations for command-line and terminal applications. Use when adding spinners, loading states, splash screens, animated banners, terminal effects, or CLI/TUI motion in Go, JavaScript, TypeScript, Rust, or Python.4---56# ASCII Animations78Add motion that improves feedback and personality without breaking terminal9compatibility, accessibility, or non-interactive use.1011## Choose the smallest useful effect1213- Use a spinner for indeterminate work.14- Use progress text or a bar when progress is measurable.15- Use a short splash animation only at intentional product moments.16- Use full-screen effects only when the animation is the experience.17- Keep logs and piped output static.1819## Common libraries2021| Language | Lightweight feedback | Full TUI/effects |22| --- | --- | --- |23| Go | `briandowns/spinner` | Bubble Tea, Lip Gloss |24| JavaScript/TypeScript | `ora`, `cli-spinners` | Ink |25| Rust | `indicatif` | Ratatui, TachyonFX |26| Python | `yaspin` | Textual, asciimatics |2728Prefer an existing project dependency or native framework facility before29adding another animation library.3031## Implementation rules32331. Detect whether stdout is an interactive terminal.342. Disable motion for `NO_COLOR`, `TERM=dumb`, CI, redirected output, and an35 explicit `--no-animation` option.363. Never make animation the only signal that work succeeded or failed.374. Hide the cursor only while animating and restore it with cleanup handlers on38 success, error, cancellation, and interrupts.395. Render frames into memory and write each frame in one operation.406. Update only changed lines instead of repeatedly clearing the whole screen.417. Use elapsed-time frame selection so slow frames do not permanently drift.428. Cap refresh rates; spinners rarely need more than 10–15 frames per second.439. Test narrow terminals, Unicode-disabled environments, and interrupted runs.4445## Portable frame format4647For custom reusable animations, prefer plain JSON:4849```json50{51 "interval_ms": 100,52 "frames": ["⠋", "⠙", "⠹", "⠸"]53}54```5556Keep a basic ASCII fallback such as `| / - \\` for environments without Unicode.5758## Verification5960Run the relevant tests and manually verify interactive, redirected, disabled,61and interrupted behavior. Report any terminal-specific assumptions introduced.