Repository avatar
AI Tools
v0.3.0
active

spritesheetgen

io.github.terror668/spritesheetgen

AI sprite sheets for 2D games: generate a character, animate it, export PNG, JSON and Godot files.

Documentation

SpriteSheetGen

English · 简体中文 · 日本語 · 한국어

npm

AI sprite sheet generator for 2D games, as an MCP server and a CLI. Describe a character, animate it (walk, run, idle, attack, jump), and get engine-ready files in your project folder: a sprite sheet PNG, a TexturePacker JSON atlas, a Godot 4 SpriteFrames resource, single frames and a GIF preview.

Product: spritesheetgen.com · Docs: terror668.github.io/spritesheetgen

Free browser tools: video to sprite sheet, GIF to sprite sheet, sprite sheet maker, cutter, sprite sheet to GIF

Little knight walk cycle Little witch walk cycle Baby dragon walk cycle Combat mech walk cycle

Quick start with an AI agent

Paste this into Claude Code, Codex or another agent with MCP:

Set up SpriteSheetGen for me: follow https://spritesheetgen.com/agents/install.txt

The agent installs the MCP server and the agent skill. You then create an API key on https://spritesheetgen.com/account/ and store it in your own terminal (it is typed hidden, never pasted into the chat):

npx -y @spritesheetgen/cli login

Add the MCP server by hand

# Claude Code
claude mcp add spritesheetgen -s user -- npx -y @spritesheetgen/cli mcp

# Codex
codex mcp add spritesheetgen -- npx -y @spritesheetgen/cli mcp

Claude Desktop, Cursor, Windsurf and other clients that read an mcpServers file (examples/mcp.json):

{
  "mcpServers": {
    "spritesheetgen": {
      "command": "npx",
      "args": ["-y", "@spritesheetgen/cli", "mcp"]
    }
  }
}

Node.js 20 or newer. The server runs over stdio and reads the key saved by login (or SPRITESHEETGEN_API_KEY), so logging in later needs no restart.

Tools

ToolCreditsWhat it does
estimate_spritefreePrice of a character or an action, your balance and the key's remaining budget
improve_promptfree (small daily quota)Turns a rough idea into a character description that generates well
create_characterpaidOne character image from a description
upload_characterfreeUses your own PNG, JPEG or WebP character instead
animate_characterpaidOne animation of a character: walk, run, idle, attack or jump
get_generationfreeStatus and result of a generation (can wait for it)
list_charactersfreeCharacters you generated or uploaded
list_actionsfreeAnimations a character already has, so you never pay twice
export_sprite_sheetfreePacks a finished animation (or a local GIF) into a folder on your machine

An agent always estimates first, shows you the price and spends only after you approve it. Every paid call carries a max_credits cap and a client_key, so a retried request is never charged twice.

API keys and spending limits

Keys are created on the account page. Each key has its own permissions and a daily and total credit cap; a new key cannot spend until you allow it. The key is stored in ~/.config/spritesheetgen/credentials (%APPDATA% on Windows), readable only by you; logout removes it.

New accounts receive 25 credits. Current prices are on the pricing page; the estimate tool always returns the live price.

CLI

The same features without MCP:

npx -y @spritesheetgen/cli --help

spritesheetgen estimate --description "a small beetle knight" --json
spritesheetgen character --description "a small beetle knight" --client-key my-unique-key-0001 --max-credits 5 --json
spritesheetgen animate --reference generation:CHARACTER_ID --action walk --client-key my-unique-key-0002 --max-credits 10 --json
spritesheetgen export --id ANIMATION_ID --out ./assets/beetle-walk --name walk --individual-frames --preview --json

Exporting a GIF you already have needs no key and costs nothing:

npx -y @spritesheetgen/cli export --file ./walk.gif --out ./assets/walk --name hero_walk --preview

What an export contains

See samples/little-knight-walk: the knight's walk on a green screen, packed by the CLI (background removed, edges cleaned, frames aligned).

FileUse it in
sheet.pngAny engine: frames in a row (or a grid), transparent background
sheet.jsonPhaser, PixiJS and other engines that read TexturePacker JSON (hash), with an animations block
animation.tresGodot 4: a SpriteFrames resource for AnimatedSprite2D, with speed and looping set
preview.gifA quick look
export.jsonThe settings used, to repeat the export
frames/*.png, frames.zipUnity, GameMaker or any tool that wants single images (--individual-frames)

Phaser 3:

this.load.atlas("knight", "sheet.png", "sheet.json");
this.anims.create({ key: "walk", frames: this.anims.generateFrameNames("knight", { prefix: "knight_walk_", end: 11, zeroPad: 2 }), frameRate: 14, repeat: -1 });

Godot 4: put sheet.png and animation.tres in the same folder, then drag animation.tres onto an AnimatedSprite2D's Sprite Frames.

About this repository

This repository holds the documentation, configuration examples and sample output for the @spritesheetgen/cli package on npm. Questions and bug reports are welcome in issues or at support@spritesheetgen.com.

The contents of this repository are released under the MIT license.

NPM
@spritesheetgen/cli
Install Command
npm install @spritesheetgen/cli