Learn how GitHub built an accessible, multi-terminal-safe ASCII animation for the Copilot CLI using custom tooling, ANSI color roles, and advanced terminal engineering.
Overview
This article details the engineering challenges behind building an animated ASCII banner for GitHub Copilot CLI, revealing how a seemingly simple 3-second animation required over 6,000 lines of TypeScript. It covers terminal rendering constraints, ANSI color inconsistencies, accessibility-first design decisions, and the custom toolchain built to bridge the gap between design and CLI engineering.
What You'll Learn
Why animated ASCII in terminals is a fundamentally harder engineering problem than web animation
How to design a semantic ANSI color system that degrades gracefully across terminals and accessibility settings
How to build frame-based terminal animations using Ink (React for the terminal) with flicker-free rendering
How to separate animation content from styling using typed animation elements and theme mappings in TypeScript
When and why to make CLI animations opt-in for accessibility compliance
Prerequisites & Requirements
- Basic understanding of terminal emulators and ANSI escape codes
- Familiarity with React component patterns (used by Ink for terminal rendering)
- Understanding of TypeScript type systems and interfaces
- Node.js and TypeScript development environment
- Basic awareness of WCAG accessibility guidelines(optional)
Key Questions Answered
Why is building animated ASCII art in a terminal so much harder than web animation?
How do you handle color consistency across different terminal emulators?
How does the Copilot CLI animation avoid flickering during terminal rendering?
What is the architecture for maintaining frame-based ASCII animations in TypeScript?
How do you make CLI animations accessible for screen reader users?
What are the three approaches to handling color in CLI applications?
Can Ink (React for the terminal) handle animations natively?
What custom tools were built for the Copilot CLI ASCII animation workflow?
Key Statistics & Figures
Technologies & Tools
Some links below are affiliate links. We may earn a commission if you make a purchase.
Key Actionable Insights
1Use semantic color roles instead of hardcoded color values when building terminal UIs. Map high-level concepts like 'border', 'highlight', and 'text' to ANSI color codes, then create separate theme mappings for light and dark terminals. This approach ensures your CLI visuals degrade gracefully when users override terminal colors for accessibility.The Copilot CLI team found that ANSI color consistency simply doesn't exist across terminals. Even in 256-color mode, terminals remap colors based on user themes, accessibility settings, and OS-level overrides.
2Treat CLI animations as non-blocking, best-effort enhancements rather than required UI elements. Gate animations behind opt-in flags and automatically skip them in screen-reader mode. This prevents decorative content from degrading the developer experience for users with assistive technologies.Rapid re-renders create auditory clutter for screen readers, and color-based meaning may not be perceivable by low-vision or color-blind users. The Copilot CLI animation is hidden by default and only shown when explicitly enabled.
3When building frame-based terminal animations, separate frame content (plain text) from styling information (color mappings) and timing data. Store colors as coordinate-to-role mappings rather than embedding ANSI codes directly in the frame text. This separation makes animations maintainable and allows theme changes without touching frame data.The Copilot CLI banner's 20 frames covering an 11x78 area with ~10 animation elements per frame would be unmaintainable if colors were embedded directly. The typed AnimationFrame interface with separate content, colors, and duration fields enabled the team to iterate on themes independently.
4Prefer 4-bit ANSI color palettes over 8-bit or truecolor for maximum terminal compatibility and user customizability. While this limits brand palette accuracy, 4-bit colors are one of the few color modes most terminals allow users to customize, which is critical for accessibility.Even modern terminals that support truecolor render colors differently based on themes. The WCAG contrast guidance applies differently to text vs. non-text graphical content in terminals, and the Copilot wordmark had to be treated as non-text content.
5When rendering colored text in Ink components, group consecutive characters with the same color into segments before rendering. This reduces the number of Text component nodes and ANSI escape code sequences, improving rendering performance and reducing flicker in terminals that struggle with rapid updates.The final rendering code maps each character to its color, then groups consecutive same-colored characters into segments, wrapping each segment in a single Ink Text component rather than creating one per character.
6Build custom design tooling when no existing workflow supports your medium. For terminal animations, existing ANSI preview tools don't simulate how different terminals remap colors or handle cursor updates, making accurate design iteration impossible without purpose-built tooling that bridges design and engineering.Cameron Foxly built a custom ASCII animation editor in about an hour using GitHub Copilot because there were virtually no tools for frame-by-frame ASCII editing with multi-color ANSI previews and Ink-ready component export. This tool later became the open-source ASCII Motion project.