AsciiCanvas
The native visual interface for LLMs. Infinite canvas, multi-byte support, copy-pasteable architecture. Build diagrams AI can actually read.
> **"The native visual interface for the LLM era: An infinite, multi-byte ASCII canvas designed to be the shared whiteboard for Humans and AI."** The project is written primarily in TypeScript, distributed under the MIT License license, first published in 2025. Key topics include: ai-context, ascii-art, canvas, diagrams, drawing-tool.
Star History
<a href="https://www.star-history.com/?repos=Sayhi-bzb%2FAsciiCanvas&type=date&logscale=&legend=top-left"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Sayhi-bzb/AsciiCanvas&type=date&theme=dark&legend=top-left" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Sayhi-bzb/AsciiCanvas&type=date&legend=top-left" /> <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Sayhi-bzb/AsciiCanvas&type=date&legend=top-left" /> </picture> </a>[English] | ็ฎไฝไธญๆ
ASCII Canvas
<div align="center"> <img src="public/demo.gif" alt="ASCII Canvas Demo" width="100%" style="border-radius: 6px; border: 1px solid #333; margin: 5px;"> </div> <br /> <p align="center"> <img src="public/Cover.png" alt="ASCII Canvas Cover" width="100%" style="border-radius: 8px; border: 1px solid #333; box-shadow: 0 8px 30px rgba(0,0,0,0.12);"> </p> <p align="center"> <a href="https://ascii-canvas.pages.dev/"> <img src="https://img.shields.io/badge/โจ_Try_Live_Demo-Click_Here-22c55e?style=for-the-badge&logo=rocket" height="40"> </a> </p>"The native visual interface for the LLM era: An infinite, multi-byte ASCII canvas designed to be the shared whiteboard for Humans and AI."
๐ Core Features
ASCII Canvas is a high-performance, collaborative ASCII art creation engine. Unlike traditional whiteboards that output pixels (opaque to LLMs), this engine renders structured, semantic Unicode grids.
It now supports three session modes:
- Freeform: the original infinite ASCII canvas for exploratory drawing.
- Animation: a fixed-size frame timeline for ASCII motion work.
- Structured: an in-progress layout mode for semantic scene construction.
1. High-Performance Rendering
- Multi-layer Architecture: Utilizes three distinct layers (Background, Scratch, and UI) to maintain 60FPS.
- Mode-aware Viewports: Freeform uses an infinite viewport, while Animation uses a fixed camera and bounded canvas.
2. Intelligent Layout Engine
- Setback Inheritance: Smart newline logic automatically detects and maintains indentation.
- Grid-aware Unicode: Native support for CJK characters and Emojis as wide cells, with Nerd Font / PUA icons placed as single-grid symbols.
- Modular Indentation: Professional Tab system shifting cursor by 2 grid units.
- Character Library: Browse Unicode, Nerd Font, Emoji, and Box Drawing characters from a dense right sidebar with character names/tooltips.
3. Animation Workflow
- Fixed Canvas Presets: Start animation sessions with common sizes like
80x25,64x64, and128x128, or enter custom dimensions. - Frame Sidebar: Add, duplicate, delete, reorder, and rename frames from a dedicated left sidebar with compact previews.
- Onion Skin Playback: Toggle ghosted neighboring frames for frame-by-frame ASCII animation.
- Export Ready: Export animations as lightweight JSON, GIF, asciinema
.cast, or ANSI text for the current frame.
4. Distributed Collaboration
- Yjs CRDT Integration: Real-time, low-latency collaborative editing.
- Robust Persistence: High-granularity undo/redo management with local storage sync.
5. Precision Editing & Clipboard
- Anchor Zoning:
Shift + Clickfor rapid rectangular selection. - Mass Fill: Instantly fill active selections with any character.
- Context Hub: Professional menu for Copy, Copy as ANSI, Cut, Paste, and Delete operations.
- ANSI Clipboard: Copy/export SGR foreground, background, and text attributes, and paste standard ESC ANSI or ANSI-like text such as
[38;2;190;24;93m.... - Terminal Style Parsing: Paste supports 8-color, bright 16-color, 256-color, and truecolor SGR forms, plus text attributes like bold, dim, italic, underline, and strikethrough. Reset (
0m) clears foreground, background, and attributes.
Showcase
<div align="center"> <img src="public/Case/Case.webp" width="100%" style="border-radius: 6px; border: 1px solid #333; margin: 5px;" /> </div>Tech Stack
- Frontend: React 18, TypeScript
- State Management: Zustand (Slice Pattern)
- Synchronization: Yjs / Y-IndexedDB
- Gestures: @use-gesture/react
- Animation Export: JSON exchange format, in-browser GIF generation, and simple asciinema
.castframe streams - Terminal Text: SGR foreground/background, text attributes, and ANSI/ANSI-like import/export
- UI Components: Tailwind CSS, Shadcn UI, Radix UI
๐ Getting Started
Installation
bashgit clone https://github.com/Sayhi-bzb/ascii-canvas.git cd ascii-canvas npm install
Development
bashnpm run dev
Build
bashnpm run build
โจ๏ธ Shortcuts Reference
| Action | Shortcut | Description |
|---|---|---|
| Zoning | Drag | Traditional rectangular area selection |
| Anchor Zoning | Shift + Click | Create selection between anchor and current point |
| Mass Fill | Char Key | Fill active selection with the pressed character |
| Smart Newline | Enter | New line with inherited indentation |
| Pave Space | Tab | Shift cursor right by 2 grid units |
| Context Menu | Right Click | Access Copy, Copy as ANSI, Cut, Paste, and Delete |
Paste accepts plain text, app-native rich clipboard data, and ANSI/ANSI-like styled terminal text. Animation sessions also expose timeline controls for frame stepping, playback, loop, ghost toggle, and JSON/GIF/asciinema .cast export from the animation bar/sidebar UI.
๐บ Roadmap
- Multi-layer Canvas rendering engine.
- Real-time collaboration via Yjs.
- Intelligent Indentation & Tab system.
- Context Menu & Clipboard integration.
- Fixed-size animation mode with timeline, onion skin, and export.
- Simple asciinema
.castimport/export for animation frame streams. - ANSI/ANSI-like foreground, background, and text-attribute import/export.
- NES (Next Edit Suggestion): Predictive character placement based on layout patterns.
- AI Chat Integration: Natural language interface for generating canvas components.
- Full ANSI terminal sequence workspace and SVG export support.
๐ License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributors
Showing top 2 contributors by commit count.
