draw is a small terminal canvas. It opens an alternate screen, tracks mouse input, and renders drawings as ASCII characters with optional ANSI color.
go install github.com/jmcntsh/draw@latestRun it with:
drawIf your Go bin directory is not on your PATH, add it first:
export PATH="$(go env GOPATH)/bin:$PATH"- Drag with the left mouse button to use the current tool.
- Right-click drag to erase.
- Press
b,e,l,r,o,f, orvto choose brush, eraser, line, rectangle, ellipse, fill, or selection. - Press
-for a smaller brush and+for a bigger brush. The footer shows this asbrush 1 (+/- change size). - Press
xto choose the drawing character. - Press
tabto cycle colors, or press1through6to pick a color directly. The first palette color is black. - Press
hto enter a custom hex color, such as#ff8800. - Press
uto undo andctrl+rto redo. - Press
cto clear. - Press
sto save the canvas. Enter a custom name, or leave it blank to use a timestamp. - Press
q,esc, orctrl+cto quit.
Saved drawings are written to the drawings/ directory:
<name>.draw.jsonis the editable native file.<name>.ansi.txtis the colored terminal view.<name>.txtis plain ASCII.
List saved drawings:
draw listPrint a saved drawing:
draw open my-drawingEdit a saved drawing:
draw edit my-drawingStart with a specific canvas size:
draw --size 80x24Export a saved drawing:
draw export my-drawing --format svg
draw export my-drawing --format ansi
draw export my-drawing --format txt