Skip to content

armgit / klad

Public Imported from GitHub
0

A drawing app built for agent/human collaboration

Rust
22.6 KB
Raw Blame

Changelog

Unreleased

  • Fixed opening a drawing on the Mac: Choose a .klad file... in the start window (it said folder) and File > Open… could not pick a .klad drawing, which Finder shows as one file. The open panel now takes a .klad drawing; other files are greyed out.
  • Fixed shade and rim on posed layers. The shade and rim fills that klad light makes keep the part of the shape outside a cut, and a pose turned the fill with its bone but left that cut where it was in the rest drawing, so in posed frames and their in-betweens the rim grew into a wide crescent and the shade slid away. Posing now moves the cut with the fill, in klad apply poses, in-betweens and the editor alike; a frame posed before this comes right when you pose it again.
  • Fixed cuts in in-betweens. A fill or stroke cut by a lasso kept its cut where it was in the first key when an in-between moved it: flood fills between keys, and marks that ride a line (marks drawn by hand between keys and marks found in one key only). The cut now moves with the mark.
  • Fixed hard edges on posed fills. A pose sampled each fill at the nearest pixel, so a turned fill got a stepped edge and thin bands along it broke into dots; it now blends between pixels as klad transform does, and a pose and a transform of the same turn give the same picture. Frames posed before this keep their old edge until they are posed again.

0.2.0 (2026-11-12)

Pixel art: pixel layers in the colours of a palette, tools that draw whole pixels, animation, tiles, checks and exports that stay sharp. Drawings are saved in format klad/7; older drawings open unchanged.

  • Pixel layers, the start of pixel art in klad. A pixel drawing (Pixel art in the start window, or klad new sprite.klad --pixel 64x64) is a small drawing of whole pixels with no soft edges; Layer > New pixel layer or klad add art.klad layer pixel adds a pixel layer to any drawing. klad pixel sprite.klad l1 --color skin --cells '4-11,5-9' puts pixels on it as one mark bound to a palette colour (a colour the palette lacks is added), and --erase clears them. Each mark stays editable: recolour it with klad set, move it with klad transform, remove it with klad rm; klad strokes lists them. Exports above full size keep the pixels square. Brush strokes and fills stay off pixel layers. The format is now klad/7 (stroke files version 3); older drawings open unchanged.
  • A sharp view for pixel drawings. In the editor the zoom steps in whole pixels, so every pixel is the same size; a grid shows between the pixels once you are zoomed in (View > Pixel grid), the pixel under the pointer is outlined and its position shows in the status line, and the Real size panel shows the drawing as the player sees it, at 1x, 2x or 4x. klad render enlarges a pixel drawing to about 512 px, and --overlay grid numbers its pixels along the top and the left.
  • The palette of a pixel drawing. Changing a palette colour changes every pixel painted with it: click the colour in the palette, change it, and press update (or klad palette art.klad --recolour skin --to '#e8b796'). palettes adds the colours of a palette that comes with klad (PICO-8, Resurrect 64, four greens, 1-bit; klad palettes lists them) or of a palette file, a list of hex colours or a GIMP palette (klad palette art.klad --load pico-8). ramp adds five steps of the current colour, from dark and cool to light and warm (klad palette art.klad --ramp wood --base '#8b5a2b'), and --ramp skin --of skin-dark,skin,skin-light groups colours the palette has.
  • The pixel pencil and eraser. On a pixel layer the brush tool (B) draws whole pixels in the current colour, which joins the palette, and the eraser (E, or the pen's eraser end) clears them; each drag of the pencil is one mark, and the eraser takes its pixels out of the marks under it and leaves none of its own, so pixels you move there later stay whole. A one-pixel line is pixel perfect (no doubled corners), the size is a square of whole pixels ([ and ]), and shift click draws a straight line from the last pixel. From the command line, klad pixel takes --path (SVG path data as a line of pixels) and --size.
  • Sprites as text, for agents. klad pixel sprite.klad l1 --grid sprite.txt draws a sprite from a legend (i = ink) and rows of characters, one per pixel, each character becoming one mark bound to its palette colour; klad pixels sprite.klad l1 reads a pixel layer back the same way, with its legend and numbered rows and columns (--plain in the form --grid reads, --json).
  • Shapes and fill on the grid. On a pixel layer the fill tool (G) fills every pixel joined to the one you click that has exactly its colour (across corners, read all pixel layers), and the shape tool (U) drags a rectangle, an ellipse or a line of whole pixels, outlined or filled. From the command line: klad pixel with --line, --rect, --ellipse (--filled) and --fill x,y (--diagonal, --ref).
  • Selecting and editing pixels. On a pixel layer the stroke tool (S) drags a box, or a loop, around pixels and takes them, cutting marks between whole pixels; drag them to move by whole pixels, scale by whole numbers or turn by quarters, and the bar under them flips, turns, recolours (exactly the current colour), copies and deletes. Select same colour takes every mark in the selected colours. From the command line: klad lasso takes --box x,y,w,h, klad strokes --entry skin lists one colour's marks, and klad recolour gives pixel marks the exact palette colour.
  • Shading pixels. The pixel pencil, the shape tool and the fill tool have three inks: colour, lighter and darker; the last two step the pixels you go over along their colour's ramp. dither draws a share of the pixels in an even pattern, with the second colour for the rest. Layer > Outline the pixels adds a one-pixel outline in the current colour, and Lighter and Darker in the bar under selected marks step them along their ramp. From the command line: klad pixel --shade, --dither with --second, --outline (--inside), klad recolour --step, and klad recolour --from skin --to skin-dark to replace a colour.
  • Mirror and tiles for pixel art. The pixel pencil, shape and fill tools draw each pixel's twin across the mirror line. View > Tile: wrap at the edges makes the drawing a tile: what you draw past an edge comes back in on the other side, fills go round the edges, and the canvas shows its repeats around it. From the command line: klad pixel --mirror-x 16 (and --mirror-y), klad new tile.klad --pixel 16 --wrap, klad canvas tile.klad --wrap on, and klad render --repeat 3 to see a tile repeated.
  • Animating pixel layers. Frames, holds, links, clips and onion skins work on pixel layers as on paint layers. A keyed pixel layer moves by whole pixels and stays sharp. In-betweens, poses, weights and bones refuse pixel layers and say why: they move points and bend strokes, so draw the frames or key the layer's position.
  • Exports that stay sharp, and GIFs. A pixel drawing exports at whole-number sizes only, up to 64 times (klad export sprite.klad --scale 8), enlarged pixel for pixel; the export window shows times real size and the size in pixels. Sheets, numbered frames and Godot exports follow the same rule, and the Godot scenes of a pixel drawing turn texture filtering off. New for every drawing: klad export art.klad --gif and GIF in the export window write an animated GIF for each clip, or one of the whole timeline, with each frame's own duration. A GIF holds 255 colours: --dither (the dither box) mixes them in a fine pattern so the soft gradients of a painting do not band.
  • Palette variants. A drawing can hold other colours for the same sprite, like a blue team beside a red one. In the Colour panel new variant makes one and shows it; colours you change while it is shown are its own, and the palette itself keeps its colours. Pick base or a variant under the palette to show it. The export window exports what is shown, one variant, or every variant in one go. From the command line: klad palette --new-variant blue, --variant base, --rename-variant, --rm-variant, and klad export --variant blue or --variants.
  • Aseprite files in and out. klad import hero.aseprite opens an Aseprite file as a klad drawing: its layers and groups, every frame's drawing, linked cels, the palette and its tags as clips. In the editor, Choose an Aseprite file... in the start window (or its path pasted there) does the same and opens the drawing it made. klad export hero.klad --aseprite, or Aseprite in the export window, writes a drawing's pixel layers back to an Aseprite file. klad says what it leaves out each way.
  • Pictures to pixels. File > Pixels of a picture… turns a PNG or JPEG into pixels on the pixel layer you are on, in the palette's colours, or makes a pixel drawing of the layer you are on or of the whole picture at a size you choose. From the command line: klad pixelize sprite.klad --image ref.png --to l1, klad pixelize hero.klad --size 64, and klad import ref.png for a new pixel drawing from a picture. Each pixel becomes part of a mark bound to a palette colour, so the result is edited like any pixel drawing.
  • Tilesets. View > Tileset: cut into tiles… cuts a drawing into tiles of one size; the canvas shows the tile lines, and as a tile set in the export window writes a Godot TileSet with a tile for every cell that is not empty. From the command line: klad new ground.klad --pixel 64x48 --tile 16, klad canvas --tile 16, klad pixels --tile 2,0 and klad pixel --grid --tile 2,0 to read and draw one tile at a time, and klad export --tileset <folder>.
  • Pixel checks. klad check sprite.klad lists the usual slips of pixel art with their places: single stray pixels, doubled corners in one-pixel lines, jagged lines, banding, and colours that are not in the palette. In the editor Check the pixels marks them on the canvas and follows your edits until you turn it off. They are places to look at, not errors.
  • A third agent skill, klad skill pixel: the craft of pixel art (size and palette, silhouette, clusters, clean lines, outlines, ramps with hue shift, shading without pillow shading or banding, anti-aliasing by hand, tiles, and a checklist at real size), and animating a sprite frame by frame: the four poses of a walk, heights and holds, what moves with the body and what trails it, the idle, and how to judge it. Under the MIT licence, like the other two.
  • Two pixel art samples, sprout (a 32 px character with an idle and a walk) and ground (a tileset of 16 px tiles), in the start window and klad samples, and a guide, Drawing pixel art: starting a drawing, drawing and mirroring, moving pixels, ramps, a second colouring, animating a sprite, turning a picture into pixels, the checks, tiles and exports.
  • klad check is quiet enough to read: it lists what stands out (a single pixel outside the shape or in a flat area, an L in a drawn line) and counts single pixels among other colours and corners in shading in one line as left out. A 64 px sprite that gave 77 findings gives 15. The editor's Check the pixels marks the same ones.
  • klad export -o takes a folder that exists for every kind of export and puts the export in it under its usual name; a sheet used to land next to the folder.

0.1.17 (2026-11-11)

The first builds, and klad's licences.

  • A new icon, painted in klad: a K in two brush strokes.
  • Align and distribute shapes. With V, shift click adds a shape to the selection and a loop dragged on a vector layer takes the shapes inside; several shapes move, scale, turn, flip, duplicate and delete together. The bar under them lines up their left, right, top or bottom edges or their centres and spaces three or more evenly; one shape lines up on the canvas (Edit > Align). From the command line: klad align art.klad n3 n4 n7 --y middle --spread x, with --to canvas or --to <shape> and --gap.
  • Fixed exports of a clip moved by keys (a layer, group or shape keyed between frames, with no drawing per frame): klad export --sheet, --frames and --godot wrote the first pose for every frame, and klad render --sheet showed them as held. Each pose is now its own picture.
  • A second agent skill, klad skill drawing: the craft of drawing and painting (planning a picture, light on form, values, edges, colour, materials, line, a painting method and a critique checklist), under the MIT licence like the first.
  • Drawings are .klad folders in a fresh format, klad/6 (drawings from the first builds open as they are, except their bones, which are dropped). Drawings from before (.draw folders) do not open and are not converted.
  • Drawings live well in git: an edit changes only the files of what it edits (doc.json keeps no revision or id counter), and copies of a drawing edited apart, in a clone or a worktree, never make the same id, so edits to different layers merge. New ids end in the copy's two-letter tag (l48qa, c12:s349qa); klad info shows it. The editor follows a git checkout of an open drawing, and klad never renders an old picture from its cache after one. Recolouring several strokes or fills at once (the selection bar in the editor, or klad recolour) moves them to the new colour together and keeps each one's own shade, so a painted-over area stays painted. If a merge still leaves an id used twice, klad repair (or Repair and open when the drawing won't open) gives every later one a new id and moves its stroke files along.
  • Erasers, smudges and blends stay with the strokes they were drawn over: move, copy or delete the strokes and they come along (or split, when only some of the strokes move), and an eraser erases only its own strokes, so moving them never bites into the paint they land on. The selection bar shows what is attached, "attached only" moves it on its own (it attaches to what it lands on), and detach frees it (klad detach); a stroke its erasers wipe out completely is skipped by clicks and the lasso. klad strokes --json lists on, attached and hidden. Stroke files move to version 2 (format klad/6); older drawings open with nothing attached.
  • Bending a stroke with the point tool bends what is attached to it. The eraser has a feather slider in the brush bar, for the pen's eraser end too: its edge fades out like an airbrush. Brushes take feather and fringe (an edge frayed into streaks along the stroke, like a dry brush), in the brush window and in klad brushes --set.
  • klad is source-available, not open source: the app is under the PolyForm Internal Use License 1.0.0, with permission for personal use (building from source is free for it), to propose contributions and to share the drawings you make (LICENSE). Companies with 500,000 euros or more in revenue a year buy a licence for each person who uses klad; a bought build is that licence, under the same terms. The file format (docs/format.md), the command reference (docs/cli.md), the agent skill and the new klad-client crate are MIT (LICENSE-MIT), so any program or agent can read, write and make klad drawings. Contributions come in under a contributor licence agreement (CLA.md).
  • klad-client: run klad from Rust, apply edits as JSON ops, read drawings back as JSON, render them.
  • Builds for macOS (an app, Apple silicon and Intel in one) and Windows, sold on itch.io; Linux from source. Each has the klad command line, the editor, the fonts, the licences and the agent skill.
  • The editor runs on Windows and Linux (klad open, or klad-editor), with the platform's open dialog; pens that report pressure through the system (Windows) draw with it.
  • On a Mac, .klad drawings show in Finder as one item and open in klad with a double click.
  • klad install (and "install the klad command" in the editor's document menu) puts klad on the terminal's path, for you and for agents. klad skill prints the agent skill.
  • The editor checks once a day whether a newer version is out and says so, with a link to what changed (off in the settings window); About's "check now" and klad updates check on demand and say why a check failed.
  • klad --version, About and the start window show the version and the commit a build was made from; just build counts the version up for every build.
  • In-betweens blend colours evenly (in OKLab), so light can follow a turning limb when the second key is coloured for it.
  • klad arcs follows the part of a foot on the ground: a heel-to-toe roll is no longer reported as a slide.
  • Help > Report a problem shows the report before it is copied (version, system, the last messages and lines of klad's log, with your home folder hidden) and can zip the drawing to attach; klad report prints the same. Errors and crashes are kept in a small log for it.
  • Nothing in the editor names klad's internal ids: the status line, layer settings, selections, the in-between window, undo and the history say layers by name and drawings by frame, the timeline numbers each layer's drawings 1, 2, 3, and a new layer is called "paint 1" instead of by its id. The numbers window (timings) moves behind Settings > Layout > developer tools, off by default.
  • The format promise: from 1.0, a drawing saved by any release opens in every later one with nothing lost. Each release keeps copies of the samples it saved, and the tests open them all with each new build.
  • Help > Guides and Help > What's new open klad's guides and this changelog on klad.studio; the welcome on the start window links the guides too.
  • Support by email: Help > Contact support opens an email to [email protected] with the version and your system filled in; Report a problem can email its report there too, and About links klad.studio and the address. Crash messages name the address as well as the issues page.
  • Messages say what happened and what to do next; when klad itself goes wrong it says so, and that your work is saved.
  • Bones: a bones layer holds a skeleton (klad bone, the bone tool J), weights from the bones or painted (klad weights), and poses that bend the drawing (klad pose, pose mode); in-betweens of two poses turn the bones. The bone tool lists the skeleton, picks a bone in every mode, and moves ends, joints and whole bones with their children (klad bone --move with --by).
  • Transform a whole layer or group: cmd T puts handles round it, and a drag moves, turns or scales every drawing on it, its shapes, and its bones and poses (klad transform --layer).
  • Bones live on a bones layer (Layer > New bones layer, or the first bone you draw makes one; klad add <file> layer bones). Any paint layer in the drawing joins it: attached to a bone it moves with that bone alone, as a cut-out, so a character drawn in pieces needs no weights; or it bends with the skeleton by the weights (klad attach, the picked bone's layers menu, or the bone button on a layer's row). Pose mode shows the drawing posed as you drag; "make this pose a drawing" keeps it.
  • Bones are a preview: the bone tool, Layer > New bones layer, the bones guide and the help of klad bone, attach, pose and ik say so. Posing may still change; drawings keep their rigs when it does.
  • Bones are drawn as chains: letting go of a bone starts the next one from its end, each click adds one, shift fans them from one joint, Esc ends the chain (klad bone --chain).
  • IK: a bone and its parent become a limb (or a bone alone an aim) that reaches for a target, bending the way it is drawn, with softness so knees do not snap straight (klad ik, the bone tool's options). In pose mode, drag a limb's end and the limb follows; move the whole by a root bone's head and planted feet stay where they are (klad pose --target, --mix); in-betweens keep them planted. Exports to Godot carry the solved turns.
  • A first start: the start window welcomes, offers first steps (draw a shape, fill it, hand the drawing to an agent, ticked off as you go; Help > First steps opens them again) and six sample drawings that open as copies (klad samples lists and copies them).
  • Picking strokes takes what you see: the topmost layer that shows paint under the pen and the mark covering the point, on all layers or this layer only (the S and V options).
  • A selected shape takes the colour as its fill or its outline (the shape's bar, Edit > Shape).
  • Alt click on a layer's eye shows only that layer, and again the rest as it was (klad solo).
  • Menus: a menu bar (the Mac's own, an in-window one on Windows and Linux) holds every command in File, Edit, Tools, Layer, Frame, Animation, View, Window and Help, with short labels, its keys, ticks for what is on and greyed items for what cannot run now; File has close (cmd W) and recent drawings.
  • Keys: layers, groups and shapes move, turn, scale and fade between frames with eases (klad key, the keys section of layer settings).
  • Godot: --godot-rig exports a Skeleton2D with Polygon2D parts and the poses as animations; --godot-scene a parallax scene with a Parallax2D per depth plane.
  • klad paintover (and "paint over" in the layers panel): brushwork from any picture, strokes that follow its forms and stop at its colour edges, big to small, detail where the picture has it; --like and --frames carry it through an animation without boiling.
  • klad compare (and "compare with the reference" in the editor): a drawing against a reference picture in numbers and words, with a heat map.
  • Large stills render several times faster: strokes land only where they painted, and the CLI replays a drawing's tiles on every core (same pixels).
  • Dragging in a large drawing: shapes and strokes move under the pointer from the first move, wherever they are (in groups with effects, clipped, masked, under any blend), drawn in the background tile by tile; the layers above and the rest of the dragged layer stay in place (dragging a shape on the topmost layer no longer hid the shapes above it), and letting go redraws only the tiles the move touched.
  • Edits on vector layers redraw only the tiles their shapes covered before and after, not the whole layer.
  • Noise and haze no longer make every edit redraw the tiles around it.
  • Drawings with many clipped layers and groups redraw several times faster: each tile skips the stacks that have nothing in it.
  • A tap that wobbles selects a shape or strokes without nudging them: a drag starts once the pointer has moved 3 points on screen.
  • The numbers panel shows how long the canvas takes each frame, next to the rest of the interface.
  • Switching layers no longer redraws the whole canvas when nothing on it changes.
  • Fixed tiles that could stay blank or out of date when a panel or popup was laid out for the first time while the canvas was being redrawn.

0.1.0 (2026-11-04)

The first public version: the klad command line on macOS and Linux and the editor on macOS, built from source.