Skip to main content

Local-first drawing tool

Project description

draw

Local-first, sketch-style drawing tool. Excalidraw-inspired, built on Rust with a vanilla JS frontend.

Single binary. No cloud. Your drawings live in ~/.config/draw/drawings/.

Features

  • 9 tools: Select, Rectangle, Ellipse, Diamond, Line, Arrow, Pen (freedraw), Text, Eraser
  • Sketch-style fills: hachure (diagonal lines), cross-hatch, solid, none
  • Full interactions: drag, resize, multi-select, rubber band, pan (scroll/space+drag), zoom (ctrl+scroll)
  • Undo/redo: all operations, including batched multi-element changes
  • Copy/paste/duplicate with proper ID remapping
  • Z-ordering: bring to front/back/forward/backward
  • Styles: stroke color/width/dash, fill color/pattern/density, opacity, font
  • Export: SVG and PNG
  • Document management: auto-save, dirty indicator, rename, list
  • Desktop app: native window via webview (same UI, no browser needed)
  • Python bindings: import dkdc_draw
  • Keyboard-driven: full shortcut set, ? for help overlay

Install

From source (Rust)

cargo install dkdc-draw --features webapp

From source (Python)

uv tool install dkdc-draw

Development

bin/setup    # install dependencies
bin/install  # build and install CLI

Usage

draw --webapp       # launch web UI
draw --app          # launch desktop app
draw new [name]     # create new drawing
draw open <file>    # open .draw.json file
draw list           # list saved drawings
draw export-svg <file> [-o output.svg]
draw export-png <file> [-o output.png] [--scale 2.0]

Python

import dkdc_draw

doc = dkdc_draw.new_document("sketch")
dkdc_draw.save_document(doc, "sketch.draw.json")
svg = dkdc_draw.export_svg(doc)

Keyboard shortcuts

Key Action
V Select
R Rectangle
O Ellipse
D Diamond
L Line
A Arrow
P Pen (freedraw)
T Text
E Eraser
G Toggle grid snap
? Help overlay
Ctrl+Z Undo
Ctrl+Shift+Z Redo
Ctrl+S Save
Ctrl+A Select all
Ctrl+D Duplicate
Delete Delete selected
] / [ Bring to front / Send to back

Architecture

crates/
  draw-core/     Document model, serialization, SVG/PNG export, tiny-skia renderer
  draw-cli/      CLI binary (clap)
  draw-webapp/   Axum web server (port 1213) + embedded vanilla JS frontend
  draw-app/      Desktop app (wry webview)
  draw-wasm/     WASM bindings for the renderer
  draw-py/       PyO3 Python bindings

Development

bin/build    # build all (Rust + Python)
bin/check    # run all checks (format, lint, test)
bin/format   # format all code
bin/test     # run all tests

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dkdc_draw-0.2.0.tar.gz (317.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dkdc_draw-0.2.0-cp311-abi3-manylinux_2_39_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.39+ x86-64

dkdc_draw-0.2.0-cp311-abi3-manylinux_2_39_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.39+ ARM64

dkdc_draw-0.2.0-cp311-abi3-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

dkdc_draw-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file dkdc_draw-0.2.0.tar.gz.

File metadata

  • Download URL: dkdc_draw-0.2.0.tar.gz
  • Upload date:
  • Size: 317.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dkdc_draw-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ee277bac0ba28eda730f9483f57e91eb9e6937f0b6cb57ce5c532b2a706903ed
MD5 1f33c3c2e8c3c4b8b04d611649447c27
BLAKE2b-256 8dc4cd3b69f39bd5f9c4668f3cfdb5641e0eff3b77c654414a9e369523199a82

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.2.0.tar.gz:

Publisher: release-python.yml on dkdc-io/draw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_draw-0.2.0-cp311-abi3-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_draw-0.2.0-cp311-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 43bb97bb9b1eb191c3c01bccda26d30168ccf4dfe0e5720cacc29348ae82d828
MD5 59d23f6ae8aebd4917bb6a341c3a29f7
BLAKE2b-256 f52c9d9351ed1ba9ca5eb2b3d1eb9b8e322339d38743e3b18e73204d4f272052

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.2.0-cp311-abi3-manylinux_2_39_x86_64.whl:

Publisher: release-python.yml on dkdc-io/draw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_draw-0.2.0-cp311-abi3-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for dkdc_draw-0.2.0-cp311-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 775cc8f15fcd485921b7cc177bdb6e88f78d31b4913db3fb0d51fe80df849754
MD5 d04eb2941aee733ecbbca55ae7cdd73d
BLAKE2b-256 c7bb128c99fd7c0d8383fa386b584484b70480ca6a31df5516d0aafbf817df5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.2.0-cp311-abi3-manylinux_2_39_aarch64.whl:

Publisher: release-python.yml on dkdc-io/draw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_draw-0.2.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dkdc_draw-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0166eb20be4ac21cc80e76fb03e768d2998e26fcf8a47c0e68971d172971bb3e
MD5 926c6d0cd1535a90c63c8252b7fef677
BLAKE2b-256 08e0b3b32319002e1b8fdd59036aa3d9710f3b57342bdc8d2c355a95c1f5fc7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.2.0-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release-python.yml on dkdc-io/draw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_draw-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_draw-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9af237726b010619005ea3e905363dc799afc293e70ed717962255ab7f52090d
MD5 67b31133295cbe223c74817ea1f24692
BLAKE2b-256 6d80cd3bf173e98b34602c09cfcd36cb565a347ad6c2ac90dd0c0f19501cf4c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: release-python.yml on dkdc-io/draw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page