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.1.1.tar.gz (37.4 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.1.1-cp311-abi3-manylinux_2_34_x86_64.whl (2.2 MB view details)

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

dkdc_draw-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ ARM64

dkdc_draw-0.1.1-cp311-abi3-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

dkdc_draw-0.1.1-cp311-abi3-macosx_10_12_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for dkdc_draw-0.1.1.tar.gz
Algorithm Hash digest
SHA256 11edb00f582e7fcc2e4550c4ca1fb18cdd8affb55eae881be8307d5aa7824dca
MD5 fe289bc565ec7175f50f32d927852cdb
BLAKE2b-256 1db059751f13a1a907810f45a4222d13b16c87f1cd8a7ec0bd2dc0fc47bed253

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.1.1.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.1.1-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_draw-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a6ea06ade067c5f5d006387eeae193f69c8b0e5e48fbe14928de3e153e403930
MD5 d6e51fbf787ccf649911225f4a39452b
BLAKE2b-256 aff4633382b7291e7a1bf6c5a9fbbcc4a2026b2504b97afe3d1cd33edd9be6ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.1.1-cp311-abi3-manylinux_2_34_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.1.1-cp311-abi3-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for dkdc_draw-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 0b7ff84dc1f7710bc201aff1c2387f3ac2970bcf7e334c1c052944321566ad1f
MD5 532d9f87a5e9d92a85b67ae62cbcee6e
BLAKE2b-256 6bef905b271b8019d6601e38f864ce488ed6207ec59f04833c03bc2af182e417

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.1.1-cp311-abi3-manylinux_2_34_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.1.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dkdc_draw-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60fdedb44051f872ced6ee0baff0749fc0dd114bce5cc5a7ac3de35b57299b6f
MD5 a53ffdfc64b61fa2b4c4a41238981911
BLAKE2b-256 8efbcca79c4167b980fe35913d0434544ec2e1776e2b8d2ee62114f03b38ce61

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.1.1-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.1.1-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_draw-0.1.1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e4c7e5dfa4165152e5a6322ab9c4c927f76aea95ddb3ebf058994a5a78667f04
MD5 9637e5b54d0224b0bf1f7953d80b919f
BLAKE2b-256 77514bb68842d50d2f9269ccf07f81da56713670f22258920a392209fe7196f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_draw-0.1.1-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