A terminal-based design tool for creating ASCII diagrams and designs.
bunx tigmaCurrently this requires bun.
# Start with a blank canvas
bun run index.ts
# Open an existing file
bun run index.ts mydesign.tigmaSwitch 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) |
| Key | Action |
|---|---|
Ctrl+S |
Save file (prompts for filename if new) |
Ctrl+Z |
Undo |
Ctrl+U |
Redo |
Delete / Backspace |
Delete selected or hovered object(s) |
Escape |
Cancel current drawing / exit text editing |
- Click on an object to select it
- Shift+Click to add/remove objects from selection (multi-select)
- Click+Drag to move selected objects
- Click on empty space to deselect all
- Click+Drag on empty space to box-select multiple items (hold Shift to add)
When a single rectangle is selected and hovered, resize handles appear at:
- Corners (NW, NE, SW, SE)
- Edge midpoints (N, S, E, W)
Drag the handles to resize the rectangle.
| Key | Action |
|---|---|
Ctrl+[ |
Move selected object down one layer |
Ctrl+] |
Move selected object up one layer |
- Click on empty space to create a new text box
- Click on existing text to edit it
- Type to insert characters at cursor
- Arrow keys to move cursor
Home/Endto jump to start/endBackspace/Deleteto remove charactersCtrl+Bto toggle bold mode for new charactersEscapeto finish editing
- Click+Drag to draw a rectangle
- Release to commit the shape
- Rectangle uses current stroke and fill colors
- Bold mode affects border thickness
- Click+Drag to draw a line
- Supports horizontal, vertical, and diagonal lines
- Uses Bresenham's algorithm for diagonal rendering
- Line uses current stroke color
A color picker is displayed at the bottom-right of the canvas.
Controls the color of:
- Text characters
- Rectangle borders
- Lines
Available stroke colors: Transparent, Black, White, Red, Green, Blue, Yellow
Controls the background fill of:
- Rectangles (interior area)
- Text boxes (background)
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:
- New objects you create
- Currently selected objects (immediately updates them)
Designs are saved as .tigma files in JSON format. The file stores:
- Text boxes with per-character styling (bold, color)
- Rectangles with position, stroke color, fill color, and bold state
- Lines with position, stroke color, and bold state
- Z-index ordering for proper layering
- Layered rendering: Objects stack based on z-index; newer objects appear on top by default
- Multi-selection: Select multiple objects with Shift+Click or box-select
- Undo/Redo: Up to 100 history snapshots
- Terminal responsive: Adapts to terminal resize events
- Mouse support: Full mouse interaction including hover highlighting
- Live preview: See rectangles and lines as you draw them
- Press
Rto select the Rectangle tool - Click and drag to draw a box
- Press
Tto select the Text tool - Click inside the box and type a label
- Press
Escapeto finish editing - Press
Mto switch to Move tool - Select objects and adjust positions
- Use the color picker to change colors
- Press
Ctrl+Sto save your work