CLI reference › PixelLab utilities

asset

Upkeep for an object or character that already exists on PixelLab, by its PixelLab id (a lock entry's objectId). --kind is object (the default) or character; asset import also takes tileset and tiles. Everything except expand is free.

pixelkiln asset import --from art/knight.png --name knight
pixelkiln asset import --kind tileset --from art/meadow-sheet.png --size 16 --lower grass --upper stone
pixelkiln asset import --kind tiles --from art/floor-tiles/ --tile-type square_topdown --size 32
pixelkiln asset save --target object:<object id>:south --from art/knight-edited.png
pixelkiln asset expand --id <object id> --direction south
pixelkiln asset review --id <object id> --out review/
pixelkiln asset expand --id <object id> --keep
pixelkiln asset canvas --id <id> --kind character --size 64x64
pixelkiln asset mirror --id <id> --animation <animation group id> --direction east
pixelkiln asset export --id <id> --format aseprite --out art/knight
  • asset import stores your own PNG as a completed 1-direction object, exactly as drawn. PNG only, at most 256x256. It prints the new object's id.

  • asset import --kind tileset stores a Wang sheet you drew as a completed tileset, cut into its 16 (or 25) tiles with new ids, so it works in maps and chaining like a generated one. The sheet must be in one of PixelLab's two layouts: 4 tiles wide (what a tileset download gives) or 8 wide (its native sheet), square or twice as tall, with 16, 24, 32, 48 or 64px tiles. --mode sidescroller imports a platform set instead of a top-down one. --lower, --upper and --transition describe the terrains and --name names the set. Give --size when the sheet reads two ways. A 128, 192 or 256px-wide sheet is both a 4-wide sheet and an 8-wide one at half the tile size, and PixelLab takes the 4-wide reading unless told: a 16px native sheet sent without a size came back as sixteen 32px tiles, each a quarter of the sheet. The command refuses such a sheet until --size says which.

  • asset import --kind tiles stores 1 to 32 tile PNGs as one tile group, ready for maps. --from is one PNG or a directory, whose PNGs are sent in name order (tile-2 before tile-10). --tile-type is square_topdown, isometric, oblique, hex, hex_pointy or octagon, and --size is the tiles' width, 16 to 256. Every tile is that wide; square and octagon tiles are exactly that tall, isometric and hex tiles half to twice it, and oblique tiles one to twice it. A tile of the wrong size is refused before anything is sent. --description says what the tiles are. The view the tiles are drawn in is left at PixelLab's default, low top-down.

  • asset save writes edited pixels back into something PixelLab already stores, so its website, maps, exports and game projects show your edit. --target says where:

    TargetWhat it replaces
    character:<id>:<direction>One rotation of a character.
    object:<id> or object:<id>:<direction>An object's image, or one rotation of an 8-direction object.
    either, with :<animation group id> addedOne direction of an animation.
    gallery:<id>A gallery image.
    gallery:newNothing: the image is added to the gallery. --name and --description label it.
    tileset:<id>A tileset's whole sheet, in the 4-wide layout.

    --from is a PNG, an animated GIF, or a directory of PNG frames sent in name order. The image must match what it replaces in size and frame count; PixelLab refuses otherwise and names the size it wants. Pad or crop with transparent pixels, never rescale. Every save can be undone. The pixels it replaced are written to --out <dir>, or to pixelkiln-undo/<target>-<time>/ when you give none, and the command prints the line that saves them back. The command asks before replacing anything (--yes skips the question, --dry-run sends nothing). A save that changes no pixel writes nothing.

  • asset expand draws the 7 missing directions of a 1-direction object. --direction says which way its image faces now; that image is kept unchanged as that direction. --description guides the new angles. It costs 10 to 25 generations by the padded canvas; the command asks first (--yes, --budget below 25 is refused, --dry-run), and prints PixelLab's quote when the job is accepted. Two 10-generation expansions were measured (November 2026), each about 100 s.

  • The new directions then wait for review, and the object stays 1-direction until you decide. asset review --out <dir> downloads one PNG per direction so you can look; asset expand --keep makes the object 8-direction, and asset expand --discard drops them and leaves the object as it was. PixelLab bills the expansion when the review is ready, not when you keep it, so discarding does not refund it.

  • Look before you keep. The new angles are drawn to suit the canvas, not matched to the original's size. A 16x20 icon on a 48x48 canvas came back as seven large, detailed drawings beside the untouched small original, which is not a usable set; a sprite that fills its canvas (a 64x64 knight) came back consistent. Trim the canvas to the art before expanding.

  • asset canvas --size <width>x<height> adds or removes transparent margin around every rotation, re-centred on the pivot. Sides are multiples of 4, from 8 to 256 for a character or 400 for an object. The art is never scaled or cropped: a size that would crop it is refused, with the art's own bounds in the message. Existing animations keep the canvas they were made on. Keeping an expansion also grows the canvas (64x64 became 68x68).

  • asset mirror flips one direction of a loop into its missing opposite on PixelLab (east and west, and the diagonal pairs; south and north have no mirror). It is refused when that direction already exists. This is PixelLab's own copy of the loop; a manifest mirror asset is flipped locally and needs none of it.

  • asset export --format zip|spritesheet|aseprite|gif --out <file> downloads the website's exports. zip (the default) is the PNGs with a metadata.json; spritesheet is a ZIP of one sheet and its layout JSON; aseprite is one .aseprite file with a tag per rotation set and animation direction; gif turns through the rotations, or plays one loop with --animation and --direction. A 1-direction object has no rotations to turn through, so its GIF needs an animation. The extension is added when --out has none.