Docs / Start / Cheatsheet
Cheatsheet#
On this page
Every shortcut, flag, and script on one page. New here? Start with
QUICKSTART.md . Full prose reference: Using the
app , which the documentation site publishes
and Help > Verbose opens. The API on one page:
API-CHEATSHEET.md .
Ctrl is Cmd on macOS throughout. The keys are the app's own; Edit >
Edit Keyboard Shortcuts changes them for you alone.
Tool Key Notes
Brush BPressure-aware variable width
Marker M
Copic marker KFlat broad nib, rotatable
Pencil NGraphite and charcoal by hardness, through the paper's grain; press for the drawing kit
Smear Shift+NA blending stump: drag over pencil marks to spread their graphite; Quick Width sizes it, Quick Opacity sets its strength
Eraser ECuts the selection, or every mark it touches, out of the drawing
Shape Eraser Shift+EDrag a shape to cut it out of the selected marks; press for the shapes
Shape Stacker Shift+MDrag across the pieces of the selected shapes to merge them, Alt to take them away; press for the Wipe Stacks
Split JClick a path to cut it where you click, as scissors do; a closed one opens there
Select SBlack arrow; active at launch
Direct Select AWhite arrow; picks, moves and deletes anchor points and segments
Text TClick = new text or edit a text, in or along a selected path; drag = text box
Rectangle RHold Shift for a square
Ellipse LHold Shift for a circle
Curve VClick and hold the button for the free-ends variant
Vector Path PClick = corner, drag = smooth Bezier point
Paint Bucket GFills the enclosed shape under the click
Fill Color toolbar Fills the element under the click, else the selection
Eyedropper IHold Ctrl to pick a shape instead
Mesh Warp toolbar Click art to mesh it, then drag its pins to bend it
Liquify Shift+RBend the marks under a brush - Warp, Twirl, Pucker or Bloat; press for the four
Drawing#
Action Shortcut
Straight line Press, then hold Space
Lock a line to 45 degrees Shift mid-drag (release to free)
Shift-click line Click or draw, then Shift + click
Quick curve (ellipse) Press, then hold Ctrl + Space
Quick curve (circle) Press, then hold Ctrl + Space + Alt
Swing a quick curve apex Shift, 90 degrees clockwise per press
Endpoint snap Hold Shift while drawing
Select with a drawing tool Hold Ctrl (the last selection tool chosen)
Rotate the Copic nib Hold Ctrl still 1s, then Alt (CW) / Shift (CCW)
Cancel the stroke in progress Esc
Sharpen all H
Sharpen Selection Transform > Sharpen, or the toolbar button
Text editing#
The type editor's own keys, while a text is edited (Type ).
Action Shortcut
New text / edit a text T and click; or double-click a text with Select
New line Enter
Put the text down Esc or Ctrl + Enter
Select a word / a paragraph / all Double-click / triple-click / Ctrl + A
Move by word / paragraph Ctrl + Left Right / Up Down
Line start or end / text start or end Home End / Ctrl + Home Ctrl + End
Size up / down 2 pt (10 pt) Ctrl + Shift + . / , (add Alt)
Leading down / up 2 pt Alt + Up / Alt + Down
Kerning or tracking +20 / -20 (x5) Alt + Right / Alt + Left (add Ctrl)
Baseline shift up / down 2 pt Alt + Shift + Up / Alt + Shift + Down
Align left / center / right / justify Ctrl + Shift + L / C / R / J
All Caps Ctrl + Shift + K
Horizontal scale back to 100% Ctrl + Shift + X
Tracking and kerning back to 0 Ctrl + Alt + Q
Paste plain text Ctrl + Shift + V
Quick features#
Action Shortcut
Quick width W then a number
Quick opacity Q then a number
Quick zoom Z then a digit (9 = 90%, 0 = 100%)
Cycle Quick Access Color C forward, Shift + C back
View, pan, and zoom#
Action Shortcut
Fit All in View Ctrl + 0
Zoom In / Zoom Out Ctrl + + / Ctrl + -
Zoom (mouse) Hold Alt and scroll
Pan (mouse) Scroll; Ctrl + Shift + scroll pans across
Pan (any tool) Hold Space and drag
Pan / zoom (touch) Two-finger gesture
Open the menu bar Alt alone, after 5 s with no other key
Toggle Pages panel Ctrl + B
Previous / next page PageUp / PageDown
Toggle Layers panel Ctrl + L
Toggle Properties panel Ctrl + P
Toggle Appearance panel Shift + F6
Type panel: Character Ctrl + Shift + T
Type panel: Paragraph Ctrl + Alt + T
Quick Settings Ctrl + ,
Verbose Settings Ctrl + Alt + ,
Animation Mode Ctrl + Shift + N (experimental add-on)
Selection and editing#
Action Shortcut
Select all Ctrl + A
Deselect all Ctrl + Shift + A
Add to / remove from selection Shift + click
Rubber-band select Drag over empty space (Select tool)
Pick anchors or segments with a box Drag over empty space (Direct Select): anchors when it holds any, else segments
Move picked anchors or segments Drag one, or the arrow keys, Shift for 10 (Direct Select)
Delete picked anchors or segments Delete or Backspace (Direct Select): a closed path opens
Drag-copy the selection Hold Alt and drag
Cut / Copy / Paste Ctrl + X / Ctrl + C / Ctrl + V
Paste in Place Ctrl + Shift + V
Duplicate Ctrl + D
Delete selection or layer Delete or Backspace
Move by a distance Enter, or the Move button
Step a Move field Arrow keys, Shift for a coarse step
Rotate Ctrl + R, Transform > Rotate, or the Rotate button
Snap a rotation to 15 degrees Shift while dragging, or the Snap toggle
Join strokes Ctrl + J
Apply Last Effect again Ctrl + Shift + E
Last Effect, its options open Ctrl + Alt + Shift + E
Combine shapes, as Pathfinder Transform > Wipe Stacks, or right-click the canvas
Merge pieces, as Shape Builder Shape Stacker (Shift + M): drag across them; Alt takes them away
Cut a path, as Scissors Split (J): click it where it should come apart
Blend pencil into shading Smear (Shift + N): drag across it; W sizes the stump, Q sets its strength
Undo Ctrl + Z
Redo Ctrl + Y or Ctrl + Shift + Z
Vector path editing#
With the Vector Path tool active, click a committed path to open its anchors.
Action Shortcut
Add an anchor Click a segment (a + badge marks the spot)
Remove an anchor Click the anchor (a - badge marks it)
Move an anchor or handle Hold Ctrl and drag
Round a corner Hold Ctrl, drag the target icon, or type a Radius
Toggle an anchor's handles Alt + click the anchor
Hold a point to 45 degrees Hold Shift while placing it or pulling a handle
Close the path Click the first point where the close ring shows
Finish it open Enter, double-click, or switch tools
Abandon the path Esc
Put an edited path down Click empty canvas, or Esc
Layers#
Action Shortcut
Toggle the panel Ctrl + L
Rename the active layer F2 or double-click the row
Group the selected layers Ctrl + G
Ungroup Ctrl + Shift + G
Make a clipping mask Ctrl + 7; the closed path on top clips
Release a clipping mask Ctrl + Alt + 7
Move layer up / down Ctrl + ] / Ctrl + [
Move layer to top / bottom Ctrl + Shift + ] / Ctrl + Shift + [
Select layer above / below Alt + ] / Alt + [
Multi-select rows Shift + click
Restack or nest Drag the row (drop onto a group to nest)
Layer tools menu Right-click a row
Files#
Action Shortcut
New Sketch Ctrl + N
Open Ctrl + O
Import Ctrl + I
Save Ctrl + S
Save As Ctrl + Shift + S
Export File > Export > PNG / SVG / JPEG / PDF
Nine menus: File, Edit, View, Transform, Sketch, Layers, Pages, Automate and
Help. What each one holds is in the menus
table .
Action Where
Change a tool's keys Edit > Edit Keyboard Shortcuts
List a tool in another menu Edit > Edit Tool Types
Read this documentation Help > Verbose
A menu's quickstart Help > Tool Types
The project's page Help > Source Code
Version, license, notices Help > About napkin-sketch
Back / forward in the docs Alt + Left / Alt + Right
Automate#
Action Where
Script an SVG, PDF or picture Automate > Generate Script > From Media File
Script the lit layers Automate > Generate Script > Selected Layers
Record every step Automate > Track History
Keep more or fewer steps (500; 50-5000) Automate > History Limit
Script the steps, leaving some out Automate > Generate Script > From Session History
CLI#
napkin-sketch [option] [target]
Flag Description
-h, --helpShow command-line help
-v, --versionShow the version, and where the desktop app is
-b, --bookOpen a saved .skbk sketch book
-n, --newNew sketch, named unnamed or [target]
-f, --full-screenOpen full screen (the default window is maximized)
--no-sandboxLaunch without Chromium's sandbox: Linux development only
-i, --importImport an SVG, PDF, PNG, JPEG, GIF or WebP into the opening sketch
-m, --multiple-importsImport a comma-separated list, laid out in a grid
--sharpenAuto-sharpen a saved sketch on disk, then open it
--install-guiInstall the desktop app and Electron, about 100 MB
--uninstall-guiRemove it; --here with either, for this project
[target]A .skbk file to open, or a name for a new sketch
napkin-sketch --install-gui # add the desktop app (about 100 MB)
napkin-sketch # new blank sketch
napkin-sketch --new ideas # new sketch named "ideas"
napkin-sketch --book ./notes.skbk # open a saved book
napkin-sketch ./notes.skbk # same, bare path
napkin-sketch --sharpen ./notes # sharpen on disk, then open
napkin-sketch --new -f # full screen
napkin-sketch --import logo.svg # import one file
napkin-sketch -m logo.svg,"site map.svg",photo.png # grid of files
Quote file names that contain spaces.
Commands (no window, no Electron)#
Command Does
draw <script | ->Draw to files: --to svg,png,pdf,skbk,jsx --out <dir>
check <script | ->Read and run, report problems, write nothing
render <book.skbk>Write a book as files; --page <n> for one page
verbsThe language by category; --json for the table
napkin-sketch draw card.napkin --to svg,png # card.svg, card.png
napkin-sketch draw card.napkin --to jsx # card.jsx, for Illustrator
napkin-sketch draw --prompt "a three-box flowchart" # an AI tool writes the script
napkin-sketch draw - --json < card.napkin # stdin in, one JSON line out
napkin-sketch draw card.napkin --asset logo=logo.png # an image the script names
napkin-sketch check card.napkin --strict # fail on warnings too
napkin-sketch render deck.skbk --to png --page 2 # deck-2.png
napkin-sketch render hero.skbk --animate walk # hero-walk-1.svg on: frames, no AI
napkin-sketch verbs --category shapes # one category
Exit Meaning
0Drew
1The arguments were wrong
2The script had errors (files still written unless --strict)
3A file could not be read or written (a linked file included)
4The AI helper gave back no script (draw --prompt)
npm scripts#
Script What it does
npm run buildBundle CLI, main, preload, renderer, and the embed API
npm run build:watchRebuild on change
npm run build:typesEmit .d.ts declarations for the embeddable API
npm run typecheckType-check without emitting
npm testRun the unit test suites
npm test -- --keep-graphicsKeep the graphics the graphic-design suite draws
npm test -- --update-goldenRewrite the golden SVGs in test/scripts/
npm run gui-checkDrive the built app and check what it shows (build first)
npm run gui-check -- --backgroundThe same, off the screen and out of the focus
npm startBuild, then launch a new sketch
npm run cleanRemove dist/
npm run import-tree -- <file.svg>Print the layer tree an SVG would import as
npm run todoArchive checked TODO.md items into its Complete section
npm run ai-helper -- --listShow AI tool targets and the helpers that install to them
npm run ai-helperInstall every helper's skills to .claude
npm run ai-helper -- --to githubInstall them to .github (Copilot) instead
npm run ai-helper -- --helper <name>Narrow to one helper (vectors, graphic-designer, scripting)
npm run ai-helper -- --to pluginCheck the plugins and print the /plugin commands
npm run wireframe-cyclesRebuild the animation cycle tables from the wireframe asset
npm run shape-libraryRebuild the script shape library from its SVG assets
npm run shape-library -- --checkFail when the committed shape library is out of date
npm run api-docsRewrite the API docs' generated tables, schema and index
npm run api-docs -- --checkFail when any of them is out of date
npm run menu-docsRewrite the shortcut tables from the menu registry
npm run menu-docs -- --checkFail when either is out of date
npm run pack-checkPack and install both packages: draw with one, find the app
npm run pack-guiLay out the desktop app's npm package in release/gui/
npm run distBuild an installer for the current OS
npm run dist:win / dist:mac / dist:linuxNSIS / DMG / AppImage
npm run animation-mode -- --statusIs Animation Mode installed?
npm run animation-mode -- --installInstall it (defaults to Claude Code)
npm run animation-mode -- --uninstallRemove it again
Embedding#
import { NapkinSketch } from '@isocialpractice/napkin-sketch';
import '@isocialpractice/napkin-sketch/styles.css';
const editor = new NapkinSketch(document.getElementById('host')!, {
liveSharpen: false,
onChange: (e) => console.log(e.toJSON()),
});
editor.setTool('pen');
editor.sharpenAll();
editor.toDataURL('image/png');
editor.toSVG();
editor.toPDF();
editor.applyCompositionStyle(style); // restyles by layer name; gives the report
Pure-engine entry points, no editor required: sharpenStrokes,
parseSketchBook, sketchesToPdf, and importSvg (browser only).
Drawing from a script#
import { drawSvg, evaluate, renderBook } from '@isocialpractice/napkin-sketch'; // anywhere
import { drawFile, drawToFiles } from '@isocialpractice/napkin-sketch/node'; // Node: files
const { svg, diagnostics } = drawSvg('napkin 1\npage 400 300\ncircle 200 150 60');
const { ok, files } = await drawFile('card.napkin', { out: 'out', formats: ['svg', 'png', 'pdf', 'skbk'] });
Call Gives
evaluate(script, options){ ok, book, diagnostics, stats, output }
renderBook(book, { format, ...output })svg/png: one a page; pdf/skbk/jsx: one string
drawFile(path, options), drawToFiles(script, options){ ok, files, diagnostics, stats, warnings }, files written
References: docs/api/node ,
docs/api/output .
The twenty verbs most scripts use:
Verb Example Draws or sets
napkinnapkin 1The language version: the first line
pagepage 400 300, page a4 landscapeThe page size
backgroundbackground #fcfaf5, background noneThe page color
layerlayer "Sky" opacity 0.8A layer the marks after it go on
groupgroup "Figure" { layer "Head" }A group layer around a block
colorcolor #1f2328The ink
widthwidth 3The stroke width
fillfill #ffe08a, fill noneThe fill of closed shapes
rectrect 20 20 360 80 r 12A rectangle, rounded with r
circlecircle 50% 50% 48A circle
ellipseellipse 200 150 120 60An ellipse
lineline 20 20 380 280A straight line
polygonpolygon 200 40, 360 260, 40 260 r 8A closed shape through points
pathpath "M20 20 C60 0 100 40 140 20"SVG path data, or a block of steps
throughthrough 20 100, 80 40, 140 100A smooth curve through points
texttext "Acme Corp" at 200 70 size 28 align centerA text item
imageimage "logo" at 20 20 size 120An image the host passed in
linklink "assets/logo.svg" at 20 120 size 120 120A linked file, drawn where it can be
repeatrepeat 10 as i { rect (20 + i * 36) 20 30 30 }A block, a number of times
roughrough 0.6The hand-drawn pass
Every verb, flag and exit code: API-CHEATSHEET.md . The map
of the documentation: API.md .
Graphic design API#
import { createComposition } from '@isocialpractice/napkin-sketch';
const design = createComposition({ width: 360, height: 360, background: '#f6f7f9' });
design.rect({ x: 24, y: 24, width: 312, height: 96, rx: 12, fill: '#326478' });
design.text({ x: 180, y: 78, text: 'Acme Corp', align: 'center', fill: '#ffffff' });
design.defineClip('badge', { type: 'circle', cx: 180, cy: 220, r: 64 });
design.image({ src: logo, x: 116, y: 156, width: 128, height: 128, fit: 'cover', clip: 'badge' });
design.toSVG(); // string
design.toPNG(); // PNG bytes, no canvas and no image dependency
Element Method
Rectangle rect({ x, y, width, height, rx })
Circle circle({ cx, cy, r })
Ellipse ellipse({ cx, cy, rx, ry })
Triangle triangle({ x, y, width, height, variant }) or points
Polygon polygon({ points }) / polyline({ points })
Line line({ x1, y1, x2, y2 })
Path path({ d }) - M L H V C S Q T Z, no arcs
Text text({ x, y, text, ...font and paragraph styling })
Media image({ src, x, y, width, height, fit, clip })
Group group(props, (g) => { ... })
Mask defineClip(id, shape), or clip: inline on an element
Effects effects: [{ type: 'drop-shadow', dx, dy, blur, color }]
Page defaults: 360 by 360, px, transparent, headless. Full reference in
the graphic design API .
AI helpers (experimental)#
Three plugins in ai-helper/, one folder each, all listed by the marketplace
at the repository root. All three are experimental: each runs an AI tool you
install and sign in to yourself.
Helper Command What it does
vectors/vectors:animation-modeDraws the next Animation Mode frame
graphic-designer/graphic-designer:design-languageReads an asset into a DESIGN_LANGUAGE.md
scripting/scripting:drawWrites a napkin script from a request
/plugin marketplace add . # from a clone
/plugin marketplace add isocialPractice/napkin-sketch # without one
/plugin install vectors@napkin-sketch
/plugin install graphic-designer@napkin-sketch
/plugin install scripting@napkin-sketch
# What design language is this asset in?
node ai-helper/graphic-designer/skills/design-language/scripts/analyze-media.mjs asset.svg --markdown
An SVG yields colors, type, strokes and structure; a PNG yields colors only;
JPEG and GIF have no decoder and say so rather than returning an empty result.
Defaults worth knowing#
Setting Default
Active tool at launch Select
Live sharpen Off
Window Maximized; 1280x860 when restored down
Zoom range 20% to one page pixel across the canvas
Endpoint snap sensitivity 10px (range 1-20)
Join stroke on snap Off
Select sensitivity 4px (range 1-20)
Direct Select sensitivity 8px (range 1-20)
Eyedropper sensitivity 10px (range 1-36)
Freehand fidelity 1.5px (range 0.5-8)
Copic nib hold time 1s (range 0.5-2)
Copic rotate width multiplier 2x (range 1-4, capped at 40px)
Show selection borders On
Animation Mode Not installed
Previous QuickstartNext Quickstart: drawing