@fleox/agentphoto 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +177 -72
- package/changelog.json +18 -0
- package/dist/agent/agentphoto.mjs +64 -17
- package/dist/agent/chunks/{assets-CDQo3VqD.mjs → assets-BZVUUHjg.mjs} +3 -3
- package/dist/agent/chunks/{context-DoLoLF9f.mjs → context-CNpRboiC.mjs} +1 -1
- package/dist/agent/chunks/{doc-BjY_j4Su.mjs → doc-D_v_yE07.mjs} +25 -286
- package/dist/agent/chunks/{export-CLmpFART.mjs → export-aNJcPNbJ.mjs} +1 -1
- package/dist/agent/chunks/geometry-BKIhUO9x.mjs +315 -0
- package/dist/agent/chunks/{models-C4i_hicr.mjs → models-CxrjmA0W.mjs} +1 -1
- package/dist/agent/chunks/{package-DSmAxrla.mjs → package-Cu1GyvKL.mjs} +2 -2
- package/dist/agent/chunks/{project-CUykGysG.mjs → project-o1DH2nOw.mjs} +12 -10
- package/dist/agent/chunks/{templates--YGpGuHh.mjs → templates-BJ2me4XZ.mjs} +24 -3
- package/dist/agent/chunks/{tools-Dnh8g6F9.mjs → tools-DKaAPEV5.mjs} +92 -27
- package/dist/agent/chunks/{tree-DO7N0UDV.mjs → tree-D8qZKPAb.mjs} +2 -2
- package/dist/engine/agentphoto-engine.js +408 -352
- package/dist/studio/assets/index-CmOzzoXv.css +1 -0
- package/dist/studio/assets/index-D3Iw5q8v.js +28 -0
- package/dist/studio/assets/{transformers.web-DgnCIB_X.js → transformers.web-osEqoMhg.js} +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/studio/templates/index.json +1 -1
- package/dist/studio/templates/product-white/photo.json +2 -2
- package/dist/studio/templates/product-white/preview.jpg +0 -0
- package/dist/studio/templates/product-white/template.json +1 -1
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/skills/agentphoto-cutout/SKILL.md +30 -25
- package/plugin/skills/agentphoto-design/SKILL.md +24 -24
- package/plugin/skills/agentphoto-publish/SKILL.md +10 -10
- package/plugin/skills/agentphoto-retouch/SKILL.md +26 -26
- package/plugin/skills/agentphoto-retouch/references/filters.md +1 -1
- package/plugin/skills/agentphoto-retouch/references/patch-ops.md +14 -13
- package/plugin/skills/agentphoto-retouch/references/recipes.md +3 -3
- package/templates/product-white/photo.json +2 -2
- package/templates/product-white/preview.jpg +0 -0
- package/templates/product-white/template.json +1 -1
- package/dist/studio/assets/index-Be8JnaFy.js +0 -28
- package/dist/studio/assets/index-DwPms2S5.css +0 -1
package/README.md
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/logo.png" width="160" height="160" alt="AgentPhoto">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
<h1 align="center">AgentPhoto</h1>
|
|
2
6
|
|
|
3
7
|
<p align="center">
|
|
4
8
|
<strong>The photo studio your AI agent can run.</strong><br>
|
|
5
9
|
Retouching, background removal, masks, looks, text and social formats, as a non-destructive document.<br>
|
|
6
|
-
Everything runs on your computer: no server, no account,
|
|
10
|
+
Everything runs on your computer: no server, no account, nothing that phones home.
|
|
7
11
|
</p>
|
|
8
12
|
|
|
9
13
|
<p align="center">
|
|
10
14
|
<a href="https://www.npmjs.com/package/@fleox/agentphoto"><img src="https://img.shields.io/npm/v/@fleox/agentphoto?color=3d6bff&label=npm" alt="npm version"></a>
|
|
15
|
+
<a href="https://github.com/fleox/agentphoto/actions/workflows/ci.yml"><img src="https://github.com/fleox/agentphoto/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
11
16
|
<a href="https://www.npmjs.com/package/@fleox/agentphoto"><img src="https://img.shields.io/node/v/@fleox/agentphoto?color=339933" alt="Node.js version"></a>
|
|
12
17
|
<a href="#claude-code"><img src="https://img.shields.io/badge/Claude%20Code-plugin-d97757" alt="Claude Code plugin"></a>
|
|
13
18
|
<a href="#mcp-server"><img src="https://img.shields.io/badge/MCP-server-0ea5e9" alt="MCP server"></a>
|
|
@@ -16,17 +21,22 @@
|
|
|
16
21
|
|
|
17
22
|
<p align="center">
|
|
18
23
|
<a href="#quick-start">Quick start</a> ·
|
|
19
|
-
<a href="#
|
|
20
|
-
<a href="#examples">Examples</a> ·
|
|
21
|
-
<a href="#how-it-works">How it works</a> ·
|
|
24
|
+
<a href="#features">Features</a> ·
|
|
22
25
|
<a href="#the-studio">Studio</a> ·
|
|
26
|
+
<a href="#templates">Templates</a> ·
|
|
27
|
+
<a href="#how-it-works">How it works</a> ·
|
|
28
|
+
<a href="#the-agentphoto-cli">CLI</a> ·
|
|
29
|
+
<a href="#mcp-server">MCP</a> ·
|
|
23
30
|
<a href="#privacy">Privacy</a> ·
|
|
24
|
-
<a href="https://github.com/fleox/agentphoto/blob/main/docs/README.md">Docs</a>
|
|
31
|
+
<a href="https://github.com/fleox/agentphoto/blob/main/docs/README.md">Docs</a> ·
|
|
32
|
+
<a href="https://github.com/fleox/agentphoto/blob/main/changelog.json">Changelog</a>
|
|
25
33
|
</p>
|
|
26
34
|
|
|
27
35
|
<p align="center">
|
|
28
|
-
<
|
|
29
|
-
|
|
36
|
+
<a href="https://cdn.jsdelivr.net/gh/fleox/agentphoto@main/.github/assets/agentphoto-demo.mp4">
|
|
37
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/video-poster.jpg" width="900" alt="Watch the demo: real Claude Code sessions retouch a photo, make a product packshot on white and design a YouTube thumbnail, then templates, the Studio and the export">
|
|
38
|
+
</a>
|
|
39
|
+
<br><sub>▶️ <a href="https://cdn.jsdelivr.net/gh/fleox/agentphoto@main/.github/assets/agentphoto-demo.mp4">Watch the demo</a> (2 min 10 s): three real Claude Code sessions (a photo retouch, a product cut-out on white, a YouTube thumbnail; the agent's work sped up, labelled on screen), then templates, the Studio and the export.</sub>
|
|
30
40
|
</p>
|
|
31
41
|
|
|
32
42
|
---
|
|
@@ -36,16 +46,16 @@
|
|
|
36
46
|
<table>
|
|
37
47
|
<tr>
|
|
38
48
|
<td width="33%" valign="top">
|
|
39
|
-
<h3
|
|
40
|
-
<p>
|
|
49
|
+
<h3>🎛️ A real photo editor</h3>
|
|
50
|
+
<p>28 filters (levels, curves, white balance, shadows / highlights, clarity, surface blur…), 20 looks, adjustment layers, 16 blend modes, masks, layer effects, text in 15 bundled fonts, shapes and gradients. <b>Non-destructive</b>: every edit is a layer you can change later, and your original is never touched.</p>
|
|
41
51
|
</td>
|
|
42
52
|
<td width="33%" valign="top">
|
|
43
|
-
<h3
|
|
44
|
-
<p>
|
|
53
|
+
<h3>🤖 Agent-native</h3>
|
|
54
|
+
<p>A picture is one JSON document, validated with "did you mean" hints and edited with small atomic patches. The agent <b>renders it headless</b> in your own Chrome, <b>looks at the image</b>, fixes what it sees and runs <code>check</code> before exporting. Every action is a CLI command with JSON output, an MCP tool and a Studio action.</p>
|
|
45
55
|
</td>
|
|
46
56
|
<td width="33%" valign="top">
|
|
47
|
-
<h3>🔒
|
|
48
|
-
<p>Background removal and Segment Anything masks run <b>
|
|
57
|
+
<h3>🔒 Local AI, no server</h3>
|
|
58
|
+
<p>Background removal and Segment Anything masks run <b>on your computer</b> (RMBG-1.4, MODNet, SlimSAM). Models download once, then everything works offline. No AgentPhoto server, account or telemetry; AgentPhoto itself uploads nothing.</p>
|
|
49
59
|
</td>
|
|
50
60
|
</tr>
|
|
51
61
|
</table>
|
|
@@ -61,7 +71,33 @@
|
|
|
61
71
|
/plugin install agentphoto@agentphoto
|
|
62
72
|
```
|
|
63
73
|
|
|
64
|
-
Then
|
|
74
|
+
Then just ask:
|
|
75
|
+
|
|
76
|
+
> *Here is a photo from my trip, lake.jpg. Make it look great: fix the light and colours, give it a warm film look, then export it for Instagram (square) and as a link preview image.*<br>
|
|
77
|
+
> *Remove the background of mug.jpg and make a clean product photo for my shop: on white, square, with a soft shadow under the mug. Export it as a 2000 px JPEG.*<br>
|
|
78
|
+
> *Make a YouTube thumbnail for my video "Lisbon on foot" with street.jpg: big bold title, readable on a phone. Then make the matching link preview image for the blog post.*
|
|
79
|
+
|
|
80
|
+
The agent opens your photo as a project, measures it, edits it with layers and filters, renders it, **looks at the result**, fixes it, runs `check` and exports the files.
|
|
81
|
+
|
|
82
|
+
<p align="center">
|
|
83
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/demo-retouch.gif" width="820" alt="A real Claude Code session: from one request, the agent measures lake.jpg, adds an adjustment layer with levels, a slight warm correction and a film look, compares before and after, then exports a square post and a link preview; it ends on the agent's own before and after renders">
|
|
84
|
+
<br><sub>A real, unedited Claude Code session. The agent's work (about 2 minutes) is sped up ×8 (labelled); typing and the answer play in real time. It ends on the agent's own before / after render.</sub>
|
|
85
|
+
</p>
|
|
86
|
+
|
|
87
|
+
Cut-outs run locally, and the agent picks the model that fits the use:
|
|
88
|
+
|
|
89
|
+
<p align="center">
|
|
90
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/demo-cutout.gif" width="820" alt="A real Claude Code session: the agent cuts the mug out with a Segment Anything box because the shop is commercial use, centres it on white with a soft contact shadow, checks the edges and exports a 2000 px JPEG; it ends on the exported packshot">
|
|
91
|
+
<br><sub>For a shop (commercial use) the agent chose Segment Anything (Apache-2.0) over the default non-commercial background remover, then centred the mug on white with a contact shadow. Sped up ×8 while the agent works (labelled).</sub>
|
|
92
|
+
</p>
|
|
93
|
+
|
|
94
|
+
<details>
|
|
95
|
+
<summary><b>And a third one: <i>"Make a YouTube thumbnail for my video…"</i></b></summary>
|
|
96
|
+
<p align="center">
|
|
97
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/demo-design.gif" width="820" alt="A real Claude Code session: the agent builds a YouTube thumbnail from the template with the street photo and a big condensed title, checks it at phone size, then makes the matching 1200x630 link preview; it ends on both images">
|
|
98
|
+
<br><sub>A thumbnail from a template, checked at the size it shows on a phone, then the matching link preview. Sped up ×16 while the agent works (labelled).</sub>
|
|
99
|
+
</p>
|
|
100
|
+
</details>
|
|
65
101
|
|
|
66
102
|
| Agent | Setup |
|
|
67
103
|
|---|---|
|
|
@@ -70,79 +106,122 @@ Then ask in your own words (see [what you can ask](#what-you-can-ask)). The agen
|
|
|
70
106
|
| **Hermes Agent** / Python agents | generated skills with a Python wrapper and helpers, see [hermes/](https://github.com/fleox/agentphoto/tree/main/hermes) |
|
|
71
107
|
| **Codex, Windsurf, any other agent** | point it at [AGENTS.md](https://github.com/fleox/agentphoto/blob/main/AGENTS.md) and the Markdown skills in [plugin/skills/](https://github.com/fleox/agentphoto/tree/main/plugin/skills) |
|
|
72
108
|
|
|
73
|
-
You need **Node.js 22+** and **Google Chrome** (or Chromium / Edge / Brave): previews, exports and the AI run in it, headless. `npx -y @fleox/agentphoto@0.1.
|
|
109
|
+
You need **Node.js 22+** and **Google Chrome** (or Chromium / Edge / Brave): previews, exports and the AI run in it, headless. `npx -y @fleox/agentphoto@0.1.1 doctor` checks your setup with a test render.
|
|
74
110
|
|
|
75
111
|
### Without an agent
|
|
76
112
|
|
|
77
113
|
```bash
|
|
78
|
-
npx -y @fleox/agentphoto@0.1.
|
|
79
|
-
npx -y @fleox/agentphoto@0.1.
|
|
114
|
+
npx -y @fleox/agentphoto@0.1.1 new trip --image ./lake.jpg
|
|
115
|
+
npx -y @fleox/agentphoto@0.1.1 studio --project trip
|
|
80
116
|
```
|
|
81
117
|
|
|
82
|
-
The first command makes a project folder from your photo; the second opens the [Studio](#the-studio) on it.
|
|
118
|
+
The first command makes a project folder from your photo (add `--template <id>` to start from one of the [templates](#templates)); the second opens the [Studio](#the-studio) on it. The whole loop from a terminal:
|
|
83
119
|
|
|
84
120
|
```bash
|
|
85
|
-
npx -y @fleox/agentphoto@0.1.
|
|
86
|
-
npx -y @fleox/agentphoto@0.1.
|
|
87
|
-
npx -y @fleox/agentphoto@0.1.
|
|
88
|
-
npx -y @fleox/agentphoto@0.1.
|
|
89
|
-
npx -y @fleox/agentphoto@0.1.
|
|
121
|
+
npx -y @fleox/agentphoto@0.1.1 analyze --project trip # brightness, range, colour cast… + suggested filters
|
|
122
|
+
npx -y @fleox/agentphoto@0.1.1 filter add photo --type shadowsHighlights --set shadows=30 --project trip
|
|
123
|
+
npx -y @fleox/agentphoto@0.1.1 remove-bg photo --background "#ffffff" --project trip
|
|
124
|
+
npx -y @fleox/agentphoto@0.1.1 render --project trip --compare # → renders/preview-before.png + preview.png
|
|
125
|
+
npx -y @fleox/agentphoto@0.1.1 export --project trip --format webp --quality 82
|
|
90
126
|
```
|
|
91
127
|
|
|
92
128
|
Step by step: [docs/getting-started.md](https://github.com/fleox/agentphoto/blob/main/docs/getting-started.md).
|
|
93
129
|
|
|
94
|
-
##
|
|
130
|
+
## Features
|
|
131
|
+
|
|
132
|
+
<table>
|
|
133
|
+
<tr>
|
|
134
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/showcase-before-after-color-correction.jpg" alt="Before and after colour correction of a burger photo: deeper blacks, a more vivid plate and vegetables"><p align="center"><b>Colour correction</b>: levels, a gentle S-curve, warmth, vibrance, sharpening</p></td>
|
|
135
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/showcase-before-after-black-and-white.jpg" alt="Before and after: a street photo turned into a contrasty black and white with grain and a vignette"><p align="center"><b>Black and white</b>: channel mix, curve, clarity, grain, vignette</p></td>
|
|
136
|
+
</tr>
|
|
137
|
+
<tr>
|
|
138
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/showcase-before-after-product-cutout.jpg" alt="Before and after: an enamel mug on a wooden table, then the same mug cut out by local AI on pure white with a soft shadow"><p align="center"><b>Product cut-out</b>: local AI background removal, white backdrop, contact shadow</p></td>
|
|
139
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/showcase-before-after-portrait-retouch.jpg" alt="Before and after crops of a portrait retouch: smoother skin that keeps its texture, open shadows, slightly warmer tones"><p align="center"><b>Portrait retouch</b>: skin selected with Segment Anything, edge-preserving smoothing, open shadows</p></td>
|
|
140
|
+
</tr>
|
|
141
|
+
<tr>
|
|
142
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/showcase-youtube-thumbnail.jpg" alt="A YouTube thumbnail: I tried it for 30 days in a bold condensed title, a yellow honest review tag, the subject cut out with a white outline on a purple to pink gradient"><p align="center"><b>YouTube thumbnail</b>: template + your photo + <code>remove-bg</code> + a stroke effect</p></td>
|
|
143
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/showcase-og-article.jpg" alt="A link preview card: a navy panel with a blog name and the headline 10 hidden streets every visitor should walk, a street photo fading in on the right"><p align="center"><b>Link preview (1200×630)</b>: a gradient mask fades the photo into the text panel</p></td>
|
|
144
|
+
</tr>
|
|
145
|
+
</table>
|
|
146
|
+
|
|
147
|
+
<p align="center">
|
|
148
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/showcase-loop.gif" width="760" alt="A loop of real AgentPhoto renders: a food colour correction wipe, a YouTube thumbnail, a mug cut-out wipe, a link preview, a black and white street wipe and a quote post">
|
|
149
|
+
<br><sub>Real renders from the published package, nothing painted over.</sub>
|
|
150
|
+
</p>
|
|
151
|
+
|
|
152
|
+
- **Retouch**: `analyze` measures brightness, range, clipping, saturation and colour cast and suggests filters; light (exposure, brightness / contrast, shadows / highlights), tone (levels, curves), colour (white balance, hue / saturation, vibrance, colour balance, photo filter, gradient map), detail (sharpen, clarity), blur (gaussian, motion, edge-preserving surface blur), stylize (vignette, noise, posterize, threshold, pixelate) and one-click auto tone / contrast / colour.
|
|
153
|
+
- **Looks**: 20 graded looks (film, cinema, golden hour, noir, matte, cross-process…) with an amount, on a layer or on everything below an adjustment layer.
|
|
154
|
+
- **Cut-outs and masks**: background removal (RMBG-1.4, MODNet), Segment Anything from points or a box (SlimSAM, SAM), colour-range masks, shape and gradient masks with feather, density and invert, clipping masks, masks painted by hand in the Studio.
|
|
155
|
+
- **Design**: text in 15 bundled fonts with real measurement and wrapping, shapes (rect, ellipse, line, polygon, star), linear and radial gradients, 5 layer effects (drop shadow, outer glow, inner shadow, stroke, colour overlay), 16 blend modes, groups, 8 templates and 13 size presets.
|
|
156
|
+
- **Geometry**: crop, straighten, resize the canvas or the whole picture, rotate and flip, without rasterising anything.
|
|
157
|
+
- **Quality**: `check` before export (missing files, layers off the canvas, upscaled photos, text that may overflow, licences to credit); exports plan before overwriting and warn when a size upscales or a crop cuts a layer.
|
|
158
|
+
- **Export**: PNG, JPEG, WebP (AVIF where the browser can encode it), quality, background, transparency, every size preset or exact width / height / scale, cover or contain, several variants in one command.
|
|
159
|
+
|
|
160
|
+
## The Studio
|
|
95
161
|
|
|
96
|
-
|
|
97
|
-
> *This photo is too dark and a bit orange. Fix the colours, keep it natural.*<br>
|
|
98
|
-
> *Retouch my portrait for LinkedIn: smooth the skin a little, open the shadows, not too much. Then make a round avatar.*<br>
|
|
99
|
-
> *Make a YouTube thumbnail from `me.jpg`: "I tried it for 30 days", cut me out with a white outline, bold colours.*<br>
|
|
100
|
-
> *Turn this landscape into an Instagram post with the caption "Slow mornings at the lake", a story version too.*<br>
|
|
101
|
-
> *Give it a film look, then a black and white version with grain. Show me both.*<br>
|
|
102
|
-
> *Blur the background behind my cat.*<br>
|
|
103
|
-
> *Export it as WebP under 150 KB for my blog, and an Open Graph image.*
|
|
162
|
+
A visual editor for when you want to see and touch the picture yourself, on the same files and with the same validated tools as the agent. Changes your agent makes in a terminal appear live in the open Studio.
|
|
104
163
|
|
|
105
|
-
|
|
164
|
+
```bash
|
|
165
|
+
npx -y @fleox/agentphoto@0.1.1 studio --project trip
|
|
166
|
+
```
|
|
106
167
|
|
|
107
|
-
|
|
168
|
+
<p align="center">
|
|
169
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/studio-editor.jpg" width="900" alt="The AgentPhoto Studio: a YouTube thumbnail on the canvas with the cut-out subject selected, the layers panel and the inspector with transform, image fit and mask settings">
|
|
170
|
+
</p>
|
|
108
171
|
|
|
109
172
|
<table>
|
|
110
173
|
<tr>
|
|
111
|
-
<td width="50%"
|
|
112
|
-
<td width="50%"
|
|
174
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/studio-filters.jpg" alt="The Studio's Filters tab on an adjustment layer: levels, curves, white balance and vibrance, with the RGB curve editor open"><p align="center"><b>Filters</b>: every filter with its sliders, a curve editor, drag to reorder</p></td>
|
|
175
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/studio-looks.jpg" alt="The Studio's Looks tab: a grid of look thumbnails rendered from the photo, Warm applied, with an intensity slider"><p align="center"><b>Looks</b>: thumbnails rendered from your photo, one click, an intensity slider</p></td>
|
|
176
|
+
</tr>
|
|
177
|
+
<tr>
|
|
178
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/studio-ai-select.jpg" alt="Quick AI select in the Studio: one click on the cat gives a green Segment Anything selection with Apply and Reset"><p align="center"><b>Quick AI select</b>: click the subject, Segment Anything selects it, locally</p></td>
|
|
179
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/studio-masks.jpg" alt="The Studio with a mug cut out on white: mask thumbnails in the layers panel and the inspector's mask section with feather, density and Paint the mask"><p align="center"><b>Masks</b>: AI cut-outs you can refine, feather, invert or paint by hand</p></td>
|
|
113
180
|
</tr>
|
|
114
181
|
<tr>
|
|
115
|
-
<td width="50%"
|
|
116
|
-
<td width="50%"
|
|
182
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/studio-export.jpg" alt="The Studio's Export dialog: a live preview, PNG JPG WebP AVIF, size, transparency, file name and quick exports og, square and story"><p align="center"><b>Export</b>: live preview with the real file size, quick social sizes</p></td>
|
|
183
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/studio-start.jpg" alt="The Studio's start screen: open a photo, six sample photos, the template gallery and recent projects"><p align="center"><b>Start</b>: open a photo, a sample, a template or a recent project</p></td>
|
|
117
184
|
</tr>
|
|
118
185
|
</table>
|
|
119
186
|
|
|
120
|
-
|
|
187
|
+
Canvas with move / transform, crop, brush, eraser, clone stamp, marquee, lasso, magic wand, quick AI select, text, shape and eyedropper tools; layers panel; inspector (properties, filters with a curve editor, looks, layer effects, masks); AI cut-out in the page; export dialog; templates gallery; undo / redo; in English or French. An optional assistant panel calls the Claude API from your browser with your own key, over the same tools. Without `agentphoto studio`, the same Studio also works from a static build with projects stored in the browser. See [docs/studio.md](https://github.com/fleox/agentphoto/blob/main/docs/studio.md).
|
|
188
|
+
|
|
189
|
+
## Templates
|
|
121
190
|
|
|
122
|
-
|
|
191
|
+
<p align="center">
|
|
192
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/templates-grid.jpg" width="900" alt="The 8 AgentPhoto templates, each a real export with a bundled sample photo: YouTube thumbnail, article link preview, quote post, professional avatar, sale banner, story promo, polaroid memory and product on white">
|
|
193
|
+
</p>
|
|
194
|
+
|
|
195
|
+
`agentphoto new my-post --template <id> --image ./photo.jpg` puts your photo into the template's slot, with its framing, filters and effects; `templates list` and `templates show <id>` describe them. Everything stays editable: a template is an ordinary `photo.json`.
|
|
196
|
+
|
|
197
|
+
<details>
|
|
198
|
+
<summary><b>All 8 templates</b></summary>
|
|
199
|
+
|
|
200
|
+
| | Template | Size | What it is |
|
|
123
201
|
|---|---|---|---|
|
|
124
|
-
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/youtube-thumbnail/preview.jpg" width="
|
|
125
|
-
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/
|
|
202
|
+
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/youtube-thumbnail/preview.jpg" width="160" alt="YouTube thumbnail template"> | **YouTube thumbnail**<br>`youtube-thumbnail` | 1280×720 | Bold 16:9 thumbnail: big condensed title, subject with a white outline, punchy gradient |
|
|
203
|
+
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/og-article/preview.jpg" width="160" alt="Article link preview template"> | **Article link preview**<br>`og-article` | 1200×630 | Open Graph card: photo on the right fading into a solid panel, headline and site name on the left |
|
|
204
|
+
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/social-quote/preview.jpg" width="160" alt="Quote post template"> | **Quote post**<br>`social-quote` | 1080×1080 | Square post: photo in the background, darkened and softened, with a serif quote and author |
|
|
205
|
+
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/story-promo/preview.jpg" width="160" alt="Story promo template"> | **Story promo**<br>`story-promo` | 1080×1920 | 9:16 story / reel cover: full-bleed photo, dark gradient, big title and a call-to-action pill |
|
|
206
|
+
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/sale-banner/preview.jpg" width="160" alt="Sale banner template"> | **Sale banner**<br>`sale-banner` | 1920×600 | Wide web hero banner: gradient background, photo fading in, big discount and a starburst badge |
|
|
207
|
+
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/polaroid/preview.jpg" width="160" alt="Polaroid template"> | **Polaroid memory**<br>`polaroid` | 1080×1350 | Instant-photo card tilted on warm paper, vintage look and a handwritten caption |
|
|
208
|
+
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/avatar-pro/preview.jpg" width="160" alt="Professional avatar template"> | **Professional avatar**<br>`avatar-pro` | 800×800 | Round profile picture: subject cut out on a soft brand-colour backdrop, gently retouched |
|
|
209
|
+
| <img src="https://raw.githubusercontent.com/fleox/agentphoto/main/templates/product-white/preview.jpg" width="160" alt="Product on white template"> | **Product on white**<br>`product-white` | 2000×2000 | E-commerce square: product cut out, centred on a soft white backdrop with a contact shadow |
|
|
126
210
|
|
|
127
|
-
|
|
211
|
+
</details>
|
|
128
212
|
|
|
129
213
|
## How it works
|
|
130
214
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
project folder: photo.json · assets/ (images, masks) · renders/ · dist/
|
|
138
|
-
│
|
|
139
|
-
src/engine — compositor, filters, looks, text, effects, local AI
|
|
140
|
-
in your own Chrome (headless) or the Studio page
|
|
141
|
-
```
|
|
215
|
+
<p align="center">
|
|
216
|
+
<picture>
|
|
217
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/how-it-works-dark.png">
|
|
218
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/how-it-works-light.png" width="900" alt="You, in any browser, and your AI agent (Claude Code, Claude, Hermes, any MCP client) use four front doors: the Studio, the Studio assistant, the agentphoto CLI and the MCP server. All of them call one engine (document ops: validate, patch, render, export) with a compositor and local AI, rendered headless in your own Chrome so the agent looks at its work. The output is ordinary image files: PNG, JPEG, WebP, AVIF, social sizes and transparent cut-outs. Built in and offline: 15 fonts, 6 CC0 photos, 8 templates, 13 size presets. No server of ours.">
|
|
219
|
+
</picture>
|
|
220
|
+
</p>
|
|
142
221
|
|
|
143
|
-
All the rules live in one engine. The Studio, the CLI, the MCP server and the Studio assistant are four front doors to it, so an agent can do exactly what you can do in the editor, with the same validation.
|
|
222
|
+
All the rules live in one engine. The Studio, the CLI, the MCP server and the Studio assistant are four front doors to it, so an agent can do exactly what you can do in the editor, with the same validation. The engine works on a plain **project folder** (`photo.json`, `assets/`, `renders/`, `dist/`), which you can keep in git.
|
|
144
223
|
|
|
145
|
-
A picture is **data**: `photo.json` lists layers bottom to top (image, text, shape, fill, adjustment, group), each with its box, opacity, blend mode, mask, filters and effects. The render is a pure function of (document, files, fonts). That is what makes the loop work: the agent patches the JSON, `render` composites it in headless Chrome and writes a PNG, the agent **looks** at it, fixes, runs `check`
|
|
224
|
+
A picture is **data**: `photo.json` lists layers bottom to top (image, text, shape, fill, adjustment, group), each with its box, opacity, blend mode, mask, filters and effects. The render is a pure function of (document, files, fonts). That is what makes the loop work: the agent patches the JSON, `render` composites it in your headless Chrome and writes a PNG, the agent **looks** at it, fixes, runs `check` and exports. Nothing is ever baked: every filter, mask and cut-out can be changed or removed later. Details: [architecture](https://github.com/fleox/agentphoto/blob/main/docs/architecture.md) and the [document format](https://github.com/fleox/agentphoto/blob/main/docs/document-format.md).
|
|
146
225
|
|
|
147
226
|
```json
|
|
148
227
|
{ "id": "correct", "type": "adjustment", "filters": [
|
|
@@ -152,21 +231,38 @@ A picture is **data**: `photo.json` lists layers bottom to top (image, text, sha
|
|
|
152
231
|
] }
|
|
153
232
|
```
|
|
154
233
|
|
|
155
|
-
##
|
|
234
|
+
## How AgentPhoto compares
|
|
156
235
|
|
|
157
|
-
|
|
236
|
+
| | AgentPhoto | A desktop or web photo editor | An online background remover | A web design tool with templates |
|
|
237
|
+
|---|---|---|---|---|
|
|
238
|
+
| What it is for | photo retouching, cut-outs and visuals | retouching anything by hand | one cut-out at a time | designs from templates |
|
|
239
|
+
| How it is driven | an AI agent (CLI, MCP, skills) or the Studio | by hand | upload, then download | by hand in the browser |
|
|
240
|
+
| Account or hosted service | ❌ none | depends on the editor | an account / credits, often | an account |
|
|
241
|
+
| Your photo leaves your computer | ❌ no (AgentPhoto uploads nothing) | depends | ✅ uploaded | ✅ uploaded |
|
|
242
|
+
| AI agent loop (edit, render, look, check) | ✅ | — | — | — |
|
|
243
|
+
| Non-destructive layers, masks, filters | ✅ in a JSON file | ✅ in its own format | ❌ | partial |
|
|
244
|
+
| Exports at every social size in one command | ✅ `--variants` | by hand | ❌ | ✅ by hand |
|
|
158
245
|
|
|
159
|
-
|
|
160
|
-
npx -y @fleox/agentphoto@0.1.0 studio --project trip
|
|
161
|
-
```
|
|
246
|
+
Pick a desktop editor for pixel-level manual work on large files, an online remover for a single quick cut-out, and a web design tool when a team designs together in the browser. AgentPhoto fits when an agent should do and verify the edit, the photos must stay on your computer, and the result must stay editable.
|
|
162
247
|
|
|
163
|
-
|
|
248
|
+
## The `agentphoto` CLI
|
|
164
249
|
|
|
165
|
-
|
|
250
|
+
The same engine the agents use, by hand. Every command accepts `--json` and prints exactly one `{ ok, data }` or `{ ok: false, error }` object with an actionable hint; commands that remove or overwrite something print a plan until you add `--yes`.
|
|
166
251
|
|
|
167
|
-
|
|
252
|
+
<p align="center">
|
|
253
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/demo-cli.gif" width="820" alt="Terminal demo: agentphoto new from a lake photo, analyze piped to jq showing brightness, contrast, cast and suggestions, an adjustment layer with the suggested filters, a golden-hour look, layer list and check">
|
|
254
|
+
<br><sub>A project from a photo, <code>analyze</code>, an adjustment layer with its suggestions, a look, <code>check</code>. The published CLI, real output.</sub>
|
|
255
|
+
</p>
|
|
168
256
|
|
|
169
|
-
|
|
257
|
+
<table>
|
|
258
|
+
<tr>
|
|
259
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/demo-render.gif" alt="Terminal demo: render --compare writes a before and an after preview, then analyze shows the colour cast reduced; it ends on the before and after images"><p align="center"><code>render --compare</code>: the before / after the agent looks at</p></td>
|
|
260
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/demo-export.gif" alt="Terminal demo: check, then export with og, square and story variants, a needsConfirmation plan when re-exporting over the files, then --yes; it ends on the three exported images"><p align="center"><code>export --variants</code>: three sizes, a plan before overwriting</p></td>
|
|
261
|
+
</tr>
|
|
262
|
+
</table>
|
|
263
|
+
|
|
264
|
+
<details>
|
|
265
|
+
<summary><b>All commands</b></summary>
|
|
170
266
|
|
|
171
267
|
| Area | Commands |
|
|
172
268
|
|---|---|
|
|
@@ -179,19 +275,27 @@ The same engine the agents use, by hand: `npx -y @fleox/agentphoto@0.1.0 help`.
|
|
|
179
275
|
|
|
180
276
|
Full reference: [docs/cli.md](https://github.com/fleox/agentphoto/blob/main/docs/cli.md).
|
|
181
277
|
|
|
278
|
+
</details>
|
|
279
|
+
|
|
182
280
|
## MCP server
|
|
183
281
|
|
|
184
282
|
```bash
|
|
185
|
-
claude mcp add agentphoto -- npx -y @fleox/agentphoto@0.1.
|
|
283
|
+
claude mcp add agentphoto -- npx -y @fleox/agentphoto@0.1.1 mcp --project ~/Pictures/my-photo
|
|
186
284
|
```
|
|
187
285
|
|
|
188
|
-
|
|
286
|
+
<p align="center">
|
|
287
|
+
<img src="https://raw.githubusercontent.com/fleox/agentphoto/main/.github/assets/demo-mcp.gif" width="820" alt="Terminal demo: a raw JSON-RPC session piped into agentphoto mcp: initialize, tools/list with 26 tools, tools/call render_preview returning a text block and an image block; it ends on the returned link preview image">
|
|
288
|
+
<br><sub>A raw MCP session: <code>render_preview</code> answers with the picture itself, so multimodal models see their work.</sub>
|
|
289
|
+
</p>
|
|
290
|
+
|
|
291
|
+
**Tools** are the shared AI catalog: project info and creation, document summary / get / patch / apply / validate, layers, filters, masks, `remove_background`, `mask_generate`, `image_analyze`, catalog and templates lookups, assets, `check` and `export`, plus **`render_preview`**, which returns the render as an **image**. **Resources**: `photo://doc`, `photo://summary`, `photo://catalog`. `--read-only` hides every tool that writes. Claude Desktop, Cursor and Hermes configuration: [docs/mcp.md](https://github.com/fleox/agentphoto/blob/main/docs/mcp.md).
|
|
189
292
|
|
|
190
293
|
## Privacy
|
|
191
294
|
|
|
192
295
|
- **Local.** Projects are folders on your disk; editing, previews, analysis, AI and exports run on your computer, in Node.js and your own browser engine.
|
|
193
|
-
- **
|
|
194
|
-
- **Nothing else phones home.** No account, no telemetry, no update check, no CDN, no web fonts. The only other network uses are importing an image from a URL you give, and the optional Studio assistant (your own Claude API key, to `api.anthropic.com
|
|
296
|
+
- **AgentPhoto uploads nothing.** The AI models come to the photos: they download **once** from Hugging Face into `~/.cache/agentphoto/models` and then run offline.
|
|
297
|
+
- **Nothing else phones home.** No account, no telemetry, no update check, no CDN, no web fonts. The only other network uses are importing an image from a URL you give, and the optional Studio assistant (your own Claude API key, to `api.anthropic.com`; it sends the previews its tools render).
|
|
298
|
+
- **Your agent is yours.** An agent you connect (Claude Code, an MCP client) receives the renders it asks for and handles them under its own settings.
|
|
195
299
|
- **Non-destructive.** Source files are copied, never modified; AI masks are new files.
|
|
196
300
|
|
|
197
301
|
Details: [docs/security.md](https://github.com/fleox/agentphoto/blob/main/docs/security.md).
|
|
@@ -205,12 +309,13 @@ Details: [docs/security.md](https://github.com/fleox/agentphoto/blob/main/docs/s
|
|
|
205
309
|
| [Document format](https://github.com/fleox/agentphoto/blob/main/docs/document-format.md) · [Catalog](https://github.com/fleox/agentphoto/blob/main/docs/catalog.md) | `photo.json` field by field; every filter, look, effect, font and size preset |
|
|
206
310
|
| [Studio](https://github.com/fleox/agentphoto/blob/main/docs/studio.md) · [Studio API](https://github.com/fleox/agentphoto/blob/main/docs/studio-api.md) | The visual editor; its local REST API |
|
|
207
311
|
| [CLI](https://github.com/fleox/agentphoto/blob/main/docs/cli.md) · [MCP](https://github.com/fleox/agentphoto/blob/main/docs/mcp.md) | Every command; MCP clients |
|
|
312
|
+
| [Hermes Agent](https://github.com/fleox/agentphoto/tree/main/hermes) | Skills and Python helpers for Hermes and Python agents |
|
|
208
313
|
| [Architecture](https://github.com/fleox/agentphoto/blob/main/docs/architecture.md) · [Security and privacy](https://github.com/fleox/agentphoto/blob/main/docs/security.md) | The engine and the render loop; what touches the network |
|
|
209
|
-
| [AGENTS.md](https://github.com/fleox/agentphoto/blob/main/AGENTS.md) | Instructions for AI agents working on this repository |
|
|
314
|
+
| [AGENTS.md](https://github.com/fleox/agentphoto/blob/main/AGENTS.md) · [Releasing](https://github.com/fleox/agentphoto/blob/main/docs/releasing.md) | Instructions for AI agents working on this repository; how versions are published |
|
|
210
315
|
|
|
211
316
|
## Contributing
|
|
212
317
|
|
|
213
|
-
Bug reports and ideas are welcome: [open an issue](https://github.com/fleox/agentphoto/issues).
|
|
318
|
+
Bug reports and ideas are welcome: [open an issue](https://github.com/fleox/agentphoto/issues). See [CONTRIBUTING.md](https://github.com/fleox/agentphoto/blob/main/CONTRIBUTING.md) and, for security reports, [SECURITY.md](https://github.com/fleox/agentphoto/blob/main/SECURITY.md).
|
|
214
319
|
|
|
215
320
|
```bash
|
|
216
321
|
npm install
|
|
@@ -221,7 +326,7 @@ npm run build # engine + Studio + CLI
|
|
|
221
326
|
|
|
222
327
|
## License
|
|
223
328
|
|
|
224
|
-
Source
|
|
329
|
+
Source available under the [PolyForm Noncommercial License 1.0.0](https://github.com/fleox/agentphoto/blob/main/LICENSE). Personal, hobbyist, educational, research and other noncommercial use is free, and you can fork, modify and redistribute under the same terms.
|
|
225
330
|
|
|
226
331
|
**Commercial use requires written authorization.** This includes selling the software or hosting it as a paid service. For a commercial license, [open an issue](https://github.com/fleox/agentphoto/issues).
|
|
227
332
|
|
package/changelog.json
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"versions": [
|
|
3
|
+
{
|
|
4
|
+
"version": "0.1.1",
|
|
5
|
+
"date": "2026-11-24",
|
|
6
|
+
"breaking": false,
|
|
7
|
+
"changes": [
|
|
8
|
+
"Blur on text and shape layers now spreads beyond the layer's box: soft floor shadows (product-white template) and glows.",
|
|
9
|
+
"New patch op fitLayer, and remove-bg --fit / --anchor: place a cut-out subject in a box; the product-white template does it automatically on the first cut-out.",
|
|
10
|
+
"Radial gradients are elliptical on non-square boxes (square boxes unchanged).",
|
|
11
|
+
"Export notes about cover crops judge text by its visible glyphs, not its box.",
|
|
12
|
+
"layer list shows the filters of adjustment layers; CLI hints show project paths as you typed them; --set text=2026 keeps the text a string.",
|
|
13
|
+
"Studio: no download dialog for AI models the CLI already cached, whole template thumbnails on the start screen, clearer AI buttons in the mask section.",
|
|
14
|
+
"Templates copy only the files their document uses.",
|
|
15
|
+
"Docs: exact wording on what leaves your computer; new README with a demo film, real Claude Code sessions and terminal demos; Hermes Agent skills; CI and release workflows."
|
|
16
|
+
],
|
|
17
|
+
"actions": [
|
|
18
|
+
"Claude Code: /plugin marketplace update agentphoto, then /reload-plugins. MCP configs: update the pinned version in args."
|
|
19
|
+
]
|
|
20
|
+
},
|
|
3
21
|
{
|
|
4
22
|
"version": "0.1.0",
|
|
5
23
|
"date": "2026-11-23",
|