A drawing app built for agent/human collaboration
Rust
Guides: short how-to pages, one task per section
Indicode BVead91adf899c
diff --git a/CLAUDE.md b/CLAUDE.mdindex 86b8af3..854fc53 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -1,4 +1,4 @@-_Last updated: 2026-11-07 15:10_+_Last updated: 2026-11-08 14:52__Last updated: 2026-11-04 19:41_@@ -15,6 +15,7 @@ Agent-first 2D art application in Rust: a `klad` CLI for agents and a native edi## Working- Every doc in `docs/` starts with a `_Last updated: YYYY-MM-DD HH:MM_` line; update it when the doc changes.+- Guides in `docs/guide/` are short how-to pages for people in the editor. A page opens with one sentence on what it lets you do and stays under about 300 words; each section is one task titled as the goal, verb first, done the shortest way in numbered steps of one action each (where, then what, then what happens), at most five. No option catalogues, no alternatives, no explaining how klad works inside: the editor names its options and `?` lists the keys. Keys and editor labels in bold, labels exactly as the editor writes them. Getting started is the one tutorial: a single path from a new drawing to changing a stroke.- Never commit build output or binaries, and check `git status` before `git add -A`. `samples/` holds generators only; the bundles and pictures they make stay out of git.- Commit messages and docs name no one: say what changed and why.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 1c56bc3..1f22607 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -28,6 +28,7 @@ These come from `CLAUDE.md`, which is also the guide for coding agents working o- Every feature has a CLI form and an editor form: a new command or op also gets its place in the editor, and an editor feature gets its command or op, with tests on both sides. The ops that draw from shapes (`ink`, `light`, `hatch`, `paint`, `scatter`) are the exception and stay CLI only.- New behaviour comes with tests in the crate that owns it. `just lint` and `just test` are clean before a pull request.- No em-dashes in docs or messages; every doc in `docs/` starts with a `_Last updated:_` line.+- Guides in `docs/guide/` are short how-to pages: one task per section, titled as the goal, done the shortest way in numbered steps, under about 300 words a page, with no catalogues of options.## Sending a changediff --git a/docs/guide/animating.md b/docs/guide/animating.mdindex 98fff51..37a95d0 100644--- a/docs/guide/animating.md+++ b/docs/guide/animating.md@@ -1,56 +1,42 @@-# Animating frame by frame--+_Last updated: 2026-11-08 14:50_-## Read the timeline+# Animating frame by frame-The timeline runs along the bottom of the window: a ruler with the playhead, then one row per layer, top layer first. Each drawing is a block that runs across the frames it shows on (blue on paint layers, green on vector layers). A purple block marked `->c4` is a link: it shows a drawing from earlier in the row again. Clips sit in a strip above the frame numbers.+Draw an animation one drawing at a time, check it against the drawing before, and play it. klad can draw the in-betweens for you.-Click a cell to go to that frame and layer, and drag on the ruler to scrub.+## Draw the next frame-- **shift K** makes a blank drawing right after the current one and takes you there. The "shift K on" buttons in the timeline header pick whether it holds for 1, 2 or 3 frames, for animating on ones, twos or threes.-- **K** makes a blank drawing on the frame you're on.-- Painting on an empty frame starts a drawing there too.+1. Draw the first pose.+2. Press **shift K**. You get a blank drawing on the next frame.+3. Press **O** for onion skin: the drawing before shows in red under the one you're drawing.+4. Draw the next pose, and repeat.+5. Press **Return** to play, and again to stop.-## Step through frames+To animate on twos, click **2s** next to **shift K on** in the timeline header first.-- **,** and **.** go a frame back and forward; alt , and alt . jump to the previous and next drawing on the active layer; Home and End go to the first and last frame.-- Hold **Q** and move the pen sideways to flip through the drawings around this one, like the corner of a stack of paper. Let go to stay on the frame you reached.-- Hold **W** to see the previous drawing, and let go to come back.+## Flip through your drawings-## Onion skin--O turns onion skin on and off: the drawings before show in red and the ones after in green, under the active layer. The onion settings in the timeline header set how many to show before and after, whether to count drawings or frames, and their opacity, falloff and tint. The dot at the right end of a layer's name shows that layer's onion as well.+Press **,** and **.** to go a frame back and forward. Or hold **Q** and move the pen sideways to flip through the drawings like the corner of a stack of paper.## Change the timing-- **=** and **-** make the drawing under the playhead hold a frame longer or shorter. Later drawings move along.-- Drag the right end of a block to change its hold, or drag the dot on its first cell to move it. Alt left and alt right move it a frame at a time.-- **I** inserts a frame in the active layer and **shift I** in every layer; the remove buttons next to them take one out.--## Reuse a drawing--"duplicate to the next frame" copies the drawing right after itself, with the same stroke ids, so you can change the copy into the next pose. "show a drawing here" links one of the row's drawings at this frame: drawing on either changes both. "unlink" makes a link a drawing of its own.--## Play it--Return plays and stops. It plays the loop range when there is one (shift drag on the ruler, or the loop button), otherwise the clip under the playhead, otherwise the whole timeline, at the fps in the timeline header. If frames drop, the lightning button ("prepare frames") buffers the range first; the strip along the ruler turns green where frames are ready to show at once.+Press **=** to hold the drawing under the playhead a frame longer, and **-** to make it a frame shorter. Later drawings move along.-## Make clips+## Start a pose from the last one-A clip is a named range of frames, like idle, walk or attack, and an export turns each clip into its own animation. Drag along the empty strip above the frame numbers to make one. Click its bar to name it and set whether it loops, its own fps and its first and last frame.+Right click the drawing's cell in the timeline and pick **duplicate to the next frame**, then change the copy into the next pose.-## Retime frames+## Make clips for a game-Shift click a cell, or shift drag over cells, to select frames on one or more rows. The selection bar retimes them on ones, twos or threes, fits them into a number of frames, reverses them or adds them again backwards as a ping-pong, on the selected rows or on every layer. It also copies cells and pastes them as copies or as links.+Drag along the empty strip above the frame numbers to make a clip, then click its bar to name it (idle, walk, attack). Each clip [exports](exporting.md) as its own animation.## Let klad draw the in-betweens-1. Draw two keys on a row with empty frames between them. Name the parts of each key (a leaf, the near leg) under "part" in layer settings ([Selecting](selecting.md)): in-betweens pair strokes part by part, so keys drawn separately still match up.-2. Click the first key's cell, then shift click the second key's cell to select both and the frames between them.-3. Click "in-between" in the selection bar. The window shows both keys and asks how many drawings to make (or one on every frame), how they're spaced, with the chart an animator draws between keys, and what to do with strokes that are only in one key: leave them out, pop them, fade them or draw them on.-4. Click "make the in-betweens".+1. Draw two keys with empty frames between them, and [name the parts](selecting.md#name-the-parts-of-a-drawing) of both.+2. Click the first key's cell and shift click the second one's.+3. Click **in-between** in the selection bar.+4. Choose how many drawings to make and how they're spaced, and click **make the in-betweens**.-In-betweens show lighter in the timeline and their ids carry a star. The window then lists any stroke that found no partner; click it, pick its partner in the other key and the in-betweens are made again with that pair. When you change a key later, "redo the in-betweens" remakes them, and keeps what you drew on top of any of them unless you say otherwise.+After you change a key, select the range again and click **redo the in-betweens in the selection**.diff --git a/docs/guide/bones.md b/docs/guide/bones.mdindex 8d521ac..2364ade 100644--- a/docs/guide/bones.md+++ b/docs/guide/bones.md@@ -1,27 +1,31 @@+_Last updated: 2026-11-08 14:50_+# Posing with bones-Instead of redrawing a character on every frame, you can draw it once, give it a skeleton and pose it. The skeleton belongs to a layer or a group, and moves every layer in that group together.+Draw a character once, give it a skeleton and pose it on each frame instead of redrawing it.## Draw a skeleton-1. Put the character's layers (lines, colour, shading) in a group and make the group the active layer.-2. Press J for the bone tool, with "draw" picked in the bar over the canvas.-3. Drag on empty canvas to draw the first bone. The chain carries on from its end: each click adds the next bone, and Esc ends the chain.+1. Put the character's layers in a group and select the group.+2. Press **J** and pick **draw** in the bar over the canvas.+3. Drag to draw the first bone, click to add the next one, and press **Esc** to end the chain.-Drag a bone's end or middle to move it, and alt drag from a bone's end to start a child chain there. The skeleton list in the bar picks a bone by name, renames it (Return keeps the name) and changes the bone it hangs from.+Alt drag from a bone's end to start a branch there, such as an arm off the spine.-## Paint how much each bone moves the drawing+## Say which bone moves what-Switch to "weights". "automatic weights" gives every bone a first set of weights by distance. Cmd click a bone to pick it, then paint its weight onto the drawing: size sets the brush's radius and weight how much each dab gives, and alt paints the weight away. "smooth" blurs every bone's weights a little. Hold rigid things, like a head or a hand, with full weight on one bone, so they don't bend.+1. Pick **weights** in the bar and click **automatic weights**.+2. Cmd click a bone, then paint where it should move the drawing. Alt paints weight away.-## Pose it+Give rigid parts, like a head or a hand, full weight on one bone so they don't bend.-Switch to "pose", go to a frame and drag a bone's end to turn it; its children follow. "make this pose a drawing" bends the drawing on this frame into the pose, and "back to rest" drops the turns, the move and the targets of this pose. Poses of the same drawing in-between on the bones ([Animating](animating.md)), so a limb swings around its joint instead of sliding.+## Pose it-## Let a limb reach (IK)+Pick **pose**, go to a frame and drag a bone's end to turn it. Its children follow. Poses in-between on the bones, so a limb swings around its joint instead of sliding.-Pick the lower bone of a limb, say a shin, and click "make it a limb with" its parent. In pose mode, dragging the shin's end now turns both bones so the end reaches where you drag, bending the way the leg is drawn, or the other way if you switch it to bend clockwise or counterclockwise. Softness keeps the knee from snapping straight near full reach. "make it an aim" turns one bone alone to point at the target instead. For a pose where you'd rather turn the bones by hand, switch the limb off for that pose, or hold alt while you drag.+## Let a leg reach-A planted foot is a target that stays where it is while the body moves, which is most of a walk cycle.+1. Pick the shin and click **make it a limb with** its parent.+2. In **pose**, drag the shin's end. Both bones turn so the foot lands where you drag.diff --git a/docs/guide/exporting.md b/docs/guide/exporting.mdindex f04f577..be5f7fd 100644--- a/docs/guide/exporting.md+++ b/docs/guide/exporting.md@@ -1,27 +1,29 @@+_Last updated: 2026-11-08 14:50_+# Exporting-## Export a picture or frames+Export a picture, numbered frames or a sprite sheet, or send your animation straight into a Godot project.-File > Export (cmd E) opens the export window, which writes the same files as `klad export`:+## Export a picture or frames-- **image**: the frame you're on as one PNG, the whole image or one layer or group, at any scale. It's transparent unless you tick "keep the background colour".-- **frames**: numbered PNGs, one per frame, for all frames, a clip or a range like 0-11.-- **sprite sheet**: one PNG holding each distinct picture once, trimmed to its pixels, and a JSON file in Aseprite's layout with a tag per clip. Holds and links share their picture. Padding and the largest page size are settings; more frames go on more pages.-- **Godot**: the sheet, a SpriteFrames resource with one animation per clip at its own speed and loop, and a scene with an AnimatedSprite2D. "as a rig" exports a Skeleton2D with the drawing's parts and an AnimationPlayer with the poses ([Posing with bones](bones.md)); "as a parallax scene" exports each top-level layer as a texture on a Parallax2D that scrolls by its depth.+1. Press **cmd E**.+2. Pick **image** for the frame you're on, **frames** for one PNG per frame, or **sprite sheet**.+3. Click **export**. Without a path, the files go next to the drawing.-An empty path writes next to the drawing; a relative path counts from the drawing's folder.+Pictures are transparent unless you tick **keep the background colour**. A sprite sheet comes with a JSON file in Aseprite's layout, with a tag per clip.-## Export straight into a Godot project+## Export into a Godot project-Click a clip's bar in the timeline, type the folder in your Godot project under "Godot folder" and click "export to Godot". The folder is kept in the drawing, so later exports go to the same place. Re-exports keep Godot's ids for the files, so scenes that use them keep working.+1. In the timeline, click a clip's bar.+2. Type the folder in your Godot project under **Godot folder**.+3. Click **export to Godot**.-## From the command line+You get the sheet, a SpriteFrames resource with one animation per clip and a scene to drop in. klad remembers the folder, and exporting again keeps Godot's ids, so scenes that use the files keep working.-The same exports, for a build script or an agent:+## Export from a script```shklad export art.klad --scale 2-klad export art.klad --sheet allklad export art.klad --godot ../game/art/hero```diff --git a/docs/guide/filling.md b/docs/guide/filling.mdindex 406eede..4d68267 100644--- a/docs/guide/filling.md+++ b/docs/guide/filling.md@@ -1,25 +1,27 @@+_Last updated: 2026-11-08 14:50_+# Filling-## Fill inside lines+Fill line art with flat colour that stays editable and can follow the lines when they change.-Press G and click inside closed lines. The bar over the canvas sets what the fill looks at:+## Fill inside lines-- **reference**: this layer, all visible layers, or a layer you pick. Flat colour usually goes on its own layer under the lines, filled with the lines layer as the reference, so the colour never covers the lines.-- **gap**: closes openings in the lines up to that many pixels wide.-- **tolerance**: how different a pixel may be from the one you clicked and still be filled.-- **grow**: how far the fill reaches under the lines, so no paper shows between line and colour.-- **opacity**.+1. Add a paint layer under your lines for the colour.+2. Press **G** and set **reference** in the bar over the canvas to the lines layer.+3. Click inside the lines.-klad keeps a fill as a fill, not as pixels mixed into the layer, so you can pick it up with S like a stroke, recolour it and delete it.+If a fill leaks through a small opening, raise **gap**. If paper shows between the line and the colour, raise **grow**.## Fill a shape you draw-With G, drag a loop instead of clicking: the area inside the loop is filled.+With **G**, drag a loop instead of clicking. The inside of the loop is filled.## Fill again after the lines changed-When you move or redraw lines, find "refill this drawing" with cmd K: it makes the drawing's fills again from where you clicked them. "show gaps" outlines the closed areas that no fill covers yet.+Press **cmd K** and run **refill this drawing**. **show gaps** outlines the areas no fill covers yet.## Colour every frame of an animation-Fill the first drawing, select it and the frames after it in the timeline, and run "fill like the first drawing" from the timeline's selection bar. klad finds each fill's area in the other drawings by its shape and fills it there.+1. Fill the first drawing.+2. In the timeline, select it and the frames after it.+3. Click **fill like the first drawing** in the selection bar. klad finds each area in the other drawings by its shape.diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.mdindex 4e4b5ca..d7d3df7 100644--- a/docs/guide/getting-started.md+++ b/docs/guide/getting-started.md@@ -1,52 +1,38 @@+_Last updated: 2026-11-08 14:50_+# Getting started-klad is a drawing, painting and animation app. You can do everything in these guides by hand, with a pen or a mouse; an agent is something you add when you want one ([Working with an agent](with-an-agent.md)).+Make a drawing, paint on it, then change one of your strokes after you've painted it. It takes about five minutes.Keys are written the way a Mac shows them. On Windows and Linux, cmd is ctrl.## Get klad-Signed builds for macOS and Windows will be sold on itch.io and Steam. Until then, and on Linux, [build klad from source](https://github.com/klad-app/klad#from-source); the first build takes about ten minutes. A build holds the editor, the `klad` command line tool, about fifty open fonts and six sample drawings.--The editor is most complete on macOS, where the pen gives pressure and tilt. On Windows it's a first version with pressure but no tilt, and on Linux you draw with the mouse for now.+Signed builds for macOS and Windows will be sold on itch.io and Steam. Until then, and on Linux, [build klad from source](https://github.com/klad-app/klad#from-source). On a Mac the pen gives pressure and tilt, on Windows pressure, and on Linux you draw with the mouse for now.## Make a drawing-1. Start klad. The start window lists your recent drawings and the samples.-2. Press cmd N, give the drawing a name and pick its folder, size and background.-3. Press B and paint.--There's no save command: every change is written to the drawing as you make it. A drawing is a folder whose name ends in `.klad`, holding plain files, so you can copy it, zip it or put it in a shared folder. cmd W closes it and takes you back to the start window.+1. Start klad and press **cmd N**.+2. Type a name and click **Create**.-To open a sample, click its card. klad copies it into your drawings folder and opens the copy, so the sample stays as it was. Help > First steps walks you through drawing a shape, filling it and handing the drawing to an agent.--## Find your way around+There's no save command: klad writes every change to the drawing as you make it.-The tools sit in a strip on the left, each with its key letter in the corner. On the right is the dock with its panes: colour and brush, layers, layer settings, notes for the agent, and history. The timeline runs along the bottom, and the status line under it says what just happened and where your next stroke will go ("draws into c12 on lines, frames 4 to 7").+## Paint, then change a stroke-- **cmd K** finds any command: type a few letters of what you want to do. Commands that can't run right now are greyed out, with the reason.-- **?** lists every key. Change them in the settings (cmd ,), under Keys.-- **Tab** hides every panel; **shift Tab** hides only the dock. A pane you closed comes back from the Window menu.+1. Press **B** and paint a few strokes.+2. Press **S** and click one of them.+3. Pick another colour in the colour and brush pane.+4. In the bar next to the selection, click the palette button. The stroke takes the new colour and keeps its shape and pressure.+5. Press **cmd Z** to undo that, and **cmd shift Z** to redo it.-## Move around the canvas+Every stroke stays editable like this, hours later too: see [Changing strokes](selecting.md).-| To | Do |-|---|---|-| Pan | Hold space and drag, or drag with the middle button |-| Zoom | Pinch, or hold cmd and scroll |-| See the whole canvas | F |-| See it at 100% | 1 |-| Turn the view | R and shift R, 15 degrees at a time |-| Check the drawing mirrored | H (the drawing itself doesn't change) |--The zoom in the status line also takes a click for 100% and a double click to fit, and a click on its rotation turns the view upright again.--## Undo--cmd Z undoes and cmd shift Z redoes, whether the change was yours or an agent's. The History pane lists the last hundred steps with who made each one; click a row to go straight back to that point.+## Find your way around-## Tune your pen+- **cmd K** finds any command: type a few letters of what you want to do.+- **?** lists every key.+- Hold **space** and drag to pan, pinch or hold **cmd** and scroll to zoom, and press **F** to see the whole canvas.-Open the settings (cmd ,) and the Pen section, then press on the tablet: two bars show the pen's raw pressure and the pressure your strokes record. If your hardest press never reaches full pressure, press as hard as you'd ever draw and click "heaviest = my peak". Lightest sets the raw pressure that counts as the lightest touch, and the curve makes light presses record heavier (below 1) or lighter (above 1).+**Help > First steps** in the editor walks you through a shape, a fill and an agent.diff --git a/docs/guide/layers.md b/docs/guide/layers.mdindex 080a2b6..8357e9d 100644--- a/docs/guide/layers.md+++ b/docs/guide/layers.md@@ -1,40 +1,35 @@-# Layers, masks and clipping--## Add a layer--The buttons at the top of the Layers pane add a layer above the active one:+_Last updated: 2026-11-08 14:50_-- **paint** for brush strokes and fills;-- **vector** for rectangles, ellipses, paths and text ([Shapes, paths and text](shapes-and-text.md));-- **group** to hold other layers;-- **adjust** for an adjustment layer: it starts as curves, and layer settings switch it to levels, hue, colour balance, a gradient map or a colour fill. It changes what is under it in its group.--The same pane duplicates the active layer, puts it in a new group and deletes it. cmd Z brings a deleted layer back.--## Pick, rename and reorder layers+# Layers, masks and clipping-Click a row to make that layer the active one. Double-click its name to rename it: Return keeps the new name, Esc leaves the old one. Drag a row to move the layer: drop it on the top or bottom half of another row to put it above or below, or on the middle of a group to put it inside.+Keep lines, colour and shading on their own layers, and decide where each one shows.-## Show, hide and lock+## Add a layer-The eye shows and hides a layer. Alt click an eye to see only that layer; alt click it again and everything comes back as it was. A locked layer can't be picked or painted on.+At the top of the Layers pane, click **paint** for brush strokes or **vector** for [shapes and text](shapes-and-text.md). Drag a row to move the layer, and double click its name to rename it.-## Opacity and blend mode+## Shade inside flat colour-The active layer's opacity and blend mode sit in the Layers pane's title row. Multiply is the usual one for shading, screen and add for light.+1. Put the flat colour on one layer.+2. Add a paint layer above it and tick **clip to layer below** in layer settings.+3. Set the new layer's blend mode to **multiply** in the Layers pane's title row and paint the shadows. They stay inside the colour.-## Clip a layer to the one below+## Recolour line art-Tick "clip to layer below" in layer settings and the layer only shows where the layer under it has paint. This is how shading stays inside flat colour: flat colours on one layer, a multiply layer for the shadows and a layer for the rim light above it, both clipped.+1. Select the lines layer and tick **lock alpha** in layer settings.+2. Paint over the lines with a big soft brush. Only the lines take the colour.+3. Untick **lock alpha** when you're done, or your next strokes on that layer won't show.-## Paint only where there's paint already+## Hide part of a layer-"lock alpha" in layer settings makes new strokes and fills land only where the layer already has paint. A big soft stroke over line art then recolours just the lines. Turn it off again when you're done, or your next strokes on that layer will seem to vanish.+1. In layer settings, click **add mask**.+2. Paint where the layer should be hidden, and erase to bring it back. Hidden parts show red.+3. Click **back to the layer** to paint on the layer itself again.-## Hide parts of a layer with a mask+## See one layer alone-"add mask" gives the layer an empty mask, and "add mask hiding all" one that hides everything. While you paint on the mask, your strokes hide the layer and the eraser shows it again, and what's hidden is tinted red so you can see it. The mask has a chip in the layer's row: click it to paint on the mask, and use "back to the layer" to paint on the layer itself again. Alt click the chip to turn the mask off and on.+Alt click its eye in the Layers pane. Alt click it again to bring the others back.## Trace over a picture-"import a picture" in the File menu (or dropping a PNG or JPEG on the window) places it on a new layer. Tick "reference" in its layer settings: you keep seeing it while you draw, but it stays out of exports.+Drop a PNG or JPEG on the window and tick **reference** in its layer settings. You keep seeing it while you draw, and exports leave it out.diff --git a/docs/guide/painting.md b/docs/guide/painting.mdindex 9b41bb3..402dc22 100644--- a/docs/guide/painting.md+++ b/docs/guide/painting.md@@ -1,52 +1,43 @@-# Painting+_Last updated: 2026-11-08 14:50_-+# Painting-## Paint a stroke+Paint with klad's brushes, blend colours on the canvas and make brushes of your own.-Press B for the brush and paint on the canvas. The stroke goes into the active paint layer at the current frame; the status line says which drawing it lands in. On a vector layer the brush won't paint and tells you so: pick a paint layer in the Layers pane, or add one.+-## Pick a brush+## Paint and erase-The bar over the canvas holds the brush picker, and the colour and brush pane shows the same brushes as tiles, each with a sample stroke. klad comes with 23 brushes and an eraser. Inking pen, Pencil and Marker are for line work. Oil, Loaded oil, Round bristle, Flat bristle and Dry brush are for painting. Wet round, Smudge and Blender mix and push the paint already on the layer, and Leaves, Grass and Splatter stamp little pictures along the stroke.+Press **B** and paint on a paint layer. **E** switches to the eraser and back, and so does the eraser end of the pen. **[** and **]** make the brush smaller and bigger.-The mixing brushes only read the layer they paint on, so put the colours you want to mix on one layer.+## Pick a brush and a colour-## Change the size, opacity and flow+Click a brush in the colour and brush pane: Inking pen, Pencil and Marker for lines, Oil, Loaded oil and the bristle brushes for paint. Hold **alt** and click the canvas to pick up a colour from it.-The bar has sliders for size, opacity and flow. [ and ] make the brush smaller and bigger. To size it right on the canvas, hold cmd alt and drag sideways: the circle shows the size, and it doubles for every 120 points you drag.+## Blend colours-"more" opens hardness, the size at the lightest press, the pressure curve, the taper at both ends, a stabiliser and smoothing.+Paint with **Smudge**, **Wet round** or **Blender** over colours that are already there. They only mix paint on the layer they paint on, so put the colours you want to blend on one layer.-## Erase+## Make paint look thick-E switches between the brush and the eraser, and the eraser end of the pen erases too. On a layer with lock alpha on, the eraser does nothing (see [Layers](layers.md)).+1. Paint with **Oil** or **Loaded oil**.+2. In layer settings, pick **relief** from **add an effect**.+3. Drag on the light dial towards where the light comes from.-## Pick colours+## Paint symmetrically-- The hue ring and the square in the colour and brush pane pick the colour; the hex field and the alpha slider sit next to them.-- The palette belongs to the drawing. Click a swatch to use it, drag swatches to reorder them, and right-click one (or its x) to remove it. "add colour" adds the current one, with a name if you type one.-- The two squares under the tools in the strip are the current colour and the one before it. X, or a click on them, swaps them.-- Hold alt and click to pick the colour under the pointer. With shift alt it reads only the active layer.+Turn on **mirror** in the brush bar. Every stroke is painted with its mirror image across an upright line.## Make your own brush-F5, or "edit" in the brush bar, opens the brush editor with a live sample stroke at the top. From there you set:--- the tip: round, chalk or a picture, with its hardness, spacing, roundness and angle (fixed, or turning with the stroke or the pen's tilt), and jitter and scatter for each dab;-- a dual tip and a texture;-- how pressure and tilt change the size, flow and opacity, and the curve between the lightest and the heaviest press;-- colour dynamics;-- the kind of paint: dry, wet (picks up and mixes the colour under it), smudge or blend, and body.--Give it a name and click "save in this drawing". A drawing keeps every brush its strokes use, so it looks the same on any machine and the brush travels with it.--## Thick paint--Brushes with body, such as Oil and Loaded oil, lay paint with a height: ridges along the bristles and lips at the edges. The height only shows once the layer has a relief effect. In layer settings, add relief under the effects and click or drag on the light dial towards where the light comes from. Use a strong relief for a figure or fruit and a light one for a wall or a table.+1. Press **F5** to open the brush editor.+2. Change the tip, the pressure or the kind of paint, and watch the sample stroke at the top.+3. Type a name and click **save in this drawing**.-## Paint in mirror+## Tune your pen-Turn on "mirror" in the brush bar to paint every stroke and its mirror image across an upright line at the same time. Both land as ordinary strokes, so you can change either one afterwards.+1. Open the settings with **cmd ,** and go to **Pen**.+2. Press on the tablet as hard as you ever draw, then click **heaviest = my peak**.+3. If light strokes still come out too heavy, set the curve above 1.diff --git a/docs/guide/selecting.md b/docs/guide/selecting.mdindex cf2ed9c..690883f 100644--- a/docs/guide/selecting.md+++ b/docs/guide/selecting.md@@ -1,41 +1,36 @@-# Selecting and changing strokes+_Last updated: 2026-11-08 14:50_-A stroke stays a stroke after you draw it: klad keeps its path, its pressure, its brush and its colour. So you can pick up any stroke later, yours or an agent's, and move it, recolour it or bend it, and klad paints it again.+# Changing strokes++Pick up any stroke or fill, yours or an agent's, and move it, recolour it, bend it or delete it. klad paints it again in its new state.## Move something-Press V, then press on what you want to move and drag. V picks whatever you see under the pen, a brush stroke or a vector shape, and makes its layer the active one. Alt drag drags a copy and leaves the original where it was. A drag that starts on empty canvas lassoes strokes on the active layer.+Press **V**, press on what you want to move and drag. Hold **alt** to drag a copy.## Select strokes-Press S, then:--- click a stroke to select it, and shift click to add or remove more;-- drag a loop around strokes to lasso them;-- press cmd A for every stroke and fill of the active layer at this frame.--In the bar over the canvas, "this layer" and "all layers" decide whether a click picks only on the active layer or on whatever layer shows paint there. With "a lasso cuts strokes at its edge" on, a lasso also takes the parts of strokes that cross it, and the first change splits them there; with it off, it takes only strokes that lie wholly inside.+Press **S** and click a stroke. Shift click adds more, and dragging a loop lassoes them. **cmd A** selects everything on the layer at this frame.-## Change the selection+To pick on every layer instead of only the active one, switch the bar over the canvas to **all layers**.-The selection shows a box. Drag inside it to move, a corner to scale, an edge to stretch (past the opposite edge it flips) and the knob to turn. The arrow keys nudge it 1 px, or 10 px with shift.+## Change what you selected-The bar next to the selection flips it, turns it a quarter turn, recolours it with the current colour, makes the strokes thinner or thicker, sets their opacity, copies, pastes, duplicates in place (cmd D), deletes (Backspace) and drops the selection (Esc). Each of these is one step in the history.+Drag inside the box to move it, a corner to scale it and the knob to turn it. The bar next to the selection recolours it with the current colour, makes strokes thinner or thicker, duplicates it (**cmd D**) and deletes it (**Backspace**).-## Copy and paste strokes--With strokes selected under S, cmd C keeps them and cmd V pastes copies into the active layer at the current frame, in the same place. On a frame with no drawing yet, the paste starts one.+## Bend a stroke-## Work on several layers at once+1. Press **A** and click the stroke.+2. Drag a point or a handle. The stroke keeps its pressure, so its taper stays where it was.-In the Layers pane, cmd click or shift click other paint layers to add them to the active one; they get a blue edge. S then selects on all of them, and the selection moves, turns, recolours and deletes as one change, with every stroke staying on its own layer.+Alt click on the stroke adds a point.-## Bend a stroke+## Move a whole layer-Press A and click a stroke or a vector shape to show its points. Drag a point or a handle to change the path; a brush stroke keeps its pressure along the new path, so its taper and weight stay where they were. Alt click on the outline adds a point, alt click on a point switches it between a corner and a smooth point, and alt drag on a handle breaks it from its partner. Backspace removes the selected points. Layer settings also make points corners or smooth and simplify a path.+Press **cmd T** and drag inside the box to move the layer, a corner to scale it or outside it to turn it. It moves every drawing on the layer; switch off **every drawing** to move only this frame's. Press **Return** when you're done.-## Name parts+## Name the parts of a drawing-Select the strokes of one piece (a leaf, a leg), type a name under "part" in layer settings and click "make them this part". Parts are how in-betweens know which strokes belong together ([Animating](animating.md)).+Select the strokes of one piece, such as a leaf or a leg, type a name under **part** in layer settings and click **make them this part**. [In-betweens](animating.md#let-klad-draw-the-in-betweens) pair strokes by part.diff --git a/docs/guide/shapes-and-text.md b/docs/guide/shapes-and-text.mdindex 1b5bda4..44a09f8 100644--- a/docs/guide/shapes-and-text.md+++ b/docs/guide/shapes-and-text.md@@ -1,29 +1,29 @@+_Last updated: 2026-11-08 14:50_+# Shapes, paths and text-Shapes, paths and text live on vector layers. Add one with "vector" in the Layers pane. Their points stay editable, they stay sharp at any size, and they can be filled with gradients.+Draw shapes and text that stay sharp at any size and keep their points editable. They go on a vector layer: click **vector** in the Layers pane first.-## Draw rectangles and ellipses+## Draw a rectangle or an ellipse-Press U and drag. Shift makes a square or a circle, alt draws from the centre, and rectangles can have rounded corners. The fill is the current colour and the outline the second one, at the width in the bar over the canvas.+Press **U** and drag. Hold **shift** for a square or a circle.-## Draw paths+## Draw a path-Press P. Click to place a corner, drag to pull out a curve, click the first point to close the path, Return to finish it open, Esc to drop it. Closed paths are filled and outlined, open ones outlined; "fill" and "outline" in the bar turn either off.+Press **P**, click to place corners and drag to pull out curves. Click the first point to close the path, or press **Return** to leave it open.-## Change points+## Change the points-Press A and click the shape. Drag points and handles; alt click on the outline adds a point, alt click on a point switches it between corner and smooth, alt drag on a handle breaks it. A rectangle or an ellipse becomes a path the moment you change a point, and "simplify the path" turns a dense traced outline into a few smooth points.+Press **A**, click the shape and drag its points and handles. Alt click on the outline adds a point.-## Colour a shape+## Fill a shape with a gradient-Select the shape with V. The bar next to it fills it with the current colour or outlines it in the current colour. For a gradient, switch the fill in layer settings to linear or radial and edit its stops.+Select the shape with **V**, then in layer settings switch its fill to **linear** or **radial** and edit the stops.## Write text-Press T, click and type. Return starts a new line and Esc finishes. Double click existing text with V or T to edit it in place.--The font picker shows each family in its own face: about fifty open fonts come with klad, and a search finds any family on Google Fonts and downloads it. The font is copied into the drawing with its licence, so the text looks the same on every machine. "add a font" in the File menu puts a font file of your own in the drawing.+Press **T**, click and type, and press **Esc** to finish. The font picker also finds any family on Google Fonts, and the font is kept inside the drawing.-## Repeat, scatter and mirror a shape+## Repeat a shape-Select a shape and use "repeat it" (copies along a line, an arc or a grid), "scatter it" (copies strewn over an area, each sized and turned from a seed) or "mirror it" from the Layer menu. They stay settings you can change, and "take the shapes out" turns them back into plain shapes.+Select it and pick **repeat it**, **scatter it** or **mirror it** from the Layer menu. The copies stay settings you can change.diff --git a/docs/guide/with-an-agent.md b/docs/guide/with-an-agent.mdindex 25b0265..a7151f3 100644--- a/docs/guide/with-an-agent.md+++ b/docs/guide/with-an-agent.md@@ -1,18 +1,19 @@+_Last updated: 2026-11-08 14:50_+# Working with an agent-klad has no model inside. The agent is one you already run, Claude Code, Codex or anything else that can use a terminal, and it paints through the `klad` command line into the drawing you have open. Its strokes show up in your editor within about a second.+Let an agent you already use, such as Claude Code or Codex, paint into the drawing you have open. klad has no model inside: the agent works through the `klad` command line, and its strokes show up in your editor within about a second.## Set it up-1. In the editor's document menu (at the foot of the tool strip), click "install the klad command". It puts `klad` on your terminal's path for you and your agent (`klad install` does the same).-2. Tell the agent to run `klad skill` and read what it prints: that's its manual.-3. Copy the drawing's path from the File menu and give it to the agent with what you want: "Paint a lantern on its own layer in art.klad, lit from the left."+1. In the document menu at the foot of the tool strip, click **install the klad command**.+2. Ask your agent to run `klad skill` and read what it prints.+3. Copy the drawing's path from the File menu and tell the agent what you want: "Paint a lantern on its own layer in art.klad, lit from the left."-## Point at things+## Point at something-- Press N and click the canvas to pin a note there ("more moss on this side"). The agent reads open notes with `klad notes`, and when it marks one done the pin turns green. The Notes pane lists them all.-- Whatever you select in the editor, the agent can read with `klad selection`, so "make the selected strokes thinner" works.+Press **N** and click the canvas to pin a note there, such as "more moss on this side". The agent reads your notes and what you've selected, and a pin turns green when it's done.-## Keep control+## Undo what the agent did-Every change the agent makes is a step in the same history as yours. The History pane says who made each step, and cmd Z undoes the agent's step just like your own. Its strokes are ordinary strokes marked as the agent's: repaint, move or delete them by hand, and its next pass starts from your version.+Press **cmd Z**: the agent's steps are in the same history as yours, and the History pane says who made each one. Its strokes are ordinary strokes, so you can also repaint, move or delete them by hand.