crsolver/claude-pxl

Media & Design

Pixel art as code: a compact DSL that turns text files into sprites, sheets, animated GIFs, and a live painting replay.

431
50
TypeScript
MIT
10 days old

Adoption takeaway: Worth your time if you want pixel art produced and kept as plain source files, or want an AI agent to draw it reproducibly. If you need a mouse-and-layers paint workflow, this is not your tool.

The problem

Before, a small game team or solo developer who needs sprites and animations faces a choice: paint them by hand, or have an AI describe an image it cannot precisely edit. Hand-painted files are hard to diff, recolor, or regenerate for 30 frames of animation; recolors and variants multiply into separate documents. With pxl, the source of truth becomes a short .px.js file (a palette, text-grid sprites, scenes, animation frames as patches). Running the CLI turns it into PNGs, sprite sheets plus JSON, and animated GIFs, while a browser viewer replays the painting op by op on each save — so you can watch an agent work rather than trust a finished image.

What's different

The mechanism is a small domain-specific layer over plain JavaScript or TypeScript: you write art as text, and the tool emits assets deterministically. That changes the practical workflow — recolors are one-line palette swaps against a base sprite, mirroring and auto-outline are flags, and animation frames are patches over a base rather than full redraws. The README also shows scenes with layers, shadows and optional lighting, and a built-in pixel font, which is more than a sprite-grid format.

The trade-off is real. This is text-as-art, not a canvas editor: there is no pointer drawing, so precise freehand work is awkward to impossible. The author documents no layer-file interoperability with common paint tools, so adopting pxl means committing to generated artifacts rather than round-tripping editable Aseprite-style sources. The DSL does much of the authoring, but the quality of a scene still depends on how well the grid and palettes are written.

Who should try it

Good fit: a developer building a small game or demo who wants sprites, sheets and GIFs regenerated from version-controlled source, and who is comfortable editing text. It also fits an AI agent workflow — the repo ships an agent skill that walks the agent through write → build → look at the preview → patch. Poor fit: a pixel artist who works primarily by hand in a canvas editor, or a team that needs to open and edit generated PNGs alongside existing painted source files.

There are two documented entry paths, and they affect who can start: a clone run directly with Node, or npx github:crsolver/claude-pxl build without cloning. The live viewer and replay are only described for the first path in the quick start, so check the serve path before relying on it.

Requirements and limitations

Node ≥ 22.18 is required. The clone path runs TypeScript sources directly through the CLI; the installed-package path runs dist/, which is generated by npm install / npm pack. The README warns that Node will not strip types inside node_modules, so anyone vendoring or packaging this needs the built output rather than the source tree.

Ongoing upkeep: the API surface is broad — palettes and ramps, primitives, scenes, animation, lighting, tilemaps — and the full reference lives in a separate reference file. Expect to lean on that documentation and on error hints that point at file:line:col with the asset and op path. For agents, the workflow depends on reading SKILL.md and the preview output; an agent pointed only at the CLI without the skill guide may not follow the intended paint-and-patch loop.

HotRepo's take

HotRepo first tracked this repo on 2026-10-24; on the NEW-REPOSITORY board for TypeScript it showed 431 total stars at #22, observed 2026-10-25, with only two recorded dates. That is a snapshot with no daily growth series, so persistence cannot be judged from it. The repo itself was created 2026-10-15 and is ten days old in the supplied data. Before investing, verify the documented npx route and the live viewer against your Node version, and confirm whether generated GIFs and sheets match what your engine imports.

Written by AI from the project's README, updated October 25, 2026. The project's own docs are the source of truth.