ekphrasis [--root PATH] [--json] COMMAND uses --root, then EKPHRASIS_ROOT,
then the current directory as the library. --json requests machine-readable output;
logs/errors can still appear on stderr. Use --help on any command for exact arguments.
Examples below assume the binary is on PATH and EKPHRASIS_ROOT points to a library.
Replace PHOTO_ID and STYLE_ID with IDs from list commands.
ekphrasis doctor
ekphrasis photos import /absolute/path/photo.jpg /absolute/path/other.png
ekphrasis --json photos list
ekphrasis photos show PHOTO_ID
ekphrasis edit PHOTO_ID "Warm the light" --from 0
ekphrasis edit PHOTO_ID "Remove the sign" --model MODEL_NAME
ekphrasis tools auto PHOTO_ID
ekphrasis tools smartcrop PHOTO_ID --aspect 4:5
ekphrasis tools apply PHOTO_ID --ops '{"adj":{"exposure":0.3}}'
ekphrasis erase PHOTO_ID --mask /absolute/path/mask.png --engine lama
ekphrasis erase PHOTO_ID --mask /absolute/path/mask.png --engine codex --hint "Continue the wall"
ekphrasis background PHOTO_ID --mode transparent
ekphrasis background PHOTO_ID --mode color --color '#ffffff'
ekphrasis background PHOTO_ID --mode blur --blur 50
ekphrasis export PHOTO_ID --version 1 --format jpeg --quality 92 --max-side 2048 -o /absolute/path/export.jpgMasks are full-size grayscale images matching the source dimensions. Check the
tool operation parser before composing manual
--ops: it is a different schema from a style recipe’s ops array.
ekphrasis styles create --name "Warm film" --from-photo PHOTO_ID
ekphrasis styles create --name "Warm film" --text /absolute/path/steps.txt
ekphrasis styles list
ekphrasis styles show STYLE_ID
ekphrasis styles compile STYLE_ID
ekphrasis styles apply STYLE_ID PHOTO_ID OTHER_PHOTO_ID --from-originalThe text file contains one style step per line. Use either --from-photo or --text.
The hidden renderer command needs no library root:
ekphrasis style-render style.json input.jpg output.png --compare reference.pngekphrasis photos delete PHOTO_ID deletes a photo from the library. Back up important
photos first; the MCP interface intentionally has no delete tool.
| Exit code | Meaning |
|---|---|
| 0 | Success |
| 1 | Operation or dependency error |
| 2 | Invalid command-line arguments |
| 3 | Photo busy |
| 130 | Interrupted edit (Ctrl+C); Codex is stopped without committing a new version |
For MCP use ekphrasis mcp; see the MCP reference.