Skip to content

Add CLI scroll, stream, and marquee animation#1

Merged
mingjerli merged 13 commits into
mainfrom
feature/cli-scroll-stream
Feb 1, 2026
Merged

Add CLI scroll, stream, and marquee animation#1
mingjerli merged 13 commits into
mainfrom
feature/cli-scroll-stream

Conversation

@mingjerli

Copy link
Copy Markdown
Owner

Summary

  • Add terminal size detection and auto-scaling (7×4 default, scales down for short terminals)
  • Add per-character build animation with scroll-pause cadence for CLI mode
  • Add sliding window that keeps the active character visible when text exceeds terminal width
  • Add marquee-style continuous looping for long text (wraps characters from the right instead of clearing and restarting)
  • Add dot (.) character to supported glyphs
  • Add --instant mode for character-by-character reveal without brick-drop physics
  • Add watch mode and make animation the default
  • Add crates.io metadata, licenses, CI/release workflows, and gitignore
  • Fix all clippy warnings to pass CI linter

Test plan

  • cargo test — all 88 tests pass
  • cargo clippy -- -D warnings — no warnings
  • cargo run --release -- "HELLO WORLD" --speed 80 — on a narrow terminal, text marquees continuously without clearing
  • cargo run --release -- "HELLO WORLD" --instant — instant mode also marquees
  • cargo run --release -- "HI" — short text stops after one pass
  • Visually verify smooth wrap-around spacing at the seam (two blank character gap)

🤖 Generated with Claude Code

mingjerli and others added 13 commits January 31, 2026 16:04
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… by letter, remove scroll mode

Replace raw ANSI cursor-rewind rendering with ratatui Viewport::Inline
for all CLI animation modes. This eliminates manual cursor management
and lets ratatui handle diffing and clipping automatically.

Change --animate to build bricks letter by letter using per-character
ScrollBuildState instead of releasing all bricks in one global sequence.

Remove --scroll, --scroll-speed, and --loop flags (scroll mode removed).
Stream mode retains internal scrolling with a hardcoded speed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Prepare for publishing to crates.io and GitHub Releases:
- Add MIT + Apache-2.0 dual license files
- Add package metadata to Cargo.toml (description, license, repository, keywords)
- Add .gitignore for /target/
- Add CI workflow (clippy + test on push/PR)
- Add release workflow (cross-compiled binaries on tag push)
- Update README with installation instructions and license section
- Commit Cargo.lock for reproducible binary builds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add --watch flag to read lines from stdin and animate each one
- Make animation the default behavior (use --instant to skip)
- Change default color from rainbow to random
- Refactor animation loop into reusable animate_text function
- Update demo.sh to reflect new defaults and add watch mode example

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolve 53 clippy warnings across the codebase:
- Replace manual clamp patterns with .clamp()
- Simplify range comparisons (int_plus_one)
- Use iterator-based loops instead of index-based (needless_range_loop)
- Use struct initialization syntax instead of field reassignment
- Replace write!() with writeln!() where appropriate
- Merge duplicate match arms and collapse nested ifs
- Use matches! macro where applicable

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…t mode

When text exceeds the terminal width, the animation now loops from the
beginning after the last character finishes instead of stopping. Instant
mode (--instant) switches from static rendering to a character-by-character
reveal without brick-drop physics, with the same loop/stop behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Refactor fit_scales to explicitly use SCALE_X/SCALE_Y when the terminal
is tall enough, and only reduce when too short. This ensures CLI output
matches TUI at the default scale. Add test for very tall terminals.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of clearing and restarting from an empty screen, long text now
scrolls continuously with characters wrapping in from the right. Two
blank character slots separate the end from the restart for visual
clarity. Also adds local install instructions to README.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mingjerli mingjerli merged commit 8bb51f0 into main Feb 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant