Command reference
Every command's own help, as pxart prints it. Each page here is the output of pxart help CMD, so the site and the tool say the same thing.
renderRender frames to a preview PNG with a pixel grid and x/y rulers, to look at while you edit.
sheetMany frames (.px/.png files, or every .px under a directory) side by side on one PNG, each labeled with its id, size and color count.
animAn animation as one GIF, plus a strip of what changed frame to frame (the whole-sprite shift taken out) and one line of numbers per frame, so a walk that's secretly a bob shows up.
onionFrame B drawn over A's silhouette, and a readout of how B's edges moved from A's ('top -1'), for a 1px jump too faint to see; --feet N reads only the bottom rows.
scenePlace .px/.png items at x,y (or a text tilemap with --map) on one canvas and render it, optionally in a variant (--variant night) or tinted (--tint).
tintLay a translucent color over a PNG, as scene --tint does (a night in one step).
worldDraw a compiled world (.world, or a lone .tmj): its rooms where they sit, interiors aside, edges, doors and where they lead, the start, markers, and every world-rule issue tagged.
checkCheck .px and .map files: format errors with a code and location, size, colors, budget and unused keys; one line per file. Exits 1 on any failure.
statsSize, bounding box and colors of frames, a variant's rendered colors (--colors), or one pixel's key and color in every variant (--at x,y).
diffCompare renders pixel by pixel (a frame, a file, a folder of PNGs) and exit 1 when they differ: proof that a port or a copy renders as its original. -o DIFF.png draws what differs.
framesList a file's frames and animations; or remove (--rm), move (--after/--before), rename (--rename) or copy them into another file (--copy-to).
flipMirror selected frames left-right (--v: top-bottom)
shiftMove a frame's pixels (or a region's) by dx,dy, dropping or wrapping what goes past the edge.
setPaint single pixels ('.' erases)
fillPaint a rectangle (default: the frame; '.' clears)
newStart a frame, blank or filled with one key, in a new file or an existing one; or a file with no frames that imports a palette (--empty).
putReplace one frame's grid with rows from stdin (palette lines first, optionally).
maskErase every pixel outside rectangles or circles (or inside, --invert), or by key; a PNG too.
cropCut a rectangle out of one frame into a frame of its own, in the same file or another.
extractWrite only the selected frames to a new file, with their palette, imports and @anim lines.
recolorRepaint, swap or rename palette keys in frames ('a=b', 'a<>b', 'a>b'), or give a key a new color.
pasteCopy one frame (or a region of it) onto another at x,y; '.' never overwrites.
composeStack frames from any files (layers at x,y, or a --map's cells) into one frame of OUT, bringing their keys and variants into OUT's palette. Add --rekey when two sources (or a source and OUT) use the same key letter for different colors: E_KEY_CONFLICT says so.
dupCopy a frame under a new id, placed after its animation's last frame, to edit the copy; or a whole group under a new name, with its timing, pivots and @anim line (dup hero.px:walk/right walk/left).
anim-setWrite an animation's timing and pivot on its @anim line (or one frame's), or mark it @still.
paletteList a file's palette and what each variant does; or edit it: add keys and variants, derive a night or dusk, hoist, import, remove, order, comment, export.
lineDraw a line of a palette key between two points (Bresenham), --width N wide.
rectA 1px border, or filled
polyDraw a closed polygon through the points, optionally --fill'ed.
ellipseDraw a symmetric pixel ellipse (or circle), optionally --fill'ed; .5 centers give even sizes.
arcDraw part of a circle, from angle a0 to a1 (a smear or swoosh), --width N wide.
floodBucket-fill the region of one key that touches x,y.
rotateTurn frames clockwise (a WxH frame becomes HxW)
transposeMirror across the top-left/bottom-right diagonal
shadeRe-shade a material with a darkest-to-lightest ramp, by how each pixel faces the light.
outlineOutline a frame's shape with a key, optionally lit on the side facing the light (--lit).
exportWrite frames as PNGs (--frames), an Aseprite sheet and JSON (--aseprite) or a Tiled tileset (--tiled), from files or whole folders; or compile a world (world.src.json and its .map rooms) to Tiled maps and a .world (--tiled).
from-pngConvert PNGs (loose, a pack with a labels CSV, or one sheet sliced by --grid) to .px with exact pixels.
pxart -h
The short overview: the format in a few lines, and the commands by topic.
usage: pxart [-h]
{render,sheet,anim,onion,scene,world,tint,check,stats,diff,frames,flip,rotate,transpose,shift,mask,recolor,set,crop,paste,new,put,fill,line,rect,poly,ellipse,arc,flood,outline,shade,extract,compose,dup,anim-set,palette,export,help,from-png} ...
pxart: pixel art as text. Sprites are text files; renders are PNGs you can look at.
A sprite is a .px text file: a palette, then a grid of its keys.
# comments start with '#'
pxart 1 optional version line (first non-comment line)
@palette base.px optional: import palette keys from another .px file
k #3f2631 palette: one key char, then #rrggbb, #rrggbbaa, or 'transparent'
g #43e1b3 ('.' is always transparent; you may omit it)
....kkkk.... grid rows: all the same width, only palette keys.
...kggggk... The sprite's size is the grid's size: nothing to count.
Any command that takes FILE takes FILE:walk/down (a group) or FILE:walk/down/0 (a frame).
+----------------------------------------------------------------------------------------+
| zsh users: write "${F}:walk", not "$F:walk" (zsh reads ':w' as a modifier), or quote |
| the whole argument. A missing hero.pxalk/0 or hero.pxidle is reported as that mistake. |
+----------------------------------------------------------------------------------------+
Commands by topic ('pxart CMD -h' for one, 'pxart help TOPIC' for a topic's reference):
LOOKING render sheet anim onion scene tint world
CHECKING check stats diff frames
EDITING flip shift set fill new put mask crop extract recolor paste compose dup anim-set palette
DRAWING line rect poly ellipse arc flood rotate transpose shade outline
CONVERTING export from-png
HELP help
(rename) no command of its own: frames FILE --rename GROUP NEWGROUP renames frames; recolor FILE 'a>b' a key
Topics: FORMAT (the .px format: frames, animation, pivots, variants, selecting frames), LOOKING,
CHECKING, EDITING, DRAWING, CONVERTING, HELP, ERRORS. 'pxart help all' prints the whole reference.
Own topics: 'pxart help worlds' (Tiled worlds), 'pxart help slots' (palette slots: a key's
alternatives for a game to recolor; render --slots, export --indexed).
Start here: 'pxart help recipes' walks through seven workflows end to end: port a pack and prove
it lossless, merge packs with variants, build a dusk or night, slice a sheet, make a scene from a
map, check an animation's feet, stamp an overlay behind an animation.
positional arguments:
{render,sheet,anim,onion,scene,world,tint,check,stats,diff,frames,flip,rotate,transpose,shift,mask,recolor,set,crop,paste,new,put,fill,line,rect,poly,ellipse,arc,flood,outline,shade,extract,compose,dup,anim-set,palette,export,help,from-png}
options:
-h, --help show this help message and exitsite/src/data/reference.json in the repository.Edit on GitHub