PhotoCraft: a Rust reimplementation of Photoshop that puts every action behind a single command registry, drivable by an MCP server — aniketkarneai.com | aniketkarneai.com
Wednesday, November 11, 2026 Field notes on autonomous systems ● Amsterdam, NL
daily

PhotoCraft: a Rust reimplementation of Photoshop that puts every action behind a single command registry, drivable by an MCP server

storytold/photocraft is an open-source, clean-room Photoshop clone written in pure Rust (no Tauri, no Electron, no webview). 25 crates, ~539,000 lines, ~8,040 tests, 628 of 628 Photoshop menu items wired, 56 of 68 tools implemented, and every menu/tool/dialog runs through a 500+-command registry so the same engine is reachable from the UI, a CLI, a JSON control channel, and an MCP server. Currently at ~45% "ready for real work"; ~1,100–1,800 Opus-5.5 agent-hours to beta, with PSD-write fidelity and 22/25 missed performance budgets the open blockers.

The repo I keep coming back to this week is storytold/photocraft. It’s a clean-room, open-source reimplementation of Adobe Photoshop written in pure Rust — no Tauri shell, no Electron, no JavaScript anywhere, the desktop app is native egui on wgpu and the same code compiles to WebAssembly for a browser build. The headline-number is 76% feature breadth against Photoshop 2026 (628 of 628 menu items wired, 56 of 68 tools implemented, 13 of 31 file formats covered plus 4 more partial), but the more interesting fact is the architecture: there is a registry of “around 700” commands in crates/engine and every menu item, tool, dialog, CLI subcommand, recorded action, JSON control channel and MCP server call dispatches by command id. The UI is treated as one client out of several. That choice is what makes the thing scriptable end to end, and it’s why the README is full of examples like:

photocraft-cli run wave.psd \
  --cmd filter.sharpen.smartSharpen     --params '{"amount":80}' \
  --cmd layer.newAdjustmentLayer.curves --params '{"points":[[0,0],[64,48],[192,212],[255,255]]}' \
  --out wave-final.png

photocraft-cli batch --actions grade.json --in ./raw --out ./graded

photocraft-cli mcp

That last line is the one that matters for an AI-agent crowd. The CLI ships an MCP server. Every Photoshop action — and every dialog control — is reachable from an MCP client by commandId. Drive it from Claude Code, from Codex, from Opencode, from anything that speaks MCP, headless or against the running app. The AGENTS.md at the repo root is written explicitly for this audience, and it tells you to read it before any change lands.

What’s actually hard on the native canvas

A photo editor is one of those apps that looks deceptively simple until you try to write one. The hard parts in 2026 are not the marquee tool or the layer panel — it’s everything underneath them. Three numbers from the project’s own parity and scorecard docs give the shape of the problem.

539,000 lines of Rust across ~1,310 files in 25 library crates, ~8,040 #[test] functions. That’s the size of the codebase as of 2026-10-10. The ui-egui crate alone has 2,809 test functions; engine has 1,796; the imaging algorithms crate (algo) is at 572. The unit-test density exists because Photoshop is the kind of software where a one-pixel-off gradient or a wrong blend mode gets caught by an artwork in the wild. The authors have built in test corpora — psd-tools, ag-psd, PngSuite — fetched and pinned by sha256 with cargo xtask corpus --all, with oracle rendering that compares the project’s own CPU compositor against its wgpu GPU compositor.

Three of twenty-five performance budgets pass. Everything else in the budget table is over the line or not measurable yet. A radius-180 Gaussian on a 3.6 MP image is under a second because the project uses running-sum box passes across all cores — that’s the rare bullet point. A 150-layer GPU composition is the open stability bug cited in the roadmap. Brush and transform feel — what people mean when they say “this doesn’t feel like Photoshop” — is its own dimension at 55% (from 35% in two months) with 160–290 Opus 5.5 agent-hours still on the table.

953 open issues at the alpha gate. The project has written its own alpha gate. Six core workflows must pass end-to-end (retouch, composite, cut-out, design, paint, PSD exchange). At the time of writing, all six complete; four are partial in depth; none are blocked. PSD exchange is the embarrassing one — a .pcraft saved and re-opened should be byte-identical, but the saved PSDs are not yet reliably accepted by Photoshop (#1281, #2469).

That third number is also the most important one to track. A photo editor that can’t write PSDs that Photoshop trusts is not, in practice, a Photoshop replacement. The roadmap acknowledges this and puts it at rank 1 of 5 upcoming milestones (150–250 hours to land).

The mechanism, in one sentence

Every user-visible action is a command with a stable id, typed serializable parameters, a registry slot in crates/engine/src/commands.rs, a CommandSpec describing its label, menu path, shortcut, params doc, and enabled predicate, plus tests — and the UI, CLI, control channel and MCP server all dispatch by that id, so adding a feature means wiring one command and it shows up in every surface for free.

That sentence is doing more work than it looks. The reason to put the engine behind a command registry is not just DRY — it’s that the UI becomes replaceable. The architecture.md puts it first: “the UI can be swapped without touching the core.” egui today, maybe Slint or Qt tomorrow. The third-party implications are bigger than that, though. Anything that knows how to send “command + params” can drive the editor, and in 2026 the things that know how to send structured messages are mostly language models.

What the numbers actually show

The repo’s ROADMAP.md is the most interesting doc I read this week. It is structured to make one question answerable: how far is this from being a Photoshop replacement? The numbers have a level of honesty I don’t usually see in open-source project docs.

Headline.

MetricValueSource
Feature breadth~76%628/628 menus, 56/68 tools, 30/35 panels, 13+4 of 31 formats
Ready for real work~45% (40–50%)weighted by dimension
Mainstream practitioner readiness~43%weekly areas of a typical pro, with discounts
Essentials user readiness~61%core features only
Hours to beta~1,100–1,800Opus 5.5 agent wall-clock, calibrated from 1,004 merged PRs
Hours to full parity~2,300–4,100AI and plug-ins need owner decisions

The “Ready for real work” number is not the same as feature breadth. Breadth is 76%. Depth is what limits it, and depth is at 55% with a separate per-feature-area table.

By feature area, picked from the full table:

Area% readyHours to full
Adjustments and filters70%120–200
Colour management and modes70%60–100
Layers, masks, blend modes, smart objects, styles65%150–250
File I/O60%300–500
Selections, Select and Mask, channels55%120–200
Vector shapes and paths55%80–140
Brush engine55%150–250
Print, export, Save for Web50%120–200
Camera Raw and computational photo45%80–150
Type40%120–200
Workspace, panels, preferences40%150–250
AI / generative10%300–600
Video / timeline, data-driven graphics30%100–200
Ecosystem / plug-ins / scripting15%250–450

The matrix you can read off this is: editing primitives (layers, adjustments, colour, vectors, file IO) are mostly there; automation and scripting are at 15% with 250–450 hours left; AI features are at 10%, which is honest because the project has decided not to ship an ml runtime yet. (Gap G15 covers this — it’s owner-decision territory, not engineering-territory. Generative fill, text-to-image, generative expand, all of that is on the roadmap but gated on what the team decides to build or integrate.)

Languages are ahead of the depth curve. The 1,608-string key universe is translated into 14 languages at full coverage, but engine messages are still English-only, so every entry is “partial.” The work to make those engines localizable is part of the 80–140 hours of localization work the matrix lists.

The thing under “Built for agents”

The “Built for agents” section of the README is the part that puts the project in the conversation. The four interface modes share the same backend, and a clean-room implementation with a verbatim command registry is the rarest thing in this space.

# Headless: open, edit, save (one CLI invocation, three commands)
photocraft-cli run wave.psd \
  --cmd filter.sharpen.smartSharpen     --params '{"amount":80}' \
  --cmd layer.newAdjustmentLayer.curves --params '{"points":[[0,0],[64,48],[192,212],[255,255]]}' \
  --out wave-final.png

# Headless batch: apply an action list to a folder
photocraft-cli batch --actions grade.json --in ./raw --out ./graded

# Same surface, as an MCP server
photocraft-cli mcp

# Or attach to an already-running app via authenticated loopback
photocraft --control

That last mode is interesting because it gives you the running app’s own state through a TCP control channel, so an agent can drive a real Photoshop-equivalent UI by sending it the same commands a user would click. The README claims (and the screenshots back up) that every image in the README was rendered through this control channel, headless. There is a separate docs/control-protocol.md that documents the JSON messages.

The photocraft-cli mcp subcommand turns the registry into an MCP server. Anything that speaks MCP can list commands (each is registered with params doc, which is the schema), validate params, dispatch commands, and read state. The patterns this enables are:

  • Headless grade-and-export that runs in CI on every pull request that touches a brand asset.
  • Agent-driven PSD repair on input that fails the corpus round-trip — photocraft-psd is its own crate, parses and writes PSD without the document model, and was 100% round-trip-byte-identical on the parseable corpus files.
  • Mixed-UI workflows where a human opens the app, an agent joins via loopback and dispatches the tedious chains (smart-object sync, layer style paste, batch colour-mode convert), and a second agent drives a second tab of the same workspace through a different MCP client.

Each of those uses the same dispatch surface. The win for an agent-tool author is that you don’t have to learn Photoshop’s automation object model — the project’s crates/engine/src/commands.rs is your API. The cost, of course, is that you have to wait for the registry to grow.

The engineering rules the team has written down

Most open-source projects have a CONTRIBUTING.md. The AGENTS.md here goes much further than that. Three of its rules are worth highlighting because they shape everything else.

Rule 1 is “never crash, outranks feature work.” The repo forbids unwrap(), expect(), panic!, unreachable!, todo!, unimplemented! outside test code. A malformed file, a bad command parameter, a corrupt settings file, an odd keystroke or a full disk must produce an error the user or agent can act on. The argument is that people trust PhotoCraft with their work, and a crash loses it. That argument is correct for any tool that drives a real creative workflow, and it’s the same logic that makes strong type systems in editor tooling worth the effort. (On the costs: the tablet crate is the one isolated unsafe crate, because winit drops pen events on macOS and you need AppKit interop to read them; every unsafe block there has a SAFETY: comment and is tested against real NSEvents.)

Rule 2 is “everything is a command.” That phrasing matters because of the “everything.” It’s not a registry of features — it’s a registry of user-visible actions, where the actions are operations the user would click and could have done in the GUI before anyone wrote the registry. The size of the registry is the size of the GUI surface, and the surface is what the dispatchers (UI menu, command palette, keyboard shortcut, recorded action/macro, CLI, MCP, plug-ins) all share. When you add a feature, the menu item goes live automatically because the menu catalog is generated from the registry; when you record an action, the recorded JSON is a sequence of command invocations with params. The model is the artifact, not the chord.

Rule 3 is “clean-room.” The team studied Photoshop and other proprietary editors for behaviour and look only. No code, shaders, profiles or assets from any of them. All implementations come from public specifications (Adobe PSD, ICC, ISO 32000 blend modes, the academic literature on PatchMatch, Poisson blending and ARAP) and observed behaviour. This is the part that does the most work for a legal deployment of PhotoCraft in a studio that also has a Photoshop licence — the team has actively chosen a path where the project can be redistributed, embedded, and audited without inheriting someone else’s copyright. It also explains why their 1,700-test compatibility corpus is so valuable; the oracles are PSD files the project authors wrote themselves in real Photoshop, plus the open psd-tools and ag-psd corpora, all fetched by sha256-pin and tested against the round-trip-byte-identical parser crate.

Why the “every action is a command” choice is rare

It’s rare because most photo editors don’t have it. Photoshop itself has an automation object model (COM/IDispatch via VBScript, AppleScript via OSA, JavaScript via the Extendscript toolkit), but it grew over twenty-five years and is a documented surface of accumulated quirks; describing it as “everything is a command with a registry” would be a stretch. Affinity Photo — the closest commercial neighbour to PhotoCraft in terms of philosophy and licensing — has a macro recording, but it sits on top of the editor and is not the editor’s primary surface. GIMP’s Script-Fu and Python-Fu are post-hoc bindings on top of the C API.

PhotoCraft is interesting because the registry comes first. That’s not a one-week decision — it requires the engine, the UI and the protocol layer to be designed against a single dispatch surface from the first line of code. The fact that the project ships a CLI that takes the same commands as the GUI, and a headless photocraft-cli that runs without egui initialising at all, is downstream of that. So is the MCP server. So is the JSON control channel against the running app. So is crates/engine having 1,796 test functions on its own.

The cost of this design is that the registry must be designed carefully. The clip is from crates/engine/src/commands.rs, but the concept is in architecture.md §1: each command has a stable id, typed serializable parameters, and the GUI, command palette, shortcuts, recorded actions/macros, CLI, MCP and plug-ins all dispatch the same commands. Adding a feature means wiring one command and it shows up everywhere for free; removing a command is a breaking change, which is why the params doc and the registry both matter for long-term stability of any agent that depends on the surface.

Trade-offs and what it doesn’t fix

The Photoshop-dependency fork. Some workflows require Photoshop 2026 — the ones that depend on Camera Raw 17 with its neural network denoise pipeline, on Firefly’s generative fill, on cloud-synced libraries with the new asset panel, on the proprietary video timeline. PhotoCraft gets to 45% “ready for real work” without addressing any of those, because it has no ml crate and the camera-raw area is at 45% with 80–150 hours left. The AI / generative dimension is at 10% and explicitly on the owner-decision side of the calendar. Someone wanting “an open-source Photoshop” in production today gets layers, masks, adjustments, type, smart objects and selections, and they give up Firefly, video timeline, cloud libraries and the Camera Raw neural net. Whether that’s a fair trade depends on the workflow.

The handwriting on the wall. The repo is at ~45% depth on the editor surface. The roadmap says ~1,100–1,800 hours to beta. The PR rate is “1,004 merged PRs” across the project so far, calibrated against Opus 5.5 agent wall-clock hours. Beta requires a usable PSD-write path that Photoshop accepts, the 22 over-budget performance scenarios fixed, and the open bug backlog below 100 issues. None of those are quick. The honest read is: this is a multi-year project, and “adopt it before parity” only makes sense if the parity you need is editing primitives, file I/O and a scriptable surface for an agent fleet.

The “alpha” badge is real. The project’s own status line: “early alpha … not yet a Photoshop replacement for daily professional work.” The README enumerates the gaps: AI/generative features, 15 missing tools, depth in typography and pro workflows, plug-in compatibility. The honest-by-dimension parity assessment (docs/target-app-parity.md) is open and queried, but a reasonable read is that the project is at the inflection an open-source editor hits when it stops being a curiosity and starts being a tool, and the inflection usually takes a couple more release cycles to clear.

The reverse-attack direction matters. The team has been clear about not pivoting to “write AI features” (docs/gaps.md G15, owner decisions). The right move for an adopter who wants generative fill is probably to call Firefly from a script. But PhotoCraft’s own MCP server will not fill in that role for a while — the AI tier is on the roadmap, gated.

None of these are reasons not to use it. They are reasons to use it for the right things — the things the architecture already supports cleanly, including agent-driven headless editing through the command registry.

What I’d build on top of it

The shape of “what to do today” is interesting because the architecture is so clean. Three projects land cleanly on top of a registry this disciplined:

  1. Headless brand-asset pipeline. photocraft-cli batch --actions grade.json --in ./raw --out ./graded is the canonical primitive. Wrap it in a CI job that runs on every brand-asset drop, and the cost of colour/grade drift between brand variants becomes a CI artifact, not a Slack thread.
  2. PSD-as-source-of-truth helper. A small wrapper around the photocraft-psd crate, which already round-trips 100% of the parseable corpus files byte-identically in standalone mode (i.e. parsing and writing without the document model). When the project’s own PSD writer lands its Photoshop-trust fix, the wrapper can promote from “diagnose” to “author.” Today, this is a “fail-soft diagnostic.”
  3. MCP server skills. The photocraft-cli mcp subcommand is the surface. Author a small set of natural-language mapping skills — “grade these 200 photos for warm-leaning skin tones” — that bind to action lists, validate params against the engine’s documented schemas, and stream progress through MCP. Anything that supports MCP gains a real photo editor.

The honest version of those three projects is also “none of this is a runaway, all of it depends on the project’s roadmap landing.” Which is fine — it’s the right ceiling for an open-core photo editor at the inflection I’m describing.

The repo is at storytold/photocraft, with sister apps artcraft (we covered it on 2026-10-09 — the design IDE for the same family), pdfcraft, wordcraft, effectcraft, and the others under the crafting umbrella. They share the same architectural discipline, the same crates/craft-libs pin-by-revision policy, and the same clean-room rules. If the registry-driven, headless-first, agent-reachable design is what you want, this is the most complete clean-room implementation you’ll find anywhere in 2026.

Aniket Karne
DevOps & AI Engineer · Amsterdam
Back to all posts
Reader correspondence

Comments

Powered by GitHub Discussions via Giscus. Sign in with GitHub to leave a comment.