Constrained Python pipeline for AI-generated pixel animation spritesheets.
pip install spriterrific==0.20.5 Copy PIP instructions
Turn a character prompt or reference image into game-ready pixel spritesheets.
Spriterrific is a local Python asset pipeline for AI-assisted 2D game characters. It helps you create a clean character anchor, generate animations, recover frames, curate motion, and export spritesheets, GIF previews, and metadata your game can load.
Watch the short promo reel | Read the Studio guide | Read the operator guide | See the changelog
Start with a prompt or image. Choose the animations your game needs. Export clean runtime assets.
AI models can produce promising game art, but the raw outputs are rarely ready for an engine. Spriterrific adds the missing production steps:
The goal is not one magic prompt. The goal is a repeatable asset pipeline.
Spriterrific keeps the Python engine actions deliberately generic, then lets the SDK and Studio expose friendlier project vocabularies.
Use --animation-template fighting-game with SDK/Studio workflows when you want fighting-game action names. Use --preset-profile fighting-game with the raw CLI when you are running the generic engine actions directly.
For point-and-click adventure work, use --animation-template point-and-click or --preset-profile point-and-click. The current left-facing adventure convention is --direction sw, which means front-left three-quarter rather than a true platformer side profile.
Frame counts are recommendations, not universal laws. In normal CLI/SDK runs, unsupported requested counts are coerced to the nearest recommended count and recorded in run metadata. Use --strict-frame-counts when you want invalid counts to fail before a provider call.
Spriterrific supports two practical art targets:
If you intend to pixel snap, start from a pixel-snapped anchor. This matters even when the final animation comes from image-to-video.
Use the default lobit-v1 candidate style when you want Spriterrific to distill a prompt or image into its opinionated snap-ready low-bit style. If you want richer high-fidelity/mixel game art and do not want the anchor pixel-snapped, use:
--candidate-prompt-preset high-fidelity-v1 \ --no-pixel-snap-anchor If you already have a reference image whose style must be preserved, use:
--source-image path/to/reference.png \ --candidate-prompt-preset preserve-reference-v1 preserve-reference-v1 treats the source image as strict visual authority for proportions, palette, line weight, rendering style, silhouette, and outfit cues. Pixel snapping remains a separate choice: pair it with --pixel-snap-anchor to snap/clean the reference style, or --no-pixel-snap-anchor to keep richer mixels.
To change one thing about an existing character — a new outfit, a swapped prop — without losing the character, pass the existing anchor as the source image plus an edit instruction:
--source-image runs/my-hero/anchors/w/anchor-snapped-1024-chroma.png \ --edit-prompt "replace the robes with a white hoodie and grey joggers" --edit-prompt selects the edit-reference-v1 candidate style: it applies only the described change while keeping the face, skin tone, hairstyle, proportions, pose, and rendering style pinned to the input image. Describe only the delta — everything you do not mention is preserved.
The high-fidelity, preserve-reference, and edit-reference choices also use less low-bit source prompting for prompt-only runs, so the source does not start from strict lobit constraints unless you ask for them.
uvx spriterrific --help Or install it as a tool:
pipx install spriterrific # or uv tool install spriterrific # or plain pip pip install spriterrific The examples in this README use uv run spriterrific ... (running from a source checkout). If you installed via pipx/uv/pip, drop the uv run prefix and call spriterrific ... directly.
Set provider keys in a .env file in your working directory (or export them in your shell) when running live generation:
FAL_KEY=... FAL_API_KEY=... REMOVE_BG_API_KEY=... Agent skill Spriterrific ships with a bundled agent skill so coding agents (Claude Code, Cursor, Codex) can drive the full anchor/animation workflow for you. Install it into your game project:
cd your-game-project spriterrific skill install # writes .claude/skills/spriterrific spriterrific skill install --target all # also .codex/skills and .agents/skills Then ask your agent to "use the spriterrific skill" to generate characters and animations.
If you are working from a source checkout, use uv:
uv sync uv run spriterrific --help uv run pytest Using Studio If you prefer the local web UI, start with the Studio guide. The short version: anchors define the character/object, camera view, facing, and art style; animations should use an accepted anchor as the reference and describe only the motion.
uv run spriterrific bootstrap-anchors \ --character-id robin-chute \ --source-prompt "whimsical human-like forest outlaw, full-body neutral pose, readable silhouette, charming but not goofy" \ --directions w \ --game-view platformer \ --anchor-role character \ --anchor-context "side-scrolling platformer character, true W profile" \ --k-colors 64 \ --run-dir runs/robin-chute-bootstrap From a reference image:
runs/robin-chute-bootstrap/candidate/front/snapped-1024-chroma.png runs/robin-chute-bootstrap/candidate/front/anchor-1024-chroma.png runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png runs/robin-chute-bootstrap/anchors/w/anchor-1024-chroma.png runs/robin-chute-bootstrap/anchors/w/facing-check.json runs/robin-chute-bootstrap/review/bootstrap/index.md Image models often ignore "face screen-left" and emit the character facing the other way, which mirrors every downstream animation. For every direction with a screen side (w/e and the diagonals sw/se/nw/ne, in any --game-view), bootstrap-anchors checks the anchor's facing and, by default (--auto-orient), mirrors a confidently wrong-way anchor to canonical (w, sw, nw = screen-left; e, se, ne = screen-right). Three-quarter and overhead anchors are checked with an automated visual check that uses your fal key. The CLI, the bootstrap review page, and facing-check.json report the result (ok / auto-oriented / mismatch / uncertain / skipped). Pass --no-auto-orient to only warn, or --no-check-facing to skip.
For enemies, turrets, props, or non-platformer camera views, pass explicit --game-view, --anchor-role, and --anchor-context. Do not rely on a generic character prompt when the asset has special anatomy or camera requirements.
For Warcraft-like RTS units, use rts-oblique instead of plain top-down:
top-down and isometric are available but experimental. Use top-down for loose overhead / three-quarter overhead sprites, and isometric for true tactics / diamond-tile experiments. They are less proven than platformer and rts-oblique.
For classic point-and-click adventure characters, use adventure:
uv run spriterrific run-actions \ --actions attack,hurt,jump,death \ --direction w \ --reference runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png \ --run-dir runs/robin-chute-actions \ --mode image \ --pose-board-preset hires \ --frame-prompt-style loose \ --pixel-snap \ --pixel-snap-source chroma-layout \ --k-colors 64 Generate Walk Or Run For video-derived motion, short clips usually work better than long cinematic clips. walk often needs about two seconds to complete the cycle; many other actions work best around one second when the provider supports it.
Video actions now carry timing semantics. Loop actions such as idle, walk, and run use a compact cycle-window selection. Transition actions such as jump, death, knockdown, and get_up sample the full source/range and include the final frame so the export does not cut off before the character lands, falls, or stands up.
uv run spriterrific run \ --action walk \ --direction w \ --mode video \ --reference runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png \ --run-dir runs/robin-chute-walk \ --video-model grok-imagine-video-i2v If the walk reads too much like a run, first try a slower runtime export and a wider/later loop-selection window:
For denser fighting-game exports, keep the same pipeline but choose the profile/actions that describe the motion. Use get_up directly instead of mapping it to jump; get-up starts grounded and ends standing/guarded, while jump is a takeoff-to-land transition.
For transitions with a known final pose, pass an explicit end reference. For example, get_up can start from the final knockdown frame and end at the standing directional anchor. Spriterrific will use WAN 2.7 when no video model is specified, because it supports first+last-frame video.
uv run spriterrific run \ --action get_up \ --direction w \ --mode video \ --preset-profile fighting-game \ --reference runs/fighter-knockdown-w/final-frame-1024.png \ --end-reference runs/fighter-bootstrap/anchors/w/anchor-snapped-1024-chroma.png \ --run-dir runs/fighter-get-up-w uv run spriterrific run \ --action heavy_attack \ --direction w \ --mode video \ --animation-template fighting-game \ --preset-profile fighting-game \ --frames 12 \ --reference runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png \ --run-dir runs/fighter-heavy-attack-w Then curate frames:
uv run spriterrific frame-picker \ --run-dir runs/robin-chute-walk \ --frames 8 \ --action walk \ --direction w \ --reference runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png Process the selected frames:
uv run spriterrific process-selection \ --picker-dir runs/robin-chute-walk/frame-picker/ \ --out-dir runs/robin-chute-walk/post-selection/walk-pixel-snap \ --action walk \ --direction w \ --columns 5 \ --fps 10 \ --preserve-motion \ --pixel-snap \ --k-colors 64 Finalize before copying assets into your game:
uv run spriterrific finalize-runtime \ --input-dir runs/robin-chute-walk/post-selection/walk-pixel-snap \ --output-dir runs/robin-chute-walk/final For video/I2V runs, treat fresh preview exports as review-only. A game-ready manifest should include:
{ "publicAssetReady": true } Video runs default to preserve-canvas recovery so stable image-to-video frames do not get cropped and recentered per frame. The cleanup path keys the configured chroma background to transparent black and writes export/preserve-canvas.json for audit. The default matte is chroma green #00FF00, but green characters should use a safer matte such as magenta:
uv run spriterrific run \ --action attack \ --direction w \ --mode video \ --reference runs/orc/anchors/w/anchor-snapped-1024-chroma.png \ --run-dir runs/orc-attack-w \ --chroma "#FF00FF" Use the same --chroma value for anchor bootstrap, action generation, and post-selection processing so prompts, cleanup, metadata, and review pages agree. Matte fringe cleanup is chroma-aware: it runs for any saturated matte color (green #00FF00, magenta #FF00FF, cyan #00FFFF), only before runtime scaling, and records warnings when too many matte-tinted pixels are removed. A despill pass then neutralizes the matte tint on the remaining anti-aliased edge pixels (for green, g = min(g, max(r, b))) without deleting pixels or changing geometry, which removes the residual color bleeding that keying and the fringe peel leave behind. Use --no-green-fringe-cleanup if the character has important foreground detail close to the matte color.
Provider seeds can be passed through for supported models:
uv run spriterrific run ... --seed 1234 uv run spriterrific bootstrap-anchors ... --seed 1234 Local Tools Included Spriterrific includes local tools for the non-glamorous parts of asset production:
Use Spriterrific like an asset workstation, not as code embedded inside your game:
~/projects/ my-game/ spriterrific-public/ Generate and review assets inside spriterrific-public/runs/, then copy only accepted final exports into your game:
my-game/assets/characters/robin-chute/ animations/ run/ spritesheet.png manifest.json preview.gif Keep the run folder as your audit/debug workspace.
Spriterrific is alpha software. It is useful today, but it still expects human review at the important gates: anchor choice, frame selection, alignment, and final promotion.
The first supported posture is local CLI usage. API and web surfaces exist for experimentation, but the CLI and Python tools are the clearest path for real asset work right now.
pixel-art spritesheet game-assets animation gamedev ai
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




