CLI Reference
Every mode8 subcommand and flag, with types, defaults, choices, exit codes and report keys.
This is the complete map of the mode8 command line: all 28 subcommands, every flag they accept, and what each one prints and exits with. It is the human-readable twin of mode8 schema --section cli, so if a flag is not on this page, it does not exist in Mode 8 1.0.0.
Note
This page is generated from mode8 schema --section cli, mode8.cli and tests/golden/outputs_v1.json by docs/manual/_tools/gen_reference.py. To change it, change Mode 8 (or the prose in the generator) and run the generator with --write; a test fails when this page is out of date.
How every command behaves#
- Every command except
mcpandstudio(long-running servers) prints exactly one JSON object on stdout when stdout is not a terminal (piped, redirected, captured) or with --json (or MODE8_FORMAT=json); diagnostics go to stderr. On a terminal (or --human) it prints a short human summary instead and errors go to stderr only; the JSON document is the contract. - Success prints
{"ok": true, ...}plus the command's report keys. Check commands also report a top-levelpass. - Failure prints
{"ok": false, "error": {"type", "msg", ...}}. The shapes, error types and exit codes are on Output Envelope and Exit Codes. mode8 --versionand-h/--help(on every command) print plain text, not JSON.- Paths are ordinary filesystem paths, relative to your current directory.
Here is the quickest way to see a report:
mode8 draft knight_right --out knight.pngGlobal flags: --version, --json, --human, --quiet.
Reading the tables#
- Type is the value's parser:
str,int,float,positive_int(an integer of at least 1),size(WxH, e.g.64x72),margins(9-slice margins). A flag takes no value. - Default is what you get when you leave the argument out. An empty cell means "not set": the command then picks its own behaviour, described in the text.
- Exit codes lists what the command can return.
0success,1a check failed,2bad input,3runtime error. - Report keys are the top-level keys of the JSON report in a representative run, as pinned by the contract tests. Some keys only appear with certain flags. New keys may be added in minor releases, so ignore keys you do not know.
Commands at a glance#
| Command | What it does | Exit codes |
|---|---|---|
mode8 init | Create a project, or a ready-to-run starter (--template) | 0, 1, 2, 3 |
mode8 list | List palettes, archetypes, tiles, rigs, templates, ... | 0, 2, 3 |
mode8 draft | Pose blockout: side, top-down, portrait or isometric | 0, 2, 3 |
mode8 gen | Draft-guided pixel art from a prompt (local ComfyUI) | 0, 1, 2, 3 |
mode8 inpaint | Regenerate a masked region, keep pinned pixels | 0, 1, 2, 3 |
mode8 icons | A matching set of inventory icons (local ComfyUI) | 0, 1, 2, 3 |
mode8 cast | Batch-generate a style-locked cast from a manifest | 0, 1, 2, 3 |
mode8 parts | Part map (head, torso, limbs) for a sprite | 0, 2, 3 |
mode8 anim | Zero-boil animation frames from a master sprite | 0, 2, 3 |
mode8 tile | Tiles, props, weapons and HUD portraits | 0, 2, 3 |
mode8 autotile | Blob terrain sets + Godot TileSet / Tiled TSX | 0, 1, 2, 3 |
mode8 aseprite | Import or export .aseprite files | 0, 2, 3 |
mode8 lint | Check a sprite (alpha, size, palette, shape); --fix repairs | 0, 1, 2, 3 |
mode8 pixelize | Snap any image onto a pixel grid and palette | 0, 2, 3 |
mode8 export | Atlas, Godot, GIF, Pixi, Phaser, Unity ... from frames | 0, 2, 3 |
mode8 ui | 9-slice UI kit (dialogs, buttons, bars) + Godot theme | 0, 1, 2, 3 |
mode8 font | Bitmap font: BMFont .fnt + PNG atlas | 0, 2, 3 |
mode8 import | Bring a sheet, PNG folder or .aseprite into a project | 0, 2, 3 |
mode8 maps | Normal + emission maps for 2D lighting | 0, 2, 3 |
mode8 recolor | Palette swaps and a Godot palette shader | 0, 2, 3 |
mode8 fx | Palette-locked effect frames (hits, sparkles, smoke) | 0, 2, 3 |
mode8 doctor | Check ComfyUI, models, extras; says how to fix | 0, 1, 2, 3 |
mode8 setup | Download the AI models into a ComfyUI install | 0, 1, 2, 3 |
mode8 verify | Check exported assets and animation stability | 0, 1, 2, 3 |
mode8 layers | Edit an asset's layer stack (journaled, undoable) | 0, 2, 3 |
mode8 mcp | MCP server for coding agents (stdio) | server |
mode8 studio | Pixel-art editor and AI workbench in your browser | server |
mode8 schema | Machine-readable contract (JSON) | 0, 2, 3 |
Commands#
mode8 init#
Create a project, or a ready-to-run starter (--template).
mode8 init [directory] [options]| Argument | Type | Default | Description |
|---|---|---|---|
directory | str | . | Project root directory (default: .). |
--name | str | Project name in mode8.toml (default: the directory name). | |
--default-palette | str | mode8.toml default_palette (default: nes_crimson_hero; set by the template with --template). | |
--default-size | str | mode8.toml default_size, as WxH, each side 1..1024 (default: 64x72). | |
--comfy-url | str | mode8.toml comfy_url: the ComfyUI server URL (default: http://127.0.0.1:8188). | |
--template | str | Scaffold a starter project with deterministic assets: platformer, topdown, isometric, scifi. | |
--force | flag | With --template: overwrite existing template assets instead of skipping them. | |
--list-templates | flag | Print the starter templates and exit. | |
--refresh-godot | flag | In an existing starter: re-export the art into godot/ with this Mode 8 (actors, animated fixtures and props; project.godot, scenes, scripts, tiles, UI and font are kept). | |
--assets | str | With --refresh-godot: only these comma-separated assets (default: every asset that has a Godot export). |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
Report keys: config, created, ok, project_root.
mode8 list#
List palettes, archetypes, tiles, rigs, templates, ...
mode8 list [WHAT]| Argument | Type | Default | Description |
|---|---|---|---|
what | str | One of: palettes, archetypes, tiles, rigs, templates, art-types, fx, materials, formats (default: a count of each). One of palettes, archetypes, tiles, rigs, templates, art-types, fx, materials, formats. |
Exit codes: 0, 2, 3.
Report keys: example, items, label, ok, topics, what.
mode8 draft#
Pose blockout: side, top-down, portrait or isometric.
mode8 draft [ARCHETYPE] --out PNG [options]| Argument | Type | Default | Description |
|---|---|---|---|
archetype | str | What to draw, e.g. knight_right, slime, topdown_hero (all: mode8 list archetypes); omit with --source. One of humanoid_right, humanoid_left, quadruped_left, quadruped_right, boss_quadruped_left, boss_quadruped_right, flyer, shrine, slime, knight_right, knight_left, adventurer_right, adventurer_left, topdown_hero, portrait_bust, isometric_block, isometric_tower, mech_right, mech_left, starfighter. | |
--pose | str | Draw the archetype in this pose instead of at rest, e.g. walk_0, windup, attack, jump, hurt (an archetype's poses: mode8 list archetypes --json; default: idle). | |
--source | str | Make the draft from this concept image instead (keys the background, crops, reduces and quantizes it; needs --size). | |
--palette | str | Palette: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default inside a project: mode8.toml default_palette). | |
--size | str | WxH, each side 1..1024 (default: the archetype's size, e.g. knight 64x72; required with --source). An archetype's Mode 8 1.0 size is drawn natively too. | |
--colors | positive_int | With --source: color count of the draft when no --palette is given (default: 16). | |
--key-color | str | With --source: the image's background color (default: measured on its border). | |
--out | str | Required. Output PNG path. |
Exit codes: 0, 2, 3.
Report keys: archetype, ok, out, size.
mode8 gen#
Draft-guided pixel art from a prompt (local ComfyUI).
mode8 gen prompt --out PNG [options]| Argument | Type | Default | Description |
|---|---|---|---|
prompt | str | What to draw, in plain words: the subject only (quote it). | |
--out | str | Required. Output PNG path (the best candidate). | |
--palette | str | Palette: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default: an auto palette; inside a project: mode8.toml default_palette). | |
--art-type | str | Art-type profile supplying preset/size/bg/outline/colors/tiling defaults: sprite, portrait, isometric, topdown, scene, icon, pc98, vn_bust (terrain tiles: mode8 tile). One of sprite, portrait, isometric, topdown, scene, icon, pc98, vn_bust. | |
--colors | positive_int | Color clusters: the auto palette's size, or with --palette how many clusters map onto it (default: the --art-type count: sprite/topdown/icon 16, isometric 24, portrait 32, scene 48). | |
--metric | str | Color distance for mapping clusters onto --palette (default: oklab). One of redmean, oklab. | |
--dither | str | Ordered dither, applied only on smooth gradients (default: none). One of none, bayer2, bayer4, checker. | |
--tile-x | flag | Make the result tile seamlessly left/right. | |
--no-tile-x | flag | Disable horizontal tiling (even for --art-type tile). | |
--tile-y | flag | Make the result tile seamlessly up/down. | |
--no-tile-y | flag | Disable vertical tiling (even for --art-type tile). | |
--preset | str | ComfyUI workflow preset: kleinedit repaints a --draft, style draws from the prompt alone (default: the --art-type preset, else kleinedit). One of kleinedit, style. | |
--draft | str | 1x pose draft that guides shape and size (from mode8 draft; required by kleinedit). | |
--prompt-mode | str | auto | auto: wrap a draft-guided prompt in the repaint instruction; raw: send the prompt as written (default: auto). One of auto, raw. |
--min-pose-match | float | Fail a candidate whose silhouette matches the --draft less than this, 0..1 (default: advisory only, reported as pose_match). | |
--ref | str | Reference image for style (e.g. an approved sprite). | |
--size | str | Target WxH, each side 1..1024: finer art is reduced to it, never upsampled (default: the --draft size, else the --art-type size, e.g. sprite 64x72, icon 32x32, scene 240x135; inside a project, sprites default to mode8.toml default_size). | |
--bg | str | Background: transparent (key the backdrop to alpha), fill (key it, then fill with the palette's darkest neutral) or keep (the backdrop as drawn) (default: from --art-type: portrait fill, scene keep, else transparent). One of transparent, fill, keep. | |
--passes | int | Render passes, 1 or 2: 2 hands the reduced first repaint back to the model to clean it up on the target pixel grid (sharper, about 30%% slower) (default: 2 with --draft, else 1). One of 1, 2. | |
--n | int | 3 | Candidates to render, 1..16 (default: 3). |
--seed | int | Base seed; candidate i uses seed + i (default: random). | |
--res | int | Render resolution, 1..4096: the style preset's render size (default: matched to --size, about 7 render pixels per art pixel); draft presets: the first-pass canvas (default: 512, 768 or 1024 by draft size). | |
--key-tol | int | 55 | How far the key color must stay from the outline color (default: 55; the background is measured on each render). |
--key-color | str | auto | Key color painted behind the draft: auto, magenta, green, cyan, blue, yellow, orange, or #rrggbb (default: auto, the one farthest from the palette). |
--no-despill | flag | Keep key-blended edge pixels (skip edge despill before clustering). | |
--outline-black | flag | Draw the added outline in #000000 instead of the art's darkest color. | |
--no-outline-black | flag | Never add an outline (default: a 1px outline only where the art has none). | |
--backend-wait | float | 30.0 | Seconds a ComfyUI that stopped answering gets to come back before the run stops, keeping the finished candidates (default: 30). |
--midnight-sky | flag | Ask for a dark night-sky backdrop instead of a flat key color. | |
--sheet | str | Save a zoomed contact sheet PNG for review. | |
--sheet-cols | positive_int | 12 | Contact sheet columns before wrapping to a new row (default: 12). |
--keep-candidates | str | Directory to retain all candidate and raw PNGs. | |
--workflow | str | Custom ComfyUI API workflow JSON template path. | |
--comfy-url | str | ComfyUI server URL (default: COMFY_URL, else comfy_url of the nearest mode8.toml at or above the current directory, else http://127.0.0.1:8188). |
Mutually exclusive: --tile-x / --no-tile-x.
Mutually exclusive: --tile-y / --no-tile-y.
Mutually exclusive: --outline-black / --no-outline-black.
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
mode8 inpaint#
Regenerate a masked region, keep pinned pixels.
mode8 inpaint master prompt --mask PNG --palette PALETTE --out PNG [options]| Argument | Type | Default | Description |
|---|---|---|---|
master | str | Master sprite PNG. | |
prompt | str | Prompt describing the regenerated region. | |
--mask | str | Required. Mask PNG (opaque/bright pixels = editable region). | |
--palette | str | Required. Palette path or bundled name. | |
--out | str | Required. Output PNG path. | |
--pins | str | Optional pinned-pixel mask PNG (preserved verbatim). | |
--preset | str | kleinedit | ComfyUI workflow preset (default: kleinedit). One of kleinedit. |
--n | int | 3 | Candidates to render, 1..16 (default: 3). |
--seed | int | Base seed (default: random). | |
--passes | int | Render passes, 1 or 2: 2 hands the reduced first repaint back to the model to clean it up on the target pixel grid (sharper, about 30%% slower) (default: 2). One of 1, 2. | |
--no-outline-black | flag | Do not re-ink the edited region's 1px outer outline in #000000 (default: re-ink it). | |
--key-tol | int | 55 | Chroma-key tolerance (default: 55). |
--sheet | str | Save a zoomed contact sheet PNG for review. | |
--sheet-cols | positive_int | 12 | Contact sheet columns before wrapping to a new row (default: 12). |
--keep-candidates | str | Directory to retain all candidate and raw PNGs. | |
--workflow | str | Custom ComfyUI API workflow JSON template path. | |
--comfy-url | str | ComfyUI server URL (default: COMFY_URL, else comfy_url of the nearest mode8.toml at or above the current directory, else http://127.0.0.1:8188). |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
mode8 icons#
A matching set of inventory icons (local ComfyUI).
mode8 icons ITEM... --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
items | str, one or more | What each icon shows, in plain words (quote each), e.g. "red potion" "iron sword"; at most 16. | |
--out-dir | str | Required. Output directory. | |
--palette | str | Palette: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default: an auto palette; inside a project: mode8.toml default_palette). | |
--colors | positive_int | Color clusters: the auto palette's size, or with --palette how many map onto it (default: 16). | |
--size | str | Icon WxH, each side 1..1024 (default: 32x32). | |
--n | int | 2 | Candidates per icon, 1..16 (default: 2). |
--seed | int | Base seed (default: random). | |
--sheet | str | Also save one row of every icon, zoomed, for review. | |
--keep-candidates | flag | Keep every candidate under <out-dir>/candidates/. | |
--comfy-url | str | ComfyUI server URL (default: COMFY_URL, else comfy_url of the nearest mode8.toml at or above the current directory, else http://127.0.0.1:8188). |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
mode8 cast#
Batch-generate a style-locked cast from a manifest.
mode8 cast manifest --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
manifest | str | Cast manifest JSON or TOML file. | |
--out-dir | str | Required. Output directory (one folder per member). | |
--style-ref | str | Optional approved master sprite to lock style across cast. | |
--dry-run | flag | Validate manifest and print planned jobs without ComfyUI. | |
--passes | int | Render passes, 1 or 2: 2 hands the reduced first repaint back to the model to clean it up on the target pixel grid (sharper, about 30%% slower) (default: 2, every member is draft-guided). One of 1, 2. | |
--comfy-url | str | ComfyUI server URL (default: COMFY_URL, else comfy_url of the nearest mode8.toml at or above the current directory, else http://127.0.0.1:8188). |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
mode8 parts#
Part map (head, torso, limbs) for a sprite.
mode8 parts image --out PNG [options]| Argument | Type | Default | Description |
|---|---|---|---|
image | str | Master sprite or 1x draft PNG. | |
--out | str | Required. Output indexed parts.png path. | |
--rig | str | humanoid | Rig whose parts to label: humanoid, quadruped, boss_quadruped, flyer, topdown, mech, vehicle, blob (default: humanoid). One of humanoid, quadruped, boss_quadruped, flyer, topdown, mech, vehicle, blob. |
--facing | str | right | Direction the sprite faces (default: right). One of left, right. |
--propose | flag | Auto-infer parts from a 1x draft by color & bands. | |
--overlay | str | Optional colorized RGBA overlay preview PNG. |
Exit codes: 0, 2, 3.
Report keys: legend, ok, overlay, part_ids, parts_map.
mode8 anim#
Zero-boil animation frames from a master sprite.
mode8 anim master --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
master | str | Approved master sprite PNG. | |
--rig | str | Built-in proportional rig: humanoid, quadruped, boss_quadruped, flyer, topdown, mech, vehicle, blob. One of humanoid, quadruped, boss_quadruped, flyer, topdown, mech, vehicle, blob. | |
--rig-file | str | Custom JSON rig specification file. | |
--archetype | str | The draft archetype the master was made from, e.g. knight_right: the rig's limbs are placed from it instead of fitted to the silhouette (default: fitted). One of humanoid_right, humanoid_left, quadruped_left, quadruped_right, boss_quadruped_left, boss_quadruped_right, flyer, shrine, slime, knight_right, knight_left, adventurer_right, adventurer_left, topdown_hero, portrait_bust, isometric_block, isometric_tower, mech_right, mech_left, starfighter. | |
--parts | str | Optional indexed part map PNG (from mode8 parts) to drive part articulation. | |
--out-dir | str | Required. Directory for the frame PNGs. | |
--prefix | str | Frame file name prefix (default: the master's file name; the asset name for assets/<name>/master.png). | |
--facing | str | Direction the master faces (default: the rig's canonical facing). One of left, right. | |
--frames | str | Comma-separated frame or animation names (e.g. idle,walk). | |
--sheet | str | Optional zoomed animation strip PNG. | |
--sheet-cols | positive_int | 12 | Contact sheet columns before wrapping to a new row (default: 12). |
Exit codes: 0, 2, 3.
Report keys: animations, archetype, facing, fit, frame_names, frames, master, method, ok, rig, rig_file, sheet, size, timing_sidecar.
mode8 tile#
Tiles, props, weapons and HUD portraits.
mode8 tile KIND --out PNG [options]| Argument | Type | Default | Description |
|---|---|---|---|
kind | str | What to make, e.g. grass, ground_top, brick, chest, sword (all: mode8 list tiles). One of brick, platform, stair_up, stair_down, sconce, gate, signpost, whip, whip_power, knife, flask, shard, heart, hud_portrait, sword, potion, gem, crate, chest, torch, grass, dirt, water, cobble, scifi_panel, iso_tile, tree, coin, energy_cell, ground_top, ground_fill, wall_back, ledge, pillar, stair_step, window_arch, door, stair_step_left, ledge_left, ledge_right, chain, tree_small, bush, rock, flower, iso_grass, iso_paving, iso_tree, iso_crate, iso_chest, iso_house, scifi_door, scifi_stair, scifi_stair_left, catwalk, pipe, vent, hazard_stripe, wall_light, scifi_crate. | |
--out | str | Required. Output PNG path. | |
--palette | str | Palette: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default inside a project: mode8.toml default_palette). | |
--size | str | Optional WxH, each side 1..1024 (default: the kind's size, e.g. terrain 16x16; terrain is drawn natively at any size, e.g. 32x32). | |
--source | str | Source sprite PNG (for hud_portrait). | |
--variant | int | 0 | Terrain and side-view kinds: which variant to draw, 0.. (default: 0); every variant tiles seamlessly with every other. |
--variants | positive_int | 1 | Terrain and side-view kinds: write N variants, <out>.png, <out>_v1.png ... (default: 1); terrain variants are weighted calm / light / feature (the report's weights). |
--outline-black | flag | Props: draw the 1px contour in #000000 instead of the palette's darkest color. | |
--shadow | flag | Props (trees, rocks, chests ...): also write a contact-shadow decal <out>_shadow.png to place under the prop at the same top-left. |
Exit codes: 0, 2, 3.
Report keys: animated, classes, files, frames, kind, ok, out, outline, outline_color, seamless, shadow, size, variant, variants, view, weights.
mode8 autotile#
Blob terrain sets + Godot TileSet / Tiled TSX.
mode8 autotile source --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
source | str | Base tile PNG path, a tile kind (e.g. grass, ground_top) or a two-terrain transition (grass_dirt, grass_water, dirt_water: the first terrain over the second). | |
--out-dir | str | Required. Output directory. | |
--name | str | terrain | Base name for the written files (default: terrain). |
--palette | str | Palette: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default inside a project: mode8.toml default_palette). | |
--layout | str | blob16 | blob16: 16 tiles, 4-neighbor; blob47: 47 tiles with inner corners (default: blob16). One of blob16, blob47. |
--formats | str | godot,tiled | Comma-separated outputs besides the PNG sheet and its JSON: godot, tiled (default: both). |
--godot-res-prefix | str | How the Godot resources reference their PNGs: omit (or 'relative') for paths relative to each .tres/.tscn, which work wherever the folder sits in a project, or a res:// folder the files are imported under, e.g. res://assets (default: relative). | |
--border-px | int | 2 | Edge border thickness of the blob tiles in pixels (default: 2). |
--style | str | auto | Edge style: grass (blade overhang and cast shadow), dirt (crumbling), water (foam line, 2 frames), curb (cobble curb stones), organic, masonry (brick), plain (default: auto, from the kind). One of auto, organic, masonry, plain, grass, dirt, water, curb. |
--view | str | top: edges on all sides; side: a platformer ground with a lip on top (default: side for ground_top/ground_fill, else top). One of top, side. | |
--outline-color | str | dark | Edge contour: dark (the terrain's darkest color) or black (#000000) (default: dark). One of dark, black. |
--size | str | Tile size for a tile kind, each side 1..1024 (default: the kind's size). | |
--variant | int | 0 | Which terrain variant the interior tiles use (default: 0). |
--interior-variants | positive_int | Tile kinds: interchangeable interior tiles the sheet carries, scattered by Godot and Tiled with the variants' weights (default: 8 weighted calm / light / feature variants for organic terrain such as grass, dirt and water; else 2 for blob47, 1 for blob16). | |
--no-physics | flag | Godot: no physics layer / collision polygons in the TileSet. | |
--occluders | flag | Godot: also add a light-occlusion layer. |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
Report keys: files, formats, frames, godot, interior_variants, layout, name, ok, out_dir, palette, pass, seam_lint, sheet, sheet_lint, source, source_type, style, terrains, tile_count, tile_size, tiled, view, weights.
mode8 aseprite#
Import or export .aseprite files.
Exit codes: 0, 2, 3.
mode8 aseprite export#
Write PNG frames or a project asset into an .aseprite file.
mode8 aseprite export [inputs...] --out ASEPRITE [options]| Argument | Type | Default | Description |
|---|---|---|---|
inputs | str, zero or more | Directory of PNGs or explicit frame PNG paths. | |
--project-root | str | Project root (with --asset: export a project asset). | |
--asset | str | Project asset name (assets/<name>/). | |
--layered | flag | With --project-root/--asset: write the asset's layer stack as real Aseprite layers. | |
--out | str | Required. Output .aseprite path. | |
--fps | int | 8 | Frame rate, 1..60 (default: 8). |
--palette | str | Palette to embed (path or bundled name). | |
--color-depth | int | 32 | Aseprite color depth: 32 (RGBA, default) or 8 (indexed). One of 8, 32. |
Exit codes: 0, 2, 3.
Report keys: bytes, cels, color_depth, durations_ms, frame_count, frames, layer_props, layers, ok, out, palette_size, palette_snapped_pixels, size, tags, timing_sidecar, transparent_index.
mode8 aseprite import#
Extract frames from an .aseprite file to PNGs.
mode8 aseprite import source --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
source | str | Input .ase or .aseprite path. | |
--out-dir | str | Required. Directory for the frame PNGs. | |
--prefix | str | Frame file name prefix (default: the source file name). |
Exit codes: 0, 2, 3.
Report keys: animations, color_depth, durations_ms, files, frame_count, layers, ok, out_dir, palette_size, size, source, tags, untagged_frames, warnings.
mode8 lint#
Check a sprite (alpha, size, palette, shape); --fix repairs.
mode8 lint sprite [options]| Argument | Type | Default | Description |
|---|---|---|---|
sprite | str | Sprite PNG to check. | |
--size | str | Expected WxH (default: not checked). | |
--palette | str | Palette every pixel must come from: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default inside a project: mode8.toml default_palette). | |
--draft | str | Draft PNG to compare the silhouette against (reported as pose_match). | |
--min-pose-match | float | Fail when the silhouette matches --draft less than this, 0..1 (default: advisory only). | |
--art-type | str | Also apply the quality-bar rules of this art type (grid, orphan_ratio, color_budget, key_residue, frame_border, double_outline, subject_fill ...): sprite, topdown, icon, isometric, portrait, scene, pc98, vn_bust, tile. One of sprite, topdown, icon, isometric, portrait, scene, pc98, vn_bust, tile. | |
--dither-ok | flag | With --art-type: an ordered-dither pattern is intended (skip the dither rule). | |
--max-colors | int | Maximum distinct colors. | |
--check-interior-black | flag | Fail if #000000 appears inside sprite interior. | |
--no-allow-outline-black | flag | Disallow #000000 even on outer outline. | |
--fix | flag | Auto-fix alpha, stray islands, and off-palette pixels. | |
--out | str | Output path for --fix (defaults to overwriting sprite). | |
--metric | str | redmean | Color distance --fix snaps with (default: redmean, as Studio's Auto-fix). One of redmean, oklab. |
--quality | flag | Also run the advisory pixel-art quality checks (orphan pixels, jaggies, ramp harmony). | |
--quality-strict | flag | Like --quality, but quality warnings fail the command (exit 1). | |
--quality-rules | str | Comma-separated subset of orphan_pixels,jaggies,ramp_harmony (implies --quality). |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
Report keys: errors, file, metrics, ok, pass, size, warnings.
mode8 pixelize#
Snap any image onto a pixel grid and palette.
mode8 pixelize source --out PNG [options]| Argument | Type | Default | Description |
|---|---|---|---|
source | str | Image to pixelize. | |
--out | str | Required. Output PNG path. | |
--size | str | Target WxH, each side 1..1024 (default: the detected art-pixel grid). | |
--palette | str | Palette: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default: an auto palette; inside a project: mode8.toml default_palette). | |
--colors | positive_int | Color clusters: the auto palette's size, or with --palette how many clusters map onto it (default: 16). | |
--bg | str | transparent: key the background (measured on the image border) to alpha (default: keep the image's own transparency, if any). One of transparent. | |
--metric | str | oklab | Color distance for mapping clusters onto --palette (default: oklab). One of redmean, oklab. |
--dither | str | none | Ordered dither, applied only on smooth gradients (default: none). One of none, bayer2, bayer4, checker. |
--preview | int | 0 | Also write a nearest-neighbor preview at this integer zoom (default: 0, none). |
--no-despill | flag | With --bg transparent: keep key-blended edge pixels (skip edge despill, as gen). |
Exit codes: 0, 2, 3.
Report keys: block, colors, colors_used, despill, dither, frame_sides, grid_fit, grid_reliable, grid_score, ground_shadow_px, metric, native_size, ok, out, outline_added, outline_share, palette, palette_fit, palette_worst, reduction, size, source, transparent, warnings.
mode8 export#
Atlas, Godot, GIF, Pixi, Phaser, Unity ... from frames.
mode8 export INPUT... [options]| Argument | Type | Default | Description |
|---|---|---|---|
inputs | str, one or more | Directory of PNGs or explicit frame PNG paths; inside a project, or an asset name. | |
--out-dir | str | Output directory (required, except for a project asset: godot/art/ASSET in a Godot starter, else exports/ASSET). | |
--name | str | Base name for exported files (default: sprite; a project asset: its name). | |
--formats | str | Comma-separated formats: atlas,godot,gif,godot_scene,normal,emission; engine exports pixi,phaser,love2d,css,indexed, plus unity (experimental) (default: atlas,godot,gif; a project asset in a Godot starter: godot,godot_scene). | |
--palette | str | Palette path or bundled name for the engine formats (indexed: the exact color table; default inside a project: mode8.toml default_palette). | |
--pixels-per-unit | positive_int | Engine option pixels_per_unit for unity, 1..4096 (default: 16). | |
--guid-namespace | str | Engine option guid_namespace for unity: seeds the .meta GUIDs so exports from different projects do not collide (default: none). | |
--fps | int | 8 | Frame rate, 1..60 (default: 8). |
--animations | str | JSON animations {anim: {frames, fps, loop}} or a Mode 8 asset sidecar (assets/<name>/master.m8.json: its recorded frames.animations, the timing Studio uses); default: inferred from the frame names. | |
--gif-scale | int | 4 | GIF upscale, 1..16 (default: 4). |
--gif-transparent | flag | GIFs keep the sprite's transparency (default: a solid backdrop). | |
--godot-res-prefix | str | How the Godot resources reference their PNGs: omit (or 'relative') for paths relative to each .tres/.tscn, which work wherever the folder sits in a project, or a res:// folder the files are imported under, e.g. res://assets (default: relative). | |
--padding | int | 1 | Atlas frame padding in pixels, 0..64 (default: 1). |
--extrude | int | 0 | Repeat each frame's edge pixels this far around it in the atlas, 0..16, so filtering or rounding never samples a neighbour (default: 0). |
--power-of-two | flag | Round the atlas sides up to powers of two (default: the tightest size). | |
--parts | str | Indexed part map PNG (refines boxes and lighting maps). | |
--master | str | Master sprite PNG the part map was painted on. | |
--facing | str | Sprite facing for godot_scene boxes. One of left, right. | |
--scene-kind | str | auto | godot_scene root: character (CharacterBody2D, body fitted to the feet), static (StaticBody2D) or sprite (no physics) (default: auto, from the animations). One of auto, character, static, sprite. |
--no-actor-script | flag | godot_scene character: do not write or attach mode8_actor.gd. | |
--box-overrides | str | godot_scene: hand-edited hurt/hit/body boxes (a Studio boxes.json, mode8.boxes/1) over the computed ones (default: computed; a project asset: its assets/ASSET/boxes.json). | |
--bevel | bevel_arg | auto | Normal-map bevel radius in pixels, or auto (from the sprite size) (default: auto). |
--relief | float | 2.0 | Normal-map interior relief from the art's own shading, 0..8 (0 = flat bevel only; default: 2.0). |
--strength | float | 2.0 | Normal-map strength (default: 2.0). |
--levels | int | 8 | Normal-map quantization levels (default: 8). |
--emissive | str | auto | Emission-map glow selection: a preset (auto: light sources only: flames, lamps, neon, effects; never cloth, skin, gold trim or lit surfaces; neon: cool neon/magic hues; flame: warm fire/embers; none: no emission) and/or comma-separated #rrggbb colors, e.g. auto / neon / flame / none / #rrggbb[,...] / neon,#ffcc00 (default: auto). |
--emissive-min-chroma | float | 0.13 | Minimum OKLab chroma for preset-detected emissive pixels (default: 0.13). |
--emissive-min-lightness | float | 0.58 | Minimum OKLab lightness 0..1 for preset-detected emissive pixels (default: 0.58). |
--emissive-exclude | str | Comma-separated #rrggbb colors that never glow (e.g. a bright skin or UI color). |
Exit codes: 0, 2, 3.
Report keys: animations, atlas, files, formats, frame_count, frames, gif, godot, name, ok, out_dir, skipped, sources, timing_sidecar.
mode8 ui#
9-slice UI kit (dialogs, buttons, bars) + Godot theme.
mode8 ui --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
--kinds | str | all | Comma-separated UI kinds or 'all' (default): dialog_box, panel, button, slot_frame, health_bar, checkbox, slider, tab, tooltip, cursor; button emits every state and health_bar its frame and fill. With --source, name the single piece key instead, e.g. panel or button_hover. |
--out-dir | str | Required. Output directory. | |
--palette | str | Palette: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default inside a project: mode8.toml default_palette). | |
--style | str | Generated kit style (default: bevel; not used with --source). One of bevel, flat, rounded, scifi, pc98. | |
--name | str | ui | Base name for the written files (default: ui). |
--formats | str | png,json,godot | Comma-separated outputs: png,json,godot (default: all). |
--size | str | Optional WxH override for every requested kind, each side 1..1024 (not used with --source). | |
--source | str | Re-export a hand-edited piece PNG instead of generating (needs --margins). | |
--margins | margins | 9-slice margins for --source, e.g. 4,4,4,4. | |
--sheet | str | Optional labeled contact sheet PNG. | |
--godot-res-prefix | str | How the Godot resources reference their PNGs: omit (or 'relative') for paths relative to each .tres/.tscn, which work wherever the folder sits in a project, or a res:// folder the files are imported under, e.g. res://assets (default: relative). | |
--font | str | builtin | Theme font: builtin (writes <name>_font.png/.fnt, a white tint mask the theme colors), none, or a BMFont .fnt path to wire in (default: builtin). |
--materials | str | Override the style's material ramps per slot (body, accent, bar), e.g. body=stone,accent=gold,bar=foliage (materials: mode8 list materials). | |
--studs | flag | bevel style: add the corner stud plates to dialogs and panels (default: plain corners). | |
--outline-black | flag | Draw the outer contour in #000000 (default: the palette's darkest color). | |
--preview | str | Also render a mock screen of the kit (dialog, buttons, checkbox, slider, tabs, tooltip, with text) to this PNG, with measured label centring and contrast in the report. | |
--preview-scale | positive_int | 3 | With --preview: integer zoom, 1..16 (default: 3). |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
Report keys: files, formats, godot, json, kinds, lint, name, ok, out_dir, outline_black, pass, piece_meta, pieces, source, studs, style, text_colors.
mode8 font#
Bitmap font: BMFont .fnt + PNG atlas.
mode8 font --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
--out-dir | str | Required. Output directory. | |
--name | str | font | Base name for the written files (default: font). |
--color | str | #ffffff | Glyph color #rrggbb (default: #ffffff). |
--outline | str | Optional 1px (x scale) outline color #rrggbb. | |
--shadow | str | Optional drop-shadow color #rrggbb. | |
--scale | positive_int | 1 | Integer scale 1..16 (default: 1). |
--mono | flag | Monospaced: every glyph advances the same width (default: proportional, tabular digits). | |
--charset | str | latin1 | Glyphs to export: latin1 (ASCII plus the Latin-1 letters and signs, 191 glyphs) or ascii (95) (default: latin1). One of latin1, ascii. |
--no-kern | flag | Write no kerning pairs (default: kerned pairs such as AV, To, Yo in the .fnt). | |
--formats | str | png,fnt,json | Comma-separated outputs: png,fnt,json (default: all). |
Exit codes: 0, 2, 3.
Report keys: atlas_size, charset, files, fnt, glyph_count, json, kerning_pairs, line_height, mono, name, ok, out_dir, png, scale, size.
mode8 import#
Bring a sheet, PNG folder or .aseprite into a project.
mode8 import source --name NAME [options]| Argument | Type | Default | Description |
|---|---|---|---|
source | str | Sprite sheet PNG, directory of frame PNGs, or .ase/.aseprite file. | |
--project-root | str | Project root (default: the project the current directory is in, else . -- auto-initialized if needed). | |
--name | str | Required. Asset name (assets/<name>/). | |
--cell-size | size | Sheet cell size WxH. | |
--cols | positive_int | Sheet grid columns. | |
--rows | positive_int | Sheet grid rows. | |
--margin | int | 0 | Sheet border margin in pixels. |
--spacing | int | 0 | Pixels between sheet cells. |
--keep-empty | flag | Keep fully transparent sheet cells. | |
--frame-names | str | Comma-separated frame names, one per imported frame. | |
--palette | str | Existing project/bundled palette name; otherwise palettes/<palette or name>.gpl is extracted from the art. | |
--master-frame | str | Frame to use as master (default: idle, else first). | |
--fps | int | 8 | Animation fps for PNG sources (Aseprite uses its own). |
--art-type | str | Art-type profile to record: sprite, portrait, isometric, topdown, scene, icon, pc98, vn_bust. One of sprite, portrait, isometric, topdown, scene, icon, pc98, vn_bust. | |
--layers | str | flatten | Aseprite sources: keep the master frame's layers as the asset's layer stack, or flatten to composited pixels (default: flatten). One of keep, flatten. |
Exit codes: 0, 2, 3.
Report keys: animations, asset, fps, frame_count, frames, frames_recorded, layers_imported, layers_mode, master, master_frame, ok, palette, palette_created, palette_path, project_initialized, project_root, size, source, source_info, source_type, warnings.
mode8 maps#
Normal + emission maps for 2D lighting.
mode8 maps inputs... --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
inputs | str, one or more | Sprite PNG(s) or directories of PNGs. | |
--out-dir | str | Required. Output directory. | |
--parts | str | Indexed part map PNG. | |
--bevel | bevel_arg | auto | bevel radius in pixels, or auto (from the sprite size) (default: auto). |
--relief | float | 2.0 | interior relief from the art's own shading, 0..8 (0 = flat bevel only; default: 2.0). |
--strength | float | 2.0 | strength (default: 2.0). |
--levels | int | 8 | quantization levels (default: 8). |
--emissive | str | auto | Emission-map glow selection: a preset (auto: light sources only: flames, lamps, neon, effects; never cloth, skin, gold trim or lit surfaces; neon: cool neon/magic hues; flame: warm fire/embers; none: no emission) and/or comma-separated #rrggbb colors, e.g. auto / neon / flame / none / #rrggbb[,...] / neon,#ffcc00 (default: auto). |
--emissive-min-chroma | float | 0.13 | Minimum OKLab chroma for preset-detected emissive pixels (default: 0.13). |
--emissive-min-lightness | float | 0.58 | Minimum OKLab lightness 0..1 for preset-detected emissive pixels (default: 0.58). |
--emissive-exclude | str | Comma-separated #rrggbb colors that never glow (e.g. a bright skin or UI color). | |
--name | str | Base name for the written files: <name>_n.png / <name>_e.png for a single sprite, <name>_<stem>_n.png / _e.png per sprite when the inputs hold several (default: <stem>). |
Exit codes: 0, 2, 3.
Report keys: bevel, count, emission_files, emissive, emissive_coverage, emissive_exclude, emissive_min_chroma, emissive_min_lightness, emissive_pixels, files, levels, maps, normal_files, ok, out_dir, parts, relief, strength, warnings.
mode8 recolor#
Palette swaps and a Godot palette shader.
mode8 recolor inputs... --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
inputs | str, one or more | Sprite PNG(s) or directories of PNGs. | |
--out-dir | str | Required. Output directory. | |
--source-palette | str | Source palette (default: the sprites' own opaque non-black colors). | |
--target-palette | str | Target palette path or bundled name. | |
--color-map | str | JSON color map file {"#rrggbb": "#rrggbb"}. | |
--shader | flag | Also write a Godot 4 palette-swap shader + lookup texture + ShaderMaterial. | |
--variants | str | Comma-separated name=palette pairs for --shader (default: the --target-palette). | |
--name | str | sprite | Base name for --shader exports (default: sprite). |
--godot-res-prefix | str | How the Godot resources reference their PNGs: omit (or 'relative') for paths relative to each .tres/.tscn, which work wherever the folder sits in a project, or a res:// folder the files are imported under, e.g. res://assets (default: relative). |
Exit codes: 0, 2, 3.
Report keys: count, files, mapping, mode, name, off_palette_pixels, ok, out_dir, source_palette, target_palette, unmapped_colors.
mode8 fx#
Palette-locked effect frames (hits, sparkles, smoke).
mode8 fx --kinds KINDS --out-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
--kinds | str | Required. Comma-separated effects: hitflash, dissolve, spawn, shatter, afterimage, outline_pulse, impact, slash_arc, explosion, smoke_puff, sparkle, dust_puff, heal, pickup. | |
--out-dir | str | Required. Output directory. | |
--source | str | Master sprite PNG (required for sprite-derived effects). | |
--palette | str | Palette: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default inside a project: mode8.toml default_palette). | |
--frame-count | positive_int | Frames per effect, 1..64 (default: 8 for standalone effects, 6 for sprite effects). | |
--outline | str | ramp | Standalone effects' contour: ramp (the effect's darkest ramp tone), black (#000000) or none (default: ramp). One of ramp, black, none. |
--size | str | WxH canvas for standalone effects. | |
--seed | int | 0 | Random seed for standalone effects (default: 0). |
--prefix | str | Frame file name prefix, put before the effect name: <prefix>_<effect>_00.png (default: none, <effect>_00.png). | |
--sheet | str | Optional zoomed contact sheet PNG. | |
--sheet-cols | positive_int | 12 | Contact sheet columns before wrapping to a new row (default: 12). |
Exit codes: 0, 2, 3.
Report keys: animations, effects, files, frame_count, frame_names, kinds, ok, out_dir, outline, palette, seed, sheet, source, timing_sidecar.
mode8 doctor#
Check ComfyUI, models, extras; says how to fix.
mode8 doctor [options]| Argument | Type | Default | Description |
|---|---|---|---|
--comfy-url | str | ComfyUI server URL (default: COMFY_URL, else comfy_url of the nearest mode8.toml at or above the current directory, else http://127.0.0.1:8188). | |
--preset | str | all | Preset to check (default: all). One of all, kleinedit, style. |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
Report keys: comfy_start, comfy_start_source, comfy_url, comfy_url_source, environment, failure, hints, missing_models, missing_nodes, ok, pass, preset_art_types, presets, reachable, setup_commands.
mode8 setup#
Download the AI models into a ComfyUI install.
mode8 setup --comfy-dir DIR [options]| Argument | Type | Default | Description |
|---|---|---|---|
--comfy-dir | str | Required. Path to local ComfyUI installation directory. | |
--preset | str | kleinedit | Preset whose models to download (default: kleinedit, the default gen preset). One of kleinedit, style, all. |
--dry-run | flag | Print planned downloads without downloading files. |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
Report keys: comfy_dir, dry_run, files, free_bytes, ok, pass, preset, total_bytes, warnings.
mode8 verify#
Check exported assets and animation stability.
mode8 verify [options]| Argument | Type | Default | Description |
|---|---|---|---|
--assets-dir | str | Directory of exported pixel-art PNGs. | |
--palette | str | Master palette: a bundled name (mode8 list palettes), a project palette (palettes/<name>.gpl) or a .gpl/.hex/.txt file (default inside a project: mode8.toml default_palette). | |
--check-interior-black | flag | Fail a sprite that has #000000 inside its interior. | |
--exclude | str | Comma-separated filename globs to exclude (e.g. '*_sheet.png,*_atlas.png'). | |
--godot-project | str | Optional Godot 4 project directory for live probe. | |
--probe-scene | str | Optional Godot probe scene (must emit 'SYNC_CHECK dx=<float>'). | |
--max-dx | float | 2.5 | Max allowed sprite-to-actor drift in pixels. |
--godot-bin | str | Godot 4 binary (default: GODOT_BIN or 'godot'). | |
--check-anim | flag | Check animation frame stability per frame subdirectory. | |
--max-foot-drift | int | With --check-anim: max allowed foot-line drift in pixels (default: scaled with the frame height, 2 px up to 36 px tall). | |
--max-bbox-jitter | int | With --check-anim: max allowed bbox size/center jitter in pixels (default: scaled with the frame height, 4 px up to 36 px tall). | |
--include-root | flag | With --check-anim: also treat loose PNGs directly in --assets-dir as one animation. | |
--render-scene | str | With --godot-project: render this scene (res://...tscn) headless and check the frame. | |
--render-golden | str | With --render-scene: compare the rendered frame against this PNG. | |
--render-frame | int | 30 | With --render-scene: the frame to capture, at 60 fps (default: 30). |
--render-max-diff | int | 0 | With --render-golden: pixels allowed to differ (default: 0). |
--quality | flag | Also run the advisory pixel-art quality checks (orphan pixels, jaggies, ramp harmony). | |
--quality-strict | flag | Like --quality, but quality warnings fail the command (exit 1). | |
--quality-rules | str | Comma-separated subset of orphan_pixels,jaggies,ramp_harmony (implies --quality). |
Exit codes: 0, 1, 2, 3 (1 when the report's top-level pass is false).
Report keys: animation_pass, animations, assets_checked, assets_pass, failed_assets, ok, pass, quality_pass, quality_results, quality_summary.
mode8 layers#
Edit an asset's layer stack (journaled, undoable).
Subcommands: list, add, set, delete, reorder, merge-down, flatten.
Exit codes: 0, 2, 3.
mode8 layers list#
Print the layer stack (bottom → top) and master SHA-256.
mode8 layers list --asset ASSET [options]| Argument | Type | Default | Description |
|---|---|---|---|
--project-root | str | Project root (default: the project the current directory is in). | |
--asset | str | Required. Asset name (assets/<name>/). | |
--expected-sha256 | str | Refuse the edit (ConflictError) unless master.png still has this SHA-256. | |
--actor | str | cli | Journal actor (default: cli). One of human, agent, cli. |
Exit codes: 0, 2, 3.
Report keys: asset, can_redo, can_undo, layer_count, layered, layers, master_sha256, next_redo_label, next_redo_op, next_undo_label, next_undo_op, ok, undo_deletes_asset, undo_restores_asset.
mode8 layers add#
Add a layer (blank unless --image-path); a flat asset becomes a stack first.
mode8 layers add --asset ASSET [options]| Argument | Type | Default | Description |
|---|---|---|---|
--project-root | str | Project root (default: the project the current directory is in). | |
--asset | str | Required. Asset name (assets/<name>/). | |
--expected-sha256 | str | Refuse the edit (ConflictError) unless master.png still has this SHA-256. | |
--actor | str | cli | Journal actor (default: cli). One of human, agent, cli. |
--image-path | str | Layer PNG (canvas size); default: blank transparent layer. | |
--name | str | Layer display name. | |
--layer-id | str | Layer id (default: auto layer-N). | |
--opacity | int | 255 | Opacity 0..255 (default: 255). |
--visible | flag | Add the layer visible (default). | |
--hidden | flag | Add the layer hidden. | |
--position | str | top | Where to insert: top (default), bottom, above:<id> or below:<id>. |
Mutually exclusive: --visible / --hidden.
Exit codes: 0, 2, 3.
Report keys: action, asset, entry_id, index, layer_id, layers, ok, previous_sha256, sha256.
mode8 layers set#
Change a layer's pixels and/or properties.
mode8 layers set --asset ASSET --layer-id ID [options]| Argument | Type | Default | Description |
|---|---|---|---|
--project-root | str | Project root (default: the project the current directory is in). | |
--asset | str | Required. Asset name (assets/<name>/). | |
--expected-sha256 | str | Refuse the edit (ConflictError) unless master.png still has this SHA-256. | |
--actor | str | cli | Journal actor (default: cli). One of human, agent, cli. |
--layer-id | str | Required. Layer id. | |
--name | str | New display name. | |
--opacity | int | New opacity 0..255. | |
--visible | flag | Show the layer. | |
--hidden | flag | Hide the layer. | |
--image-path | str | Replace the layer's pixels with this PNG (canvas size). | |
--expected-layer-sha256 | str | Refuse the edit (ConflictError) unless the layer PNG still has this SHA-256. |
Mutually exclusive: --visible / --hidden.
Exit codes: 0, 2, 3.
Report keys: action, asset, entries, entry_id, layer_id, layers, ok, previous_sha256, sha256.
mode8 layers delete#
Delete a layer (never the last one).
mode8 layers delete --asset ASSET --layer-id ID [options]| Argument | Type | Default | Description |
|---|---|---|---|
--project-root | str | Project root (default: the project the current directory is in). | |
--asset | str | Required. Asset name (assets/<name>/). | |
--expected-sha256 | str | Refuse the edit (ConflictError) unless master.png still has this SHA-256. | |
--actor | str | cli | Journal actor (default: cli). One of human, agent, cli. |
--layer-id | str | Required. Layer id. |
Exit codes: 0, 2, 3.
Report keys: action, asset, entry_id, layers, ok, previous_sha256, sha256.
mode8 layers reorder#
Reorder the stack.
mode8 layers reorder --asset ASSET --order IDS [options]| Argument | Type | Default | Description |
|---|---|---|---|
--project-root | str | Project root (default: the project the current directory is in). | |
--asset | str | Required. Asset name (assets/<name>/). | |
--expected-sha256 | str | Refuse the edit (ConflictError) unless master.png still has this SHA-256. | |
--actor | str | cli | Journal actor (default: cli). One of human, agent, cli. |
--order | str | Required. Comma-separated layer ids, bottom → top (all of them). |
Exit codes: 0, 2, 3.
Report keys: action, asset, entry_id, layers, ok, previous_sha256, sha256.
mode8 layers merge-down#
Merge a layer down into the layer below it.
mode8 layers merge-down --asset ASSET --layer-id ID [options]| Argument | Type | Default | Description |
|---|---|---|---|
--project-root | str | Project root (default: the project the current directory is in). | |
--asset | str | Required. Asset name (assets/<name>/). | |
--expected-sha256 | str | Refuse the edit (ConflictError) unless master.png still has this SHA-256. | |
--actor | str | cli | Journal actor (default: cli). One of human, agent, cli. |
--layer-id | str | Required. Layer id to merge down. |
Exit codes: 0, 2, 3.
Report keys: action, asset, entry_id, layer_id, layers, merged, ok, previous_sha256, sha256.
mode8 layers flatten#
Drop the layer stack, keeping the flattened master.
mode8 layers flatten --asset ASSET [options]| Argument | Type | Default | Description |
|---|---|---|---|
--project-root | str | Project root (default: the project the current directory is in). | |
--asset | str | Required. Asset name (assets/<name>/). | |
--expected-sha256 | str | Refuse the edit (ConflictError) unless master.png still has this SHA-256. | |
--actor | str | cli | Journal actor (default: cli). One of human, agent, cli. |
Exit codes: 0, 2, 3.
Report keys: action, asset, entry_id, layers, layers_dropped, ok, previous_sha256, sha256.
mode8 mcp#
MCP server for coding agents (stdio).
mode8 mcpSpeaks MCP over stdin / stdout instead of printing a JSON report, and exits 0 when the client closes stdin. Without the optional SDK it prints the error envelope with the install hint and exits 3.
mode8 studio#
Pixel-art editor and AI workbench in your browser.
mode8 studio [directory] [options]| Argument | Type | Default | Description |
|---|---|---|---|
directory | str | . | Project root directory (auto-initializes if needed). |
--host | str | 127.0.0.1 | Bind address (default: 127.0.0.1). |
--port | int | 8420 | Port number 1..65535 (default: 8420). |
--no-browser | flag | Do not automatically open the browser. | |
--comfy-url | str | Optional ComfyUI server URL override. | |
--allow-host | str | Comma-separated extra Host header names/IPs to accept (e.g. a LAN hostname). |
Needs the studio extra (without it: the error envelope with the install hint, exit 3). Prints one ready document ({"ok": true, "url", "token", ...}) once the port is bound, then serves until interrupted (exit 0). A busy port is the error envelope with exit 3; a --port outside 1..65535 is an InputError (exit 2).
mode8 schema#
Machine-readable contract (JSON).
mode8 schema [options]| Argument | Type | Default | Description |
|---|---|---|---|
--section | str | Print only this section (default: all). One of cli, mcp, exit_codes, formats, project, http, limits. |
Exit codes: 0, 2, 3.
Report keys: exit_codes, mode8_version, ok, schema_version, sections.
See also#
- Output Envelope and Exit Codes for the JSON shapes and error types.
- MCP Tools for the same operations as agent tools.
- Limits for the caps on sizes, frames and counts.
- Quickstart (offline) to try the CPU-only commands end to end.