A terminal-based design tool for creating ASCII diagrams and designs.
I'll be honest: mot of this code was written by AI (specifically Opus 4.5). This project is mostly experimental and I do not intend it to become a real production-ready big project. For now, it's fun.
The best way to work with this code right now is with AI assistance. The has low abstractions which is easy to read and debug, but it's more difficult to write manually because of the lack of abstractions. AI will help keep everything consistent.
I specifically used Opus 4.5 to work with this. You may find that to be the best model with this structure, but I haven't tried others. When opening PRs, please don't include a bunch of changes unrelated to the intent.
bunx tigma
Currently this requires bun.
# Start with a blank canvas
bun run index.ts
# Open an existing file
bun run index.ts mydesign.tigma
Switch between tools using keyboard shortcuts:
| Key | Tool | Description |
|---|---|---|
M | Move | Select, move, and resize objects |
T | Text | Create and edit text boxes |
R | Rectangle | Draw rectangular shapes with box-drawing characters |
L | Line | Draw lines (horizontal, vertical, or diagonal) |
P | Freehand | Draw freehand curves with pencil |
| Key | Action |
|---|---|
Ctrl+S | Save file (prompts for filename if new) |
Ctrl+Z | Undo |
Ctrl+U | Redo |
Ctrl+D | Copy selected objects to clipboard |
Ctrl+V | Paste at mouse position |
Ctrl+X | Cut (copy and delete) selected objects |
Ctrl+L | Clear canvas (delete all objects) |
Delete / Backspace | Delete selected or hovered object(s) |
Escape | Cancel current drawing / exit text editing |
When a single rectangle is selected and hovered, resize handles appear at:
Drag the handles to resize the rectangle.
| Key | Action |
|---|---|
Ctrl+[ | Move selected object down one layer |
Ctrl+] | Move selected object up one layer |
Home / End to jump to start/endBackspace / Delete to remove charactersCtrl+B to toggle bold mode for new charactersEscape to finish editingA color picker is displayed at the bottom-right of the canvas.
Controls the color of:
Available stroke colors: Transparent, Black, White, Red, Green, Blue, Yellow
Controls the background fill of:
Available fill colors: Transparent, Black, Gray, Muted Red, Muted Green, Muted Blue, Muted Yellow
Transparent (shown as null) means no color is applied, allowing content beneath to show through.
Click on a color swatch to select it. The selected color applies to:
Designs are saved as .tigma files in JSON format. The file stores:
Ctrl+D, paste at mouse position with Ctrl+VR to select the Rectangle toolT to select the Text toolEscape to finish editingM to switch to Move toolCtrl+S to save your work(top 24 of 28)
10,167 followers · starred Dec 2025
8,408 followers · starred Dec 2025
370 followers · starred Dec 2025
1,046 followers · starred Dec 2025
A terminal-based design tool for creating ASCII diagrams and designs.
I'll be honest: mot of this code was written by AI (specifically Opus 4.5). This project is mostly experimental and I do not intend it to become a real production-ready big project. For now, it's fun.
The best way to work with this code right now is with AI assistance. The has low abstractions which is easy to read and debug, but it's more difficult to write manually because of the lack of abstractions. AI will help keep everything consistent.
I specifically used Opus 4.5 to work with this. You may find that to be the best model with this structure, but I haven't tried others. When opening PRs, please don't include a bunch of changes unrelated to the intent.
bunx tigma
Currently this requires bun.
# Start with a blank canvas
bun run index.ts
# Open an existing file
bun run index.ts mydesign.tigma
Switch between tools using keyboard shortcuts:
| Key | Tool | Description |
|---|---|---|
M | Move | Select, move, and resize objects |
T | Text | Create and edit text boxes |
R | Rectangle | Draw rectangular shapes with box-drawing characters |
L | Line | Draw lines (horizontal, vertical, or diagonal) |
P | Freehand | Draw freehand curves with pencil |
| Key | Action |
|---|---|
Ctrl+S | Save file (prompts for filename if new) |
Ctrl+Z | Undo |
Ctrl+U | Redo |
Ctrl+D | Copy selected objects to clipboard |
Ctrl+V | Paste at mouse position |
Ctrl+X | Cut (copy and delete) selected objects |
Ctrl+L | Clear canvas (delete all objects) |
Delete / Backspace | Delete selected or hovered object(s) |
Escape | Cancel current drawing / exit text editing |
When a single rectangle is selected and hovered, resize handles appear at:
Drag the handles to resize the rectangle.
| Key | Action |
|---|---|
Ctrl+[ | Move selected object down one layer |
Ctrl+] | Move selected object up one layer |
Home / End to jump to start/endBackspace / Delete to remove charactersCtrl+B to toggle bold mode for new charactersEscape to finish editingA color picker is displayed at the bottom-right of the canvas.
Controls the color of:
Available stroke colors: Transparent, Black, White, Red, Green, Blue, Yellow
Controls the background fill of:
Available fill colors: Transparent, Black, Gray, Muted Red, Muted Green, Muted Blue, Muted Yellow
Transparent (shown as null) means no color is applied, allowing content beneath to show through.
Click on a color swatch to select it. The selected color applies to:
Designs are saved as .tigma files in JSON format. The file stores:
Ctrl+D, paste at mouse position with Ctrl+VR to select the Rectangle toolT to select the Text toolEscape to finish editingM to switch to Move toolCtrl+S to save your work(top 24 of 28)
10,167 followers · starred Dec 2025
8,408 followers · starred Dec 2025
370 followers · starred Dec 2025
1,046 followers · starred Dec 2025