A sequence of seven visual effects generated entirely inside a sandbox VM and streamed byte-for-byte through the PTY to your local terminal. The script uses nothing but Python stdlib and raw ANSI escape codes — no curses, no ncurses, no external deps.Documentation Index
Fetch the complete documentation index at: https://docs.declaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
Use case
Stress-test the PTY stream with rapid output, truecolor sequences, cursor movement, and full-screen rewrites. If every effect renders cleanly, you can trust the SSE pipe for any TUI workload an agent might produce.What you’ll learn
- Uploading a program with
sbx.files.write()to avoid stdin echo - 256-colour and 24-bit truecolor rendering via ANSI escapes
- Animated spinner and progress bar with
\rline replacement - Box-drawing table output
- Matrix-style rain with cursor-up rewriting (
\e[8A) - Combining
python3 /tmp/show.py && exitin a single PTY send
Prerequisites
Code walkthrough
The driver uploads a show program and runs it through one PTY session:SHOW_PROGRAM (embedded in the source file) runs seven acts:
| # | Effect | Technique |
|---|---|---|
| 1 | Rainbow DECLAW banner | 256-colour \e[38;5;Nm per character |
| 2 | Horizontal gradient | 24-bit truecolor \e[48;2;R;G;Bm |
| 3 | Braille spinner | \r line replace, 40 frames |
| 4 | Progress bar | \r overwrite with % counter |
| 5 | Box-drawing table | +--+ style with colour |
| 6 | Matrix rain | 8-row 60-frame animation via \e[8A |
| 7 | Sign-off message | Plain truecolor text |
Running it
Run in an xterm-compatible terminal (iTerm2, Alacritty, Kitty, modern Terminal.app, or any tmux pane):Full source
Seecookbook/examples/pty-showcase/main.py in the repo.