You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImgBin is a TypeScript CLI for generating image assets, importing existing images into a managed library, writing searchable metadata, searching managed libraries, creating thumbnails, and running local Claude CLI image metadata analysis.
3
+
ImgBin is a TypeScript CLI for generating image assets, importing existing images into a managed library, writing searchable metadata, searching managed libraries, creating thumbnails, and running provider-routed multimodal image metadata analysis.
4
4
5
5
## Requirements
6
6
7
7
- Node.js 20+
8
8
- Access to an image generation HTTP API for `generate`
9
-
-A local `claude` CLI installation for `annotate` / `--annotate`
9
+
-One configured analysis backend for `annotate` / `--annotate`: `claude`, `codex`, or a compatible HTTP vision API
10
10
11
11
## Installation
12
12
@@ -95,8 +95,8 @@ ImgBin now matches the Azure image-generation request format that was previously
95
95
That means the current recommended setup is:
96
96
97
97
1. configure Azure image generation for output,
98
-
2. configure a local metadata-analysis model for the Claude-compatible CLI step, and
99
-
3. run `imgbin generate` directly or call it through the site wrapper.
98
+
2. configure a non-interactive multimodal analysis provider (`claude`, `codex`, or `http`), and
99
+
3. run `imgbin generate` directly or call it through the site wrapper or CI automation.
-`IMGBIN_IMAGE_API_URL` / `IMGBIN_IMAGE_API_KEY` are the preferred names.
125
145
-`AZURE_ENDPOINT` / `AZURE_API_KEY` are accepted as compatibility fallbacks.
126
146
- GPT Image is used only for image generation.
127
-
- Metadata still comes from the local Claude-compatible analysis step.
147
+
-`IMGBIN_ANALYSIS_PROVIDER` defaults to `claude` for backward compatibility when omitted.
148
+
- All three analysis backends share the same scene-aware prompt builder, validation rules, and metadata provenance fields.
128
149
129
150
## Environment Variables
130
151
@@ -137,18 +158,40 @@ Notes:
137
158
-`AZURE_ENDPOINT`: compatibility fallback for `IMGBIN_IMAGE_API_URL`
138
159
-`AZURE_API_KEY`: compatibility fallback for `IMGBIN_IMAGE_API_KEY`
139
160
140
-
### Local Claude CLI analysis
161
+
### Multimodal analysis routing
162
+
163
+
-`IMGBIN_ANALYSIS_PROVIDER`: selects `claude`, `codex`, or `http`; defaults to `claude`
164
+
-`IMGBIN_ANALYSIS_PROMPT_PATH`: optional override for the bundled default prompt file
165
+
-`IMGBIN_ANALYSIS_TIMEOUT_MS`: shared timeout fallback for analysis providers, defaults to `60000`
166
+
167
+
### Claude CLI analysis
141
168
142
169
-`IMGBIN_ANALYSIS_CLI_PATH`: optional local Claude executable path; defaults to `claude`
170
+
-`IMGBIN_CLAUDE_CLI_PATH`: explicit alias for the Claude executable path
143
171
-`IMGBIN_ANALYSIS_API_MODEL`: preferred model identifier for ImgBin's local Claude analysis
172
+
-`IMGBIN_CLAUDE_MODEL`: explicit alias for the Claude model identifier
144
173
-`ANTHROPIC_MODEL`: fallback shared Claude model identifier used when `IMGBIN_ANALYSIS_API_MODEL` is not set
145
-
-`IMGBIN_ANALYSIS_TIMEOUT_MS`: optional timeout override for the local Claude process, defaults to `60000`
146
-
-`IMGBIN_ANALYSIS_PROMPT_PATH`: optional override for the bundled default prompt file
174
+
-`IMGBIN_CLAUDE_TIMEOUT_MS`: optional timeout override for the local Claude process
147
175
148
176
If `IMGBIN_ANALYSIS_PROMPT_PATH` is not set, ImgBin falls back to `prompts/default-analysis-prompt.txt`.
149
177
If `IMGBIN_ANALYSIS_API_MODEL` is empty, ImgBin falls back to `ANTHROPIC_MODEL`.
150
178
151
-
ImgBin also adds a runtime filename-guidance block to every Claude analysis request. Imported assets prefer the original source filename, generated assets fall back to the managed slug, and placeholder names such as `original.png` or `asset` are ignored. The filename is treated as a soft scene hint only; visible image evidence still wins when they disagree.
179
+
### Codex CLI analysis
180
+
181
+
-`IMGBIN_CODEX_CLI_PATH`: optional Codex executable path; defaults to `codex`
182
+
-`IMGBIN_CODEX_MODEL`: optional Codex model identifier
183
+
-`IMGBIN_CODEX_TIMEOUT_MS`: optional timeout override for the Codex process
184
+
-`IMGBIN_CODEX_BASE_URL`: optional base URL override forwarded as `OPENAI_BASE_URL`
185
+
-`IMGBIN_CODEX_API_KEY`: optional API key override forwarded as `CODEX_API_KEY`
186
+
187
+
### HTTP vision analysis
188
+
189
+
-`IMGBIN_VISION_API_URL`: required when `IMGBIN_ANALYSIS_PROVIDER=http`
190
+
-`IMGBIN_VISION_API_KEY`: optional bearer token for the HTTP vision API
191
+
-`IMGBIN_VISION_API_MODEL`: optional model identifier stored in metadata
192
+
-`IMGBIN_VISION_API_TIMEOUT_MS`: optional timeout override for the HTTP vision API
193
+
194
+
ImgBin appends runtime scene profiles and filename guidance to every CLI-based analysis request. Imported assets prefer the original source filename, generated assets fall back to the managed slug, and placeholder names such as `original.png` or `asset` are ignored. The filename remains a soft hint only; visible image evidence still wins when they disagree.
152
195
153
196
### General runtime
154
197
@@ -159,21 +202,23 @@ ImgBin also adds a runtime filename-guidance block to every Claude analysis requ
159
202
160
203
## Unified workflows
161
204
162
-
### Generate one image with Azure + metadata analysis
205
+
### Generate one image with Azure + multimodal metadata analysis
163
206
164
207
```bash
165
208
imgbin generate \
166
209
--prompt "A cheerful hand-drawn hero illustration of an AI coding assistant helping a developer at a desk." \
167
210
--output ./library \
211
+
--analysis-context "This is a documentation hero illustration with a desk scene and AI assistant visual motif." \
168
212
--annotate
169
213
```
170
214
171
215
What happens:
172
216
173
217
1. ImgBin sends an Azure-style image request,
174
218
2. writes the generated file into a managed asset directory,
175
-
3. runs the local Claude-compatible metadata analysis step, and
176
-
4. stores structured metadata in `metadata.json`.
219
+
3. routes multimodal analysis through the configured provider,
220
+
4. validates the returned JSON before accepting it, and
221
+
5. stores structured metadata plus provider provenance in `metadata.json`.
177
222
178
223
### Generate from raw prompt text
179
224
@@ -183,6 +228,7 @@ imgbin generate \
183
228
--output ./library \
184
229
--tag dashboard \
185
230
--tag hero \
231
+
--analysis-context "This is a docs hero image that mixes product-dashboard cues with illustration styling." \
--analysis-context "This is a product dashboard screenshot used in docs." \
255
+
--overwrite
207
256
```
208
257
209
-
This is useful after changing `IMGBIN_ANALYSIS_API_MODEL` or updating the analysis prompt.
258
+
This is useful after changing the configured analysis provider, model, or prompt.
210
259
211
260
### Filename-guided analysis
212
261
213
-
ImgBin now enriches Claude metadata analysis with a lightweight filename hint:
262
+
ImgBin now enriches multimodal metadata analysis with a lightweight filename hint:
214
263
215
264
- imported assets prefer the source filename from `source.originalPath`,
216
265
- generated assets fall back to the managed asset slug or directory name, and
217
266
- placeholder names such as `original.jpg` or `asset` are skipped automatically.
218
267
219
268
This guidance is appended at runtime, so it applies to both the bundled default prompt and any `--analysis-prompt` override. Treat it as a soft hint: if the filename conflicts with the image itself, the visible image content should take precedence.
--analysis-context "This is a product dashboard screenshot used for launch documentation." \
319
+
--overwrite
320
+
```
321
+
322
+
### Add custom analysis context for tricky screenshots
323
+
324
+
Image recognition now requires analysis context. Pass a short project-aware hint so ImgBin can classify tricky screenshots more accurately while still prioritizing visible image evidence.
`annotate`, `generate --annotate`, and any batch job that performs recognition must provide either `--analysis-context` or `--analysis-context-file` (or the manifest equivalents `analysisContext` / `analysisContextFile`).
341
+
246
342
### Generate or refresh a thumbnail
247
343
248
344
```bash
@@ -295,10 +391,14 @@ ImgBin stores the reusable search index at `.imgbin/search-index.json` under the
Copy file name to clipboardExpand all lines: prompts/default-analysis-prompt.txt
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
You are a Claude-compatible image metadata analyst.
1
+
You are a multimodal image metadata analyst.
2
2
Analyze the provided image and return strict JSON with this shape:
3
3
{
4
4
"title": "short human-friendly title",
@@ -11,5 +11,9 @@ Rules:
11
11
- Use 2 to 8 lowercase kebab-case tags.
12
12
- Keep the title under 80 characters.
13
13
- Keep the description under 200 characters.
14
-
- Filenames may be provided as auxiliary scene clues, but visible image evidence always takes precedence.
14
+
- Ground every claim in visible image evidence first. Filenames, paths, slugs, prompts, and scene hints are only auxiliary clues.
15
+
- If visible image evidence conflicts with filenames or prompt hints, trust the image.
16
+
- For UI, admin dashboards, wireframes, product screenshots, game editors, and other interface-heavy images, prioritize layout, panels, controls, charts, forms, menus, and page purpose.
17
+
- Do not hallucinate specific characters, skins, franchises, or IP names for UI-first screenshots unless that text or branding is directly visible in the image itself.
18
+
- For mixed illustration plus interface scenes, preserve both semantics in the title, tags, and description.
15
19
- Do not include markdown fences or extra commentary.
0 commit comments