Install
openclaw skills install @dishant0406/pixr-cliopenclaw skills install @dishant0406/pixr-cliUse this skill when the task is specifically about the local pixr CLI in this repository or its home-directory defaults under ~/.pixr.
Typical triggers:
Do not use this skill for general image-API design discussions that are not tied to this CLI.
pixr works with gemini (default), openai (any OpenAI-compatible API), openrouter, and fal. There is no built-in model and no hardcoded capability list: the user chooses the provider and model for each task, and everything about a model comes live from the provider.
--provider, --base-url, and --api-key-env <ENV_VAR_NAME> (or a profile / commands.<name> in config). Check pixr config --json for what is resolved and whether a key is loaded.pixr models --provider <p> --search "<text>" [--category image-to-image] --json.pixr models --info <model> --provider <p> (parameters, input image limit, native mask field). Gemini and OpenAI-compatible APIs publish nothing; then requests are sent as asked.--param name=value (JSON values; @file.png becomes an image data URL). Do not invent parameter names; use the ones --info lists.Prefer the installed binary when available:
pixrIf you are working inside this repo and do not want to depend on a global link, use:
npm run dev -- <command>npm run pixr -- <command>pixr help for global help or pixr <command> --help for command help.pixr config --json.pixr profile listpixr profile show <name>pixr profile init <name>pixr config --profile <name> --jsonpixr model ...pixr save-dir ...~/.pixr/INSTRUCTION.md~/.pixr/STYLE.md~/.pixr/prompts/<command>.md~/.nano-image/STYLE.md~/.pixr/assets or ~/.pixr/profiles/<name>/assets and verify with pixr refs --json.
Remember that pixr keeps only the latest three default asset images by modified time.For generation details and command recipes, read references/command-reference.md.
Key rules:
generate or gen for prompt-only creation.edit for text-guided changes to an existing image.vary for one or more variations of an existing image.edit <image> --mask <mask.png> to change only part of an image (white = change, black = keep, same size as the input). Make masks with pixr mask <image> --rect x,y,w,h (or --ellipse). Outpaint with pixr extend <image> --pad ..., which also writes the mask of the new area.edit works with any image-to-image model; the prompt is optional for models that take none.pixr info, resize, crop, extend, mask, grid (grid puts several candidates in one sheet to compare).--json, --no-stdin, and errors arrive as JSON on stderr with exit code 1 (2 for usage errors).-w plus -h stretches an image of a different shape (pixr warns); use one of them to keep the shape.~/.pixr/config.json.--save-to or --output, that overrides the saved default output directory.png; jpg, jpeg, and webp are supported through local conversion.When generating from scratch:
pixr generate "<prompt>" (or pixr gen "<prompt>").pixr edit passes for controlled refinements.For edits, use a Photoshop-style layer mindset.
Mandatory rules:
Recommended layer order (smallest changes first):
Per-layer loop:
pixr edit command focused only on that micro-goal.Example iterative sequence:
pixr edit --input in.png --prompt "Remove small background clutter only; keep subject unchanged."pixr edit --input step1.png --prompt "Adjust face proportions slightly; keep lighting and colors unchanged."pixr edit --input step2.png --prompt "Add warm rim light on subject; do not alter composition."Prefer precise constraints in edit prompts:
For persistent settings and file layout, read references/defaults-and-files.md.
Prefer command-driven config changes:
pixr model <name> (list real names first with pixr models)pixr modelspixr save-dir --set "<path>"pixr save-dir --clear-save-dirpixr profile init <name> --model ... --save-dir ...pixr profile init <name>Avoid editing ~/.pixr/config.json directly unless the user explicitly asks for a manual file edit.
Read references/troubleshooting.md when:
After making changes or guiding usage:
--json when you need machine-readable confirmation