Is the command-line interface included in every build?
No. The release ships a separate CLI archive, so check which artefact you downloaded before concluding the command is missing. Editor and CLI are distributed as different files.
PhotoCraft exposes a command-line binary, a JSON control channel and an MCP server, which means one edit definition can drive a single file, a whole directory or an agent conversation. Start with one command on one file, move to a JSON action set for a batch, then expose MCP only once the action set is stable.
Install the CLI build All guides
Written against the build verified on 2026-10-13.
Three surfaces, one escalation ladder. The CLI is for a repeatable single operation. The JSON action file is for the same operation across many files, and it is where you stop typing parameters. MCP is for letting a program decide which action to run, and it should be the last thing you adopt, because it inherits every mistake in your action definitions at machine speed.
Apply a single filter and write a new file
photocraft-cli run input.psd \ --cmd filter.sharpen.smartSharpen \ --params '{"amount":80}' \ --out output.png Documented upstream command surface. Compare against the help output of your installed build before relying on it.
List what the binary accepts
photocraft-cli --help Run this first. Parameter names move in an alpha project, and the installed binary is the authority.
The shape that matters is the separation of the three arguments: which file, which operation, which parameters. Because parameters are a JSON value, you can build the same call from a script instead of typing it, which is what makes the step to batching small rather than a rewrite.
Run an action set over a folder
photocraft-cli batch --actions grade.json --in ./raw --out ./graded Keep raw and graded as separate directories: never write back over your source batch.
An action file describes a sequence rather than a single call: which adjustments apply, in what order, with what parameters. Treat it as code. Put it in version control next to the project it belongs to, name it after the job rather than the tool, and test it against three files before pointing it at three hundred.
Start the MCP server
photocraft-cli mcp The server exposes editor operations to any MCP-speaking client, so an agent can drive work headlessly.
This is the part that changes the shape of a workflow. Instead of describing a job to a person, an agent can execute it: open a file, apply a known action set, export, report what it did. Two guards are worth writing down before you let anything run unattended. First, restrict the agent to named action files rather than arbitrary parameters, so a confused model cannot invent a destructive operation. Second, keep the input directory read-only and let output land in a fresh folder; the failure mode of automation is not a bad edit, it is a bad edit applied to everything.
| Check | How | Why |
|---|---|---|
| Digest the inputs | Count and total size of the source directory | A run that processed 40 of 400 files is a silent failure |
| Dry-run one file | Same action, single input | Catches parameter drift before it is multiplied |
| Compare visually | Open a sample of outputs at full size | Sharpness and noise work that looks right at thumbnail scale often is not |
| Keep a manifest | Write the action file name plus the version used | Six months later you need to know which definition produced that set |
| Fail loudly | Non-zero exit stops the loop | Automation that swallows errors converts a small mistake into a large one |
Write the action file before you write the loop. That ordering sounds obvious and is regularly inverted in practice, and it matters because a JSON definition can be reviewed, versioned and reused, while a shell loop tends to become a one-off line nobody can audit six months later when the output looks different from last time.
Store the action file, the build version and one sample input together. Three artefacts, and a pipeline that ran in the spring can be reproduced in the autumn rather than re-invented. That is the whole difference between automation as a convenience and automation as an asset.
Keep a changelog of your own action files. When a delivery comes back with a note that the whites look different from last month, the answer is rarely in the editor and almost always in the definition: a parameter that moved, a step that was reordered, a build upgraded between two runs. Three artefacts in version control, the definition plus the build version plus one sample input, and the question has an answer instead of a theory.
No. The release ships a separate CLI archive, so check which artefact you downloaded before concluding the command is missing. Editor and CLI are distributed as different files.
That is the point of the action file and the CLI: one definition applied across a directory with no panel clicking in between. It is also why the JSON definition deserves version control like any other code.
MCP is a protocol that lets a program drive a tool on behalf of a person. Exposing the editor over MCP means an agent can apply your known action sets headlessly, so the repetitive half of a job stops occupying a human session.
Treat them as documented upstream syntax and compare against the help output of your installed build. This is an alpha project, so command names and parameters can move between releases, and your binary is the authority.
Keep the input directory read-only and write into a fresh output directory. Automation fails in one direction only: it applies a mistake consistently, and separate directories keep that mistake recoverable.