COMMAND LINE

Use the standalone PixelWall CLI

The CLI uses the same document engine as the current editor and runs locally with Node.js 22.13 or newer. The downloadable bundle includes its JavaScript dependencies; it does not need an app server or embedded AI.

Open the editor

Download and start

Download and extract the CLI bundle. Open a terminal in the extracted folder and run node pixelwall.mjs help. The examples below use the bundled file directly; an installed pixelwall command accepts the same arguments.

node pixelwall.mjs help
node pixelwall.mjs new --width 32 --height 32 --name Hero --out hero.pixelwall
node pixelwall.mjs inspect hero.pixelwall
node pixelwall.mjs render hero.pixelwall --frame 0 --scale 4 --out hero.png

Apply command files or a trusted script

Put the JSON command array from the scripting guide into edits.json. apply reads it and writes the resulting native document. script loads the JavaScript module you explicitly choose; the module can access ordinary Node facilities.

node pixelwall.mjs apply hero.pixelwall --commands edits.json --out hero-edited.pixelwall
node pixelwall.mjs script hero.pixelwall --script ./draw.mjs --out hero-scripted.pixelwall

// draw.mjs
export default async ({ apply }) => {
  apply({ type: "draw.rect", x: 2, y: 2, width: 12, height: 12,
          color: "#ffb34bff", filled: true });
}

Run a Lua script

Lua scripts run locally with supported sprite-editing APIs. Use --params for app.params and --out-dir when a script edits more than one project. The default time limit is 3 seconds; --timeout can raise it to 10000 milliseconds. The Lua worker cannot read arbitrary files or use the network.

node pixelwall.mjs script hero.pixelwall --script ./draw.lua --out hero-scripted.pixelwall
node pixelwall.mjs profile hero.pixelwall --convert sRGB --out hero-srgb.pixelwall

Import and export

  • import art.ase --out hero.pixelwall reads a supported binary sprite file. PNG, BMP, TGA, GIF, and native inputs are also supported.
  • import sheet.png --frame-width 32 --frame-height 32 --out hero.pixelwall slices a PNG sheet; margin, spacing, count, order, and duration options are available.
  • import-sequence frame1.png frame2.png --duration 100 --out hero.pixelwall combines PNG files in the supplied order.
  • export hero.pixelwall --format ase --out hero.ase writes a supported editable sprite document for free.
  • render writes a single PNG frame. export with png, bmp, or tga also writes a free individual frame.
  • export with gif, sheet, atlas, or zip requires a valid Pro ownership license. Use sheet for a fixed-column sheet and atlas for trimming and packing.
node pixelwall.mjs export hero.pixelwall --format atlas --trim --padding 2 --extrude 1 --power-of-two --out hero-atlas.png --license license.txt
node pixelwall.mjs export hero.pixelwall --format gif --clip Walk --out hero-walk.gif --license license.txt
node pixelwall.mjs export hero.pixelwall --format zip --out hero-game.zip --license license.txt

License and format caveats

Supply the downloaded ownership license with --license, or supply the raw PW2 code using PIXELWALL_PRO_LICENSE. A valid signed PW2 license verifies offline against the public keys included in the build. Existing PW1 codes need one online conversion first.

Frame selectors are zero-based indices or frame IDs. --clip accepts a clip ID or exact name. CLI scale supports integer factors from 1 to 64, subject to output memory limits; the interactive editor exposes 1×, 2×, 4×, and 8× choices.

The CLI runs Lua sprite-editing scripts in a bounded worker. File features outside the documented format support may not survive import and export. Read warnings on stderr and keep the source file. Individual PNG/BMP/TGA images cannot preserve editable layers or clips.