napkin-sketchdocs 1.0.0 GitHub

Quickstart#

On this page

Get from an install to a sharpened sketch in about five minutes. For the full reference see README.md; for the shortcut tables see CHEATSHEET.md.

1. Install#

Requires Node.js 22.12 or newer. From npm, the command line and then the desktop app, which brings Electron, about 100 MB:

npm install -g @isocialpractice/napkin-sketch
napkin-sketch --install-gui
napkin-sketch      # opens a new blank sketch

From a clone, npm start is the fastest way to see the app:

npm install
npm run build
npm start          # builds, then opens a new blank sketch

Two other ways to run a clone:

# Use the CLI from anywhere (local checkout)
npm link
napkin-sketch

# Build a native installer into release/
npm run dist:win     # or dist:mac, dist:linux

The window opens maximized, which still shows the title bar. Pass -f / --full-screen for true full screen.

2. Draw something#

The Select tool is active on launch, so press B first to pick up the brush.

  1. B - brush. Draw a wobbly box and a lopsided circle.
  2. W then 5 - set the stroke width to 5.
  3. C - cycle to the next Quick Access Color; Shift + C goes back.
  4. Start a stroke, then hold Space - it becomes a clean straight line. Add Shift mid-drag to hold it level, plumb or at 45 degrees. Or click, then hold Shift and click again: a line joins the two clicks.
  5. Start a stroke, then hold Ctrl + Space - a quarter-ellipse curve. Add Alt for a quarter circle, tap Shift to swing the apex 90 degrees.
  6. Before a stroke, hold Space and drag to pan, or hold Ctrl to pick something up with the selection tool.

3. Sharpen it#

Press H (Sharpen all) and watch the box square up and the circle round out, with a subtle wobble left in so it still reads as hand-drawn.

Two ways to run the engine:

Tune the result in Quick Settings: wobble, smoothing, circle snap, end taper, rotational symmetry (raise it above 1 for mandala mode), and text size.

4. Work with layers#

Every new element gets its own layer, named after the tool that drew it.

Do thisPress
Show / hide the Layers panelCtrl + L
Rename the active layerF2 (or double-click the row)
Group the selected layersCtrl + G
UngroupCtrl + Shift + G
Move a layer up / downCtrl + ] / Ctrl + [
Move a layer to the top / bottomCtrl + Shift + ] / Ctrl + Shift + [
Select the layer above / belowAlt + ] / Alt + [

Click a row to make it active; Shift-click to multi-select; drag a row to restack it, or drop it onto a group row to nest it inside. Selecting on the canvas highlights the matching rows, and the other way round.

Press S for the Select tool, click a shape, press X to put the fill in front, then click a Quick Access Color to fill it (with the stroke in front, the color goes to its outline). Press A for Direct Select and drag an anchor point to reshape a path; drag over empty canvas to pick the anchors in a box, then drag one of them or press the arrow keys to move them all, or Delete to take them out of the path.

5. Save and export#

ActionShortcut
SaveCtrl + S
Save AsCtrl + Shift + S
Import a fileCtrl + I
ExportFile > Export > PNG / JPEG / SVG / PDF

Sketch books save as .skbk, a human-readable JSON document written atomically, so an interrupted save cannot corrupt the file you already had. SVG export is lossless and keeps layer names, gradients, and dash styles, so the file round-trips back into napkin-sketch unchanged.

6. Drive it from the command line#

# New sketch named "ideas"
napkin-sketch --new ideas

# Open an existing sketch book
napkin-sketch --book ./notes.skbk

# Sharpen a saved book headlessly, then open it
napkin-sketch --sharpen ./notes

# Open a new sketch with a file imported
napkin-sketch --import logo.svg

# Import several files, laid out in a grid
napkin-sketch -m logo.svg,"site map.svg",photo.png

The sharpen engine is pure and deterministic (seeded from each stroke's id), so --sharpen produces the same result on disk as the GUI does on screen.

7. Where to go next#

Troubleshooting#

SymptomFix
napkin-sketch is not foundInstall it from npm, or run npm run build then npm link in a clone
napkin-sketch says no desktop appRun napkin-sketch --install-gui, which adds it with Electron
Strokes are not being cleaned up as you drawLive sharpen is off by default; enable it in Ctrl + , or press H
Nothing drawsThe Select tool is active at launch; press B for the brush
Ctrl + Shift + N does nothingAnimation Mode is not installed; run npm run animation-mode -- --status
The cursor is a crosshair, not a circleCapsLock is on; that is the precision cursor
A change to the source is not showingRebuild with npm run build, or leave npm run build:watch running
Linux: a SUID sandbox error on npm startSee the install page's [install errors][install-errors]
macOS: spawn ... ENOENT, malware warningSee the install page's [install errors][install-errors]

[install-errors]: https://isocialpractice.github.io/napkin-sketch/install.html#troubleshooting-install-errors