Manual Reference

On this page
  1. How every command behaves
  2. Reading the tables
  3. Commands at a glance
  4. Commands
  5. mode8 init
  6. mode8 list
  7. mode8 draft
  8. mode8 gen
  9. mode8 inpaint
  10. mode8 icons
  11. mode8 cast
  12. mode8 parts
  13. mode8 anim
  14. mode8 tile
  15. mode8 autotile
  16. mode8 aseprite
  17. mode8 lint
  18. mode8 pixelize
  19. mode8 export
  20. mode8 ui
  21. mode8 font
  22. mode8 import
  23. mode8 maps
  24. mode8 recolor
  25. mode8 fx
  26. mode8 doctor
  27. mode8 setup
  28. mode8 verify
  29. mode8 layers
  30. mode8 mcp
  31. mode8 studio
  32. mode8 schema
  33. See also

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 mcp and studio (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-level pass.
  • Failure prints {"ok": false, "error": {"type", "msg", ...}}. The shapes, error types and exit codes are on Output Envelope and Exit Codes.
  • mode8 --version and -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:

bash
mode8 draft knight_right --out knight.png

Global 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. 0 success, 1 a check failed, 2 bad input, 3 runtime 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#

CommandWhat it doesExit codes
mode8 initCreate a project, or a ready-to-run starter (--template)0, 1, 2, 3
mode8 listList palettes, archetypes, tiles, rigs, templates, ...0, 2, 3
mode8 draftPose blockout: side, top-down, portrait or isometric0, 2, 3
mode8 genDraft-guided pixel art from a prompt (local ComfyUI)0, 1, 2, 3
mode8 inpaintRegenerate a masked region, keep pinned pixels0, 1, 2, 3
mode8 iconsA matching set of inventory icons (local ComfyUI)0, 1, 2, 3
mode8 castBatch-generate a style-locked cast from a manifest0, 1, 2, 3
mode8 partsPart map (head, torso, limbs) for a sprite0, 2, 3
mode8 animZero-boil animation frames from a master sprite0, 2, 3
mode8 tileTiles, props, weapons and HUD portraits0, 2, 3
mode8 autotileBlob terrain sets + Godot TileSet / Tiled TSX0, 1, 2, 3
mode8 asepriteImport or export .aseprite files0, 2, 3
mode8 lintCheck a sprite (alpha, size, palette, shape); --fix repairs0, 1, 2, 3
mode8 pixelizeSnap any image onto a pixel grid and palette0, 2, 3
mode8 exportAtlas, Godot, GIF, Pixi, Phaser, Unity ... from frames0, 2, 3
mode8 ui9-slice UI kit (dialogs, buttons, bars) + Godot theme0, 1, 2, 3
mode8 fontBitmap font: BMFont .fnt + PNG atlas0, 2, 3
mode8 importBring a sheet, PNG folder or .aseprite into a project0, 2, 3
mode8 mapsNormal + emission maps for 2D lighting0, 2, 3
mode8 recolorPalette swaps and a Godot palette shader0, 2, 3
mode8 fxPalette-locked effect frames (hits, sparkles, smoke)0, 2, 3
mode8 doctorCheck ComfyUI, models, extras; says how to fix0, 1, 2, 3
mode8 setupDownload the AI models into a ComfyUI install0, 1, 2, 3
mode8 verifyCheck exported assets and animation stability0, 1, 2, 3
mode8 layersEdit an asset's layer stack (journaled, undoable)0, 2, 3
mode8 mcpMCP server for coding agents (stdio)server
mode8 studioPixel-art editor and AI workbench in your browserserver
mode8 schemaMachine-readable contract (JSON)0, 2, 3

Commands#

mode8 init#

Create a project, or a ready-to-run starter (--template).

text
mode8 init [directory] [options]
ArgumentTypeDefaultDescription
directorystr.Project root directory (default: .).
--namestrProject name in mode8.toml (default: the directory name).
--default-palettestrmode8.toml default_palette (default: nes_crimson_hero; set by the template with --template).
--default-sizestrmode8.toml default_size, as WxH, each side 1..1024 (default: 64x72).
--comfy-urlstrmode8.toml comfy_url: the ComfyUI server URL (default: http://127.0.0.1:8188).
--templatestrScaffold a starter project with deterministic assets: platformer, topdown, isometric, scifi.
--forceflagWith --template: overwrite existing template assets instead of skipping them.
--list-templatesflagPrint the starter templates and exit.
--refresh-godotflagIn 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).
--assetsstrWith --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, ...

text
mode8 list [WHAT]
ArgumentTypeDefaultDescription
whatstrOne 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.

text
mode8 draft [ARCHETYPE] --out PNG [options]
ArgumentTypeDefaultDescription
archetypestrWhat 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.
--posestrDraw 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).
--sourcestrMake the draft from this concept image instead (keys the background, crops, reduces and quantizes it; needs --size).
--palettestrPalette: 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).
--sizestrWxH, 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.
--colorspositive_intWith --source: color count of the draft when no --palette is given (default: 16).
--key-colorstrWith --source: the image's background color (default: measured on its border).
--outstrRequired. 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).

text
mode8 gen prompt --out PNG [options]
ArgumentTypeDefaultDescription
promptstrWhat to draw, in plain words: the subject only (quote it).
--outstrRequired. Output PNG path (the best candidate).
--palettestrPalette: 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-typestrArt-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.
--colorspositive_intColor 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).
--metricstrColor distance for mapping clusters onto --palette (default: oklab). One of redmean, oklab.
--ditherstrOrdered dither, applied only on smooth gradients (default: none). One of none, bayer2, bayer4, checker.
--tile-xflagMake the result tile seamlessly left/right.
--no-tile-xflagDisable horizontal tiling (even for --art-type tile).
--tile-yflagMake the result tile seamlessly up/down.
--no-tile-yflagDisable vertical tiling (even for --art-type tile).
--presetstrComfyUI workflow preset: kleinedit repaints a --draft, style draws from the prompt alone (default: the --art-type preset, else kleinedit). One of kleinedit, style.
--draftstr1x pose draft that guides shape and size (from mode8 draft; required by kleinedit).
--prompt-modestrautoauto: wrap a draft-guided prompt in the repaint instruction; raw: send the prompt as written (default: auto). One of auto, raw.
--min-pose-matchfloatFail a candidate whose silhouette matches the --draft less than this, 0..1 (default: advisory only, reported as pose_match).
--refstrReference image for style (e.g. an approved sprite).
--sizestrTarget 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).
--bgstrBackground: 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.
--passesintRender 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.
--nint3Candidates to render, 1..16 (default: 3).
--seedintBase seed; candidate i uses seed + i (default: random).
--resintRender 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-tolint55How far the key color must stay from the outline color (default: 55; the background is measured on each render).
--key-colorstrautoKey color painted behind the draft: auto, magenta, green, cyan, blue, yellow, orange, or #rrggbb (default: auto, the one farthest from the palette).
--no-despillflagKeep key-blended edge pixels (skip edge despill before clustering).
--outline-blackflagDraw the added outline in #000000 instead of the art's darkest color.
--no-outline-blackflagNever add an outline (default: a 1px outline only where the art has none).
--backend-waitfloat30.0Seconds a ComfyUI that stopped answering gets to come back before the run stops, keeping the finished candidates (default: 30).
--midnight-skyflagAsk for a dark night-sky backdrop instead of a flat key color.
--sheetstrSave a zoomed contact sheet PNG for review.
--sheet-colspositive_int12Contact sheet columns before wrapping to a new row (default: 12).
--keep-candidatesstrDirectory to retain all candidate and raw PNGs.
--workflowstrCustom ComfyUI API workflow JSON template path.
--comfy-urlstrComfyUI 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.

text
mode8 inpaint master prompt --mask PNG --palette PALETTE --out PNG [options]
ArgumentTypeDefaultDescription
masterstrMaster sprite PNG.
promptstrPrompt describing the regenerated region.
--maskstrRequired. Mask PNG (opaque/bright pixels = editable region).
--palettestrRequired. Palette path or bundled name.
--outstrRequired. Output PNG path.
--pinsstrOptional pinned-pixel mask PNG (preserved verbatim).
--presetstrkleineditComfyUI workflow preset (default: kleinedit). One of kleinedit.
--nint3Candidates to render, 1..16 (default: 3).
--seedintBase seed (default: random).
--passesintRender 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-blackflagDo not re-ink the edited region's 1px outer outline in #000000 (default: re-ink it).
--key-tolint55Chroma-key tolerance (default: 55).
--sheetstrSave a zoomed contact sheet PNG for review.
--sheet-colspositive_int12Contact sheet columns before wrapping to a new row (default: 12).
--keep-candidatesstrDirectory to retain all candidate and raw PNGs.
--workflowstrCustom ComfyUI API workflow JSON template path.
--comfy-urlstrComfyUI 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).

text
mode8 icons ITEM... --out-dir DIR [options]
ArgumentTypeDefaultDescription
itemsstr, one or moreWhat each icon shows, in plain words (quote each), e.g. "red potion" "iron sword"; at most 16.
--out-dirstrRequired. Output directory.
--palettestrPalette: 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).
--colorspositive_intColor clusters: the auto palette's size, or with --palette how many map onto it (default: 16).
--sizestrIcon WxH, each side 1..1024 (default: 32x32).
--nint2Candidates per icon, 1..16 (default: 2).
--seedintBase seed (default: random).
--sheetstrAlso save one row of every icon, zoomed, for review.
--keep-candidatesflagKeep every candidate under <out-dir>/candidates/.
--comfy-urlstrComfyUI 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.

text
mode8 cast manifest --out-dir DIR [options]
ArgumentTypeDefaultDescription
manifeststrCast manifest JSON or TOML file.
--out-dirstrRequired. Output directory (one folder per member).
--style-refstrOptional approved master sprite to lock style across cast.
--dry-runflagValidate manifest and print planned jobs without ComfyUI.
--passesintRender 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-urlstrComfyUI 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.

text
mode8 parts image --out PNG [options]
ArgumentTypeDefaultDescription
imagestrMaster sprite or 1x draft PNG.
--outstrRequired. Output indexed parts.png path.
--rigstrhumanoidRig 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.
--facingstrrightDirection the sprite faces (default: right). One of left, right.
--proposeflagAuto-infer parts from a 1x draft by color & bands.
--overlaystrOptional 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.

text
mode8 anim master --out-dir DIR [options]
ArgumentTypeDefaultDescription
masterstrApproved master sprite PNG.
--rigstrBuilt-in proportional rig: humanoid, quadruped, boss_quadruped, flyer, topdown, mech, vehicle, blob. One of humanoid, quadruped, boss_quadruped, flyer, topdown, mech, vehicle, blob.
--rig-filestrCustom JSON rig specification file.
--archetypestrThe 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.
--partsstrOptional indexed part map PNG (from mode8 parts) to drive part articulation.
--out-dirstrRequired. Directory for the frame PNGs.
--prefixstrFrame file name prefix (default: the master's file name; the asset name for assets/<name>/master.png).
--facingstrDirection the master faces (default: the rig's canonical facing). One of left, right.
--framesstrComma-separated frame or animation names (e.g. idle,walk).
--sheetstrOptional zoomed animation strip PNG.
--sheet-colspositive_int12Contact 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.

text
mode8 tile KIND --out PNG [options]
ArgumentTypeDefaultDescription
kindstrWhat 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.
--outstrRequired. Output PNG path.
--palettestrPalette: 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).
--sizestrOptional WxH, each side 1..1024 (default: the kind's size, e.g. terrain 16x16; terrain is drawn natively at any size, e.g. 32x32).
--sourcestrSource sprite PNG (for hud_portrait).
--variantint0Terrain and side-view kinds: which variant to draw, 0.. (default: 0); every variant tiles seamlessly with every other.
--variantspositive_int1Terrain 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-blackflagProps: draw the 1px contour in #000000 instead of the palette's darkest color.
--shadowflagProps (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.

text
mode8 autotile source --out-dir DIR [options]
ArgumentTypeDefaultDescription
sourcestrBase 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-dirstrRequired. Output directory.
--namestrterrainBase name for the written files (default: terrain).
--palettestrPalette: 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).
--layoutstrblob16blob16: 16 tiles, 4-neighbor; blob47: 47 tiles with inner corners (default: blob16). One of blob16, blob47.
--formatsstrgodot,tiledComma-separated outputs besides the PNG sheet and its JSON: godot, tiled (default: both).
--godot-res-prefixstrHow 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-pxint2Edge border thickness of the blob tiles in pixels (default: 2).
--stylestrautoEdge 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.
--viewstrtop: 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-colorstrdarkEdge contour: dark (the terrain's darkest color) or black (#000000) (default: dark). One of dark, black.
--sizestrTile size for a tile kind, each side 1..1024 (default: the kind's size).
--variantint0Which terrain variant the interior tiles use (default: 0).
--interior-variantspositive_intTile 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-physicsflagGodot: no physics layer / collision polygons in the TileSet.
--occludersflagGodot: 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.

Subcommands: export, import.

Exit codes: 0, 2, 3.

mode8 aseprite export#

Write PNG frames or a project asset into an .aseprite file.

text
mode8 aseprite export [inputs...] --out ASEPRITE [options]
ArgumentTypeDefaultDescription
inputsstr, zero or moreDirectory of PNGs or explicit frame PNG paths.
--project-rootstrProject root (with --asset: export a project asset).
--assetstrProject asset name (assets/<name>/).
--layeredflagWith --project-root/--asset: write the asset's layer stack as real Aseprite layers.
--outstrRequired. Output .aseprite path.
--fpsint8Frame rate, 1..60 (default: 8).
--palettestrPalette to embed (path or bundled name).
--color-depthint32Aseprite 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.

text
mode8 aseprite import source --out-dir DIR [options]
ArgumentTypeDefaultDescription
sourcestrInput .ase or .aseprite path.
--out-dirstrRequired. Directory for the frame PNGs.
--prefixstrFrame 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.

text
mode8 lint sprite [options]
ArgumentTypeDefaultDescription
spritestrSprite PNG to check.
--sizestrExpected WxH (default: not checked).
--palettestrPalette 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).
--draftstrDraft PNG to compare the silhouette against (reported as pose_match).
--min-pose-matchfloatFail when the silhouette matches --draft less than this, 0..1 (default: advisory only).
--art-typestrAlso 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-okflagWith --art-type: an ordered-dither pattern is intended (skip the dither rule).
--max-colorsintMaximum distinct colors.
--check-interior-blackflagFail if #000000 appears inside sprite interior.
--no-allow-outline-blackflagDisallow #000000 even on outer outline.
--fixflagAuto-fix alpha, stray islands, and off-palette pixels.
--outstrOutput path for --fix (defaults to overwriting sprite).
--metricstrredmeanColor distance --fix snaps with (default: redmean, as Studio's Auto-fix). One of redmean, oklab.
--qualityflagAlso run the advisory pixel-art quality checks (orphan pixels, jaggies, ramp harmony).
--quality-strictflagLike --quality, but quality warnings fail the command (exit 1).
--quality-rulesstrComma-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.

text
mode8 pixelize source --out PNG [options]
ArgumentTypeDefaultDescription
sourcestrImage to pixelize.
--outstrRequired. Output PNG path.
--sizestrTarget WxH, each side 1..1024 (default: the detected art-pixel grid).
--palettestrPalette: 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).
--colorspositive_intColor clusters: the auto palette's size, or with --palette how many clusters map onto it (default: 16).
--bgstrtransparent: key the background (measured on the image border) to alpha (default: keep the image's own transparency, if any). One of transparent.
--metricstroklabColor distance for mapping clusters onto --palette (default: oklab). One of redmean, oklab.
--ditherstrnoneOrdered dither, applied only on smooth gradients (default: none). One of none, bayer2, bayer4, checker.
--previewint0Also write a nearest-neighbor preview at this integer zoom (default: 0, none).
--no-despillflagWith --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.

text
mode8 export INPUT... [options]
ArgumentTypeDefaultDescription
inputsstr, one or moreDirectory of PNGs or explicit frame PNG paths; inside a project, or an asset name.
--out-dirstrOutput directory (required, except for a project asset: godot/art/ASSET in a Godot starter, else exports/ASSET).
--namestrBase name for exported files (default: sprite; a project asset: its name).
--formatsstrComma-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).
--palettestrPalette path or bundled name for the engine formats (indexed: the exact color table; default inside a project: mode8.toml default_palette).
--pixels-per-unitpositive_intEngine option pixels_per_unit for unity, 1..4096 (default: 16).
--guid-namespacestrEngine option guid_namespace for unity: seeds the .meta GUIDs so exports from different projects do not collide (default: none).
--fpsint8Frame rate, 1..60 (default: 8).
--animationsstrJSON 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-scaleint4GIF upscale, 1..16 (default: 4).
--gif-transparentflagGIFs keep the sprite's transparency (default: a solid backdrop).
--godot-res-prefixstrHow 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).
--paddingint1Atlas frame padding in pixels, 0..64 (default: 1).
--extrudeint0Repeat 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-twoflagRound the atlas sides up to powers of two (default: the tightest size).
--partsstrIndexed part map PNG (refines boxes and lighting maps).
--masterstrMaster sprite PNG the part map was painted on.
--facingstrSprite facing for godot_scene boxes. One of left, right.
--scene-kindstrautogodot_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-scriptflaggodot_scene character: do not write or attach mode8_actor.gd.
--box-overridesstrgodot_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).
--bevelbevel_argautoNormal-map bevel radius in pixels, or auto (from the sprite size) (default: auto).
--relieffloat2.0Normal-map interior relief from the art's own shading, 0..8 (0 = flat bevel only; default: 2.0).
--strengthfloat2.0Normal-map strength (default: 2.0).
--levelsint8Normal-map quantization levels (default: 8).
--emissivestrautoEmission-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-chromafloat0.13Minimum OKLab chroma for preset-detected emissive pixels (default: 0.13).
--emissive-min-lightnessfloat0.58Minimum OKLab lightness 0..1 for preset-detected emissive pixels (default: 0.58).
--emissive-excludestrComma-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.

text
mode8 ui --out-dir DIR [options]
ArgumentTypeDefaultDescription
--kindsstrallComma-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-dirstrRequired. Output directory.
--palettestrPalette: 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).
--stylestrGenerated kit style (default: bevel; not used with --source). One of bevel, flat, rounded, scifi, pc98.
--namestruiBase name for the written files (default: ui).
--formatsstrpng,json,godotComma-separated outputs: png,json,godot (default: all).
--sizestrOptional WxH override for every requested kind, each side 1..1024 (not used with --source).
--sourcestrRe-export a hand-edited piece PNG instead of generating (needs --margins).
--marginsmargins9-slice margins for --source, e.g. 4,4,4,4.
--sheetstrOptional labeled contact sheet PNG.
--godot-res-prefixstrHow 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).
--fontstrbuiltinTheme 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).
--materialsstrOverride the style's material ramps per slot (body, accent, bar), e.g. body=stone,accent=gold,bar=foliage (materials: mode8 list materials).
--studsflagbevel style: add the corner stud plates to dialogs and panels (default: plain corners).
--outline-blackflagDraw the outer contour in #000000 (default: the palette's darkest color).
--previewstrAlso 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-scalepositive_int3With --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.

text
mode8 font --out-dir DIR [options]
ArgumentTypeDefaultDescription
--out-dirstrRequired. Output directory.
--namestrfontBase name for the written files (default: font).
--colorstr#ffffffGlyph color #rrggbb (default: #ffffff).
--outlinestrOptional 1px (x scale) outline color #rrggbb.
--shadowstrOptional drop-shadow color #rrggbb.
--scalepositive_int1Integer scale 1..16 (default: 1).
--monoflagMonospaced: every glyph advances the same width (default: proportional, tabular digits).
--charsetstrlatin1Glyphs to export: latin1 (ASCII plus the Latin-1 letters and signs, 191 glyphs) or ascii (95) (default: latin1). One of latin1, ascii.
--no-kernflagWrite no kerning pairs (default: kerned pairs such as AV, To, Yo in the .fnt).
--formatsstrpng,fnt,jsonComma-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.

text
mode8 import source --name NAME [options]
ArgumentTypeDefaultDescription
sourcestrSprite sheet PNG, directory of frame PNGs, or .ase/.aseprite file.
--project-rootstrProject root (default: the project the current directory is in, else . -- auto-initialized if needed).
--namestrRequired. Asset name (assets/<name>/).
--cell-sizesizeSheet cell size WxH.
--colspositive_intSheet grid columns.
--rowspositive_intSheet grid rows.
--marginint0Sheet border margin in pixels.
--spacingint0Pixels between sheet cells.
--keep-emptyflagKeep fully transparent sheet cells.
--frame-namesstrComma-separated frame names, one per imported frame.
--palettestrExisting project/bundled palette name; otherwise palettes/<palette or name>.gpl is extracted from the art.
--master-framestrFrame to use as master (default: idle, else first).
--fpsint8Animation fps for PNG sources (Aseprite uses its own).
--art-typestrArt-type profile to record: sprite, portrait, isometric, topdown, scene, icon, pc98, vn_bust. One of sprite, portrait, isometric, topdown, scene, icon, pc98, vn_bust.
--layersstrflattenAseprite 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.

text
mode8 maps inputs... --out-dir DIR [options]
ArgumentTypeDefaultDescription
inputsstr, one or moreSprite PNG(s) or directories of PNGs.
--out-dirstrRequired. Output directory.
--partsstrIndexed part map PNG.
--bevelbevel_argautobevel radius in pixels, or auto (from the sprite size) (default: auto).
--relieffloat2.0interior relief from the art's own shading, 0..8 (0 = flat bevel only; default: 2.0).
--strengthfloat2.0strength (default: 2.0).
--levelsint8quantization levels (default: 8).
--emissivestrautoEmission-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-chromafloat0.13Minimum OKLab chroma for preset-detected emissive pixels (default: 0.13).
--emissive-min-lightnessfloat0.58Minimum OKLab lightness 0..1 for preset-detected emissive pixels (default: 0.58).
--emissive-excludestrComma-separated #rrggbb colors that never glow (e.g. a bright skin or UI color).
--namestrBase 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.

text
mode8 recolor inputs... --out-dir DIR [options]
ArgumentTypeDefaultDescription
inputsstr, one or moreSprite PNG(s) or directories of PNGs.
--out-dirstrRequired. Output directory.
--source-palettestrSource palette (default: the sprites' own opaque non-black colors).
--target-palettestrTarget palette path or bundled name.
--color-mapstrJSON color map file {"#rrggbb": "#rrggbb"}.
--shaderflagAlso write a Godot 4 palette-swap shader + lookup texture + ShaderMaterial.
--variantsstrComma-separated name=palette pairs for --shader (default: the --target-palette).
--namestrspriteBase name for --shader exports (default: sprite).
--godot-res-prefixstrHow 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).

text
mode8 fx --kinds KINDS --out-dir DIR [options]
ArgumentTypeDefaultDescription
--kindsstrRequired. Comma-separated effects: hitflash, dissolve, spawn, shatter, afterimage, outline_pulse, impact, slash_arc, explosion, smoke_puff, sparkle, dust_puff, heal, pickup.
--out-dirstrRequired. Output directory.
--sourcestrMaster sprite PNG (required for sprite-derived effects).
--palettestrPalette: 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-countpositive_intFrames per effect, 1..64 (default: 8 for standalone effects, 6 for sprite effects).
--outlinestrrampStandalone effects' contour: ramp (the effect's darkest ramp tone), black (#000000) or none (default: ramp). One of ramp, black, none.
--sizestrWxH canvas for standalone effects.
--seedint0Random seed for standalone effects (default: 0).
--prefixstrFrame file name prefix, put before the effect name: <prefix>_<effect>_00.png (default: none, <effect>_00.png).
--sheetstrOptional zoomed contact sheet PNG.
--sheet-colspositive_int12Contact 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.

text
mode8 doctor [options]
ArgumentTypeDefaultDescription
--comfy-urlstrComfyUI 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).
--presetstrallPreset 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.

text
mode8 setup --comfy-dir DIR [options]
ArgumentTypeDefaultDescription
--comfy-dirstrRequired. Path to local ComfyUI installation directory.
--presetstrkleineditPreset whose models to download (default: kleinedit, the default gen preset). One of kleinedit, style, all.
--dry-runflagPrint 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.

text
mode8 verify [options]
ArgumentTypeDefaultDescription
--assets-dirstrDirectory of exported pixel-art PNGs.
--palettestrMaster 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-blackflagFail a sprite that has #000000 inside its interior.
--excludestrComma-separated filename globs to exclude (e.g. '*_sheet.png,*_atlas.png').
--godot-projectstrOptional Godot 4 project directory for live probe.
--probe-scenestrOptional Godot probe scene (must emit 'SYNC_CHECK dx=<float>').
--max-dxfloat2.5Max allowed sprite-to-actor drift in pixels.
--godot-binstrGodot 4 binary (default: GODOT_BIN or 'godot').
--check-animflagCheck animation frame stability per frame subdirectory.
--max-foot-driftintWith --check-anim: max allowed foot-line drift in pixels (default: scaled with the frame height, 2 px up to 36 px tall).
--max-bbox-jitterintWith --check-anim: max allowed bbox size/center jitter in pixels (default: scaled with the frame height, 4 px up to 36 px tall).
--include-rootflagWith --check-anim: also treat loose PNGs directly in --assets-dir as one animation.
--render-scenestrWith --godot-project: render this scene (res://...tscn) headless and check the frame.
--render-goldenstrWith --render-scene: compare the rendered frame against this PNG.
--render-frameint30With --render-scene: the frame to capture, at 60 fps (default: 30).
--render-max-diffint0With --render-golden: pixels allowed to differ (default: 0).
--qualityflagAlso run the advisory pixel-art quality checks (orphan pixels, jaggies, ramp harmony).
--quality-strictflagLike --quality, but quality warnings fail the command (exit 1).
--quality-rulesstrComma-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.

text
mode8 layers list --asset ASSET [options]
ArgumentTypeDefaultDescription
--project-rootstrProject root (default: the project the current directory is in).
--assetstrRequired. Asset name (assets/<name>/).
--expected-sha256strRefuse the edit (ConflictError) unless master.png still has this SHA-256.
--actorstrcliJournal 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.

text
mode8 layers add --asset ASSET [options]
ArgumentTypeDefaultDescription
--project-rootstrProject root (default: the project the current directory is in).
--assetstrRequired. Asset name (assets/<name>/).
--expected-sha256strRefuse the edit (ConflictError) unless master.png still has this SHA-256.
--actorstrcliJournal actor (default: cli). One of human, agent, cli.
--image-pathstrLayer PNG (canvas size); default: blank transparent layer.
--namestrLayer display name.
--layer-idstrLayer id (default: auto layer-N).
--opacityint255Opacity 0..255 (default: 255).
--visibleflagAdd the layer visible (default).
--hiddenflagAdd the layer hidden.
--positionstrtopWhere 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.

text
mode8 layers set --asset ASSET --layer-id ID [options]
ArgumentTypeDefaultDescription
--project-rootstrProject root (default: the project the current directory is in).
--assetstrRequired. Asset name (assets/<name>/).
--expected-sha256strRefuse the edit (ConflictError) unless master.png still has this SHA-256.
--actorstrcliJournal actor (default: cli). One of human, agent, cli.
--layer-idstrRequired. Layer id.
--namestrNew display name.
--opacityintNew opacity 0..255.
--visibleflagShow the layer.
--hiddenflagHide the layer.
--image-pathstrReplace the layer's pixels with this PNG (canvas size).
--expected-layer-sha256strRefuse 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).

text
mode8 layers delete --asset ASSET --layer-id ID [options]
ArgumentTypeDefaultDescription
--project-rootstrProject root (default: the project the current directory is in).
--assetstrRequired. Asset name (assets/<name>/).
--expected-sha256strRefuse the edit (ConflictError) unless master.png still has this SHA-256.
--actorstrcliJournal actor (default: cli). One of human, agent, cli.
--layer-idstrRequired. Layer id.

Exit codes: 0, 2, 3.

Report keys: action, asset, entry_id, layers, ok, previous_sha256, sha256.

mode8 layers reorder#

Reorder the stack.

text
mode8 layers reorder --asset ASSET --order IDS [options]
ArgumentTypeDefaultDescription
--project-rootstrProject root (default: the project the current directory is in).
--assetstrRequired. Asset name (assets/<name>/).
--expected-sha256strRefuse the edit (ConflictError) unless master.png still has this SHA-256.
--actorstrcliJournal actor (default: cli). One of human, agent, cli.
--orderstrRequired. 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.

text
mode8 layers merge-down --asset ASSET --layer-id ID [options]
ArgumentTypeDefaultDescription
--project-rootstrProject root (default: the project the current directory is in).
--assetstrRequired. Asset name (assets/<name>/).
--expected-sha256strRefuse the edit (ConflictError) unless master.png still has this SHA-256.
--actorstrcliJournal actor (default: cli). One of human, agent, cli.
--layer-idstrRequired. 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.

text
mode8 layers flatten --asset ASSET [options]
ArgumentTypeDefaultDescription
--project-rootstrProject root (default: the project the current directory is in).
--assetstrRequired. Asset name (assets/<name>/).
--expected-sha256strRefuse the edit (ConflictError) unless master.png still has this SHA-256.
--actorstrcliJournal 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).

text
mode8 mcp

Speaks 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.

text
mode8 studio [directory] [options]
ArgumentTypeDefaultDescription
directorystr.Project root directory (auto-initializes if needed).
--hoststr127.0.0.1Bind address (default: 127.0.0.1).
--portint8420Port number 1..65535 (default: 8420).
--no-browserflagDo not automatically open the browser.
--comfy-urlstrOptional ComfyUI server URL override.
--allow-hoststrComma-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).

text
mode8 schema [options]
ArgumentTypeDefaultDescription
--sectionstrPrint 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#