Image & Graphic Design Matrix (S5 — v2 capability-based)
Scenario S5. Deepest creation coverage after S2 — raster (GIMP + Krita), vector (Inkscape), AI (ComfyUI + Jimeng + 7 APIs), diagram (drawio + mermaid). Figma is the headline gap (also affects S7).
Schema: docs/cli-matrix/matrix_registry.schema.md. Matrix plan: docs/cli-matrix/cli-matrix-plan.md.
Install
cli-hub matrix install image-design
cli-hub matrix info image-design
cli-hub matrix preflight image-design --json
Provider selection constraints
- Use preflight as an availability report, not as a provider selector.
- Treat provider order as documentation order only.
- Choose from user requirements, output quality bar, offline needs, credential state, install cost, and provider notes.
- Escalate to paid or metered APIs only when credentials are already present or the user explicitly consents. AI image is paid-API-diverse, so ask which provider the user wants when several credentialed choices are available.
Offline context? GIMP, Krita, Inkscape, and local diffusers cover almost everything offline.
Preflight
Run cli-hub matrix preflight image-design --json first. Use the manual block below for extra probes or older cli-hub versions.
cli-hub list --json
python - <<'PY'
import importlib.util
for m in ("PIL","cv2","skimage","rembg","svgwrite","cairosvg","svgpathtools","vpype",
"diffusers","replicate","rawpy"):
print(m, importlib.util.find_spec(m) is not None)
PY
for b in inkscape gimp krita drawio magick convert exiftool upscayl darktable-cli \
rawtherapee-cli graphviz dot mermaid plantuml hugo mkdocs; do
command -v "$b" >/dev/null && echo "$b: yes" || echo "$b: no"
done
for e in OPENAI_API_KEY STABILITY_API_KEY IDEOGRAM_API_KEY RECRAFT_API_KEY \
GOOGLE_API_KEY MIDJOURNEY_TOKEN FIGMA_TOKEN CANVA_API_KEY PENPOT_TOKEN \
REPLICATE_API_TOKEN TOPAZ_API_KEY REMOVE_BG_API_KEY FIREFLY_TOKEN; do
[ -n "${!e}" ] && echo "$e: set" || echo "$e: unset"
done
Suggest-to-user template
To enable <capability> via <provider>, please set <ENV_VAR>.
Cost: <cost notes>
Quality: <quality tier>
Reply 'skip' to fall back to <next provider>.
Examples:
- To enable sota AI image generation via OpenAI GPT-Image-1, please set
OPENAI_API_KEY. Cost: metered per-image. Quality: sota for photoreal + text rendering. Reply 'skip' to fall back to local comfyui (FLUX/SDXL).
- To round-trip UI mockups with Figma, please set
FIGMA_TOKEN. Cost: free tier works for most users. Quality: sota (design system aware). Reply 'skip' to fall back to sketch or drawio wireframes.
Capabilities
visual.generate — AI image generation
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-comfyui |
harness-cli |
ComfyUI + weights |
free |
high |
yes |
jimeng |
public-cli |
dreamina bin |
metered |
high |
no |
diffusers (SD/SDXL/FLUX) |
python |
pkg + weights + GPU |
free |
good-high |
yes |
replicate |
python |
REPLICATE_API_TOKEN |
metered |
high |
no |
| OpenAI GPT-Image-1 |
api |
OPENAI_API_KEY |
metered |
sota |
no |
| Ideogram |
api |
IDEOGRAM_API_KEY |
metered |
sota |
no |
| Stability AI |
api |
STABILITY_API_KEY |
metered |
high |
no |
| Recraft |
api |
RECRAFT_API_KEY |
paid |
sota |
no |
| Google Imagen / Nano Banana |
api |
GOOGLE_API_KEY |
metered |
high |
no |
| Midjourney (Discord bridge) |
api |
MIDJOURNEY_TOKEN |
paid |
sota |
no |
| Adobe Firefly |
api |
FIREFLY_TOKEN |
paid |
high |
no |
visual.edit.raster — raster editing
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-gimp |
harness-cli |
GIMP installed |
free |
sota |
yes |
cli-anything-krita |
harness-cli |
Krita installed |
free |
sota |
yes |
Pillow |
python |
pkg |
free |
good |
yes |
opencv-python |
python |
pkg |
free |
high |
yes |
scikit-image |
python |
pkg |
free |
high |
yes |
rembg (background removal) |
python |
pkg |
free |
high |
yes |
remove.bg |
api |
REMOVE_BG_API_KEY |
metered |
sota |
no |
| Adobe Firefly |
api |
FIREFLY_TOKEN |
paid |
sota |
no |
| Cutout.pro |
api |
token |
metered |
high |
no |
visual.edit.vector — vector editing
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-inkscape |
harness-cli |
Inkscape installed |
free |
sota |
yes |
svgwrite |
python |
pkg |
free |
good |
yes |
cairosvg |
python |
pkg |
free |
good |
yes |
svgpathtools |
python |
pkg |
free |
high |
yes |
vpype (vector post-processing) |
python |
pkg |
free |
high |
yes |
visual.mockup — UI / mockup / wireframe
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-sketch |
harness-cli |
Sketch installed (macOS) |
paid app |
sota |
yes |
cli-anything-drawio |
harness-cli |
drawio installed |
free |
high |
yes |
drawio-desktop |
native |
binary |
free |
high |
yes |
penpot |
native |
binary / self-host |
free |
high |
yes |
| Figma API |
api |
FIGMA_TOKEN |
free tier |
sota |
no |
| Canva API |
api |
CANVA_API_KEY |
paid |
high |
no |
| Penpot API |
api |
PENPOT_TOKEN |
free |
high |
no |
Known gap — Figma is the cross-scenario gap (S5 and S7).
visual.diagram — diagrams / flowcharts
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-drawio |
harness-cli |
drawio |
free |
sota |
yes |
cli-anything-mermaid |
harness-cli |
mermaid-cli |
free |
high |
yes |
graphviz (dot) |
native |
binary |
free |
high |
yes |
plantuml |
native |
binary + java |
free |
high |
yes |
visual.upscale — super-resolution
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
Real-ESRGAN |
python |
pkg + weights |
free |
high |
yes |
GFPGAN (faces) |
python |
pkg + weights |
free |
high |
yes |
upscayl |
native |
binary |
free |
high |
yes |
| Topaz |
api |
TOPAZ_API_KEY |
paid |
sota |
no |
| Replicate upscalers |
python |
REPLICATE_API_TOKEN |
metered |
high |
no |
photo.library — DAM / photo organization
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
exiftool + Pillow |
native+python |
binary+pkg |
free |
high |
yes |
digikam |
native |
binary |
free |
high |
yes |
photoprism |
native |
binary / self-host |
free |
high |
yes |
| Google Photos API |
api |
OAuth |
free tier |
high |
no |
photo.develop — RAW processing
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
rawpy |
python |
pkg |
free |
high |
yes |
darktable-cli |
native |
binary |
free |
sota |
yes |
rawtherapee-cli |
native |
binary |
free |
sota |
yes |
| Adobe Lightroom API |
api |
Adobe creds |
paid |
sota |
no |
publish.cms — publish images / articles to a CMS
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
contentful |
public-cli |
bin + token |
metered |
high |
no |
sanity |
public-cli |
bin + token |
metered |
high |
no |
hugo / mkdocs |
native/python |
binary/pkg |
free |
high |
yes |
| WordPress REST |
api |
app password |
free |
high |
no |
Recipes
social-card — generate + compose a social sharing image.
Uses: visual.generate, visual.edit.raster, publish.cms.
logo-set — design a logo + size variants.
Uses: visual.edit.vector, visual.edit.raster (rasterize), batch export.
ui-wireframe — mockup a UI flow.
Uses: visual.mockup, optional visual.edit.vector polish.
photo-batch — RAW ingest → develop → edit → library → publish.
Uses: photo.develop, visual.edit.raster, photo.library, publish.cms.
icon-pack — systematic icon production.
Uses: visual.edit.vector, batch rasterize via cairosvg.
thumbnail-set — thumbnails for a video/article series.
Uses: visual.generate (hero imagery), visual.edit.raster (layout, type), batch variant export.
ai-concept-art — generate → upscale → touch up.
Uses: visual.generate, visual.upscale, visual.edit.raster.
Known gaps
- Figma — cross-scenario gap (UI/UX loop for S5 and S7). API escalation works but we lack a native harness.
photo.library / photo.develop — strong native CLIs, no harness.
- Midjourney — Discord bridge only; no clean API.
Agent guidance
- Match generation provider to intent. GPT-Image-1 for text-in-image and photoreal; Ideogram for poster/typography; FLUX for artistic; Midjourney for stylized beauty shots; Stability for control+speed.
- Vector-first for design systems — logos, icons, illustrations start in
visual.edit.vector, rasterize last.
- Preserve color profiles.
exiftool + Pillow handles ICC; when moving between rawpy and Pillow, convert to sRGB at the boundary.
- AI + edit chain. Agents should plan: generate → background removal (
rembg) → composite (visual.edit.raster) → export. Skipping cleanup is the most common visible defect.
- Workspace discipline. Keep generation seeds + prompts in a manifest alongside output PNGs so variations are reproducible.
1---2name: cli-hub-matrix-image-design3description: Capability-based multi-tool matrix for image and graphic design: AI generation, raster/vector editing, UI mockups, diagrams, upscaling, photo library, and publishing.4---5
6# Image & Graphic Design Matrix (S5 — v2 capability-based)
7
8Scenario **S5**. Deepest creation coverage after S2 — raster (GIMP + Krita), vector (Inkscape), AI (ComfyUI + Jimeng + 7 APIs), diagram (drawio + mermaid). **Figma** is the headline gap (also affects S7).
9
10Schema: [`docs/cli-matrix/matrix_registry.schema.md`](../../docs/cli-matrix/matrix_registry.schema.md). Matrix plan: [`docs/cli-matrix/cli-matrix-plan.md`](../../docs/cli-matrix/cli-matrix-plan.md).
11
12## Install
13
14```bash
15cli-hub matrix install image-design
16cli-hub matrix info image-design
17cli-hub matrix preflight image-design --json
18```
19
20---
21
22## Provider selection constraints
23
241. Use preflight as an availability report, not as a provider selector.
252. Treat provider order as documentation order only.
263. Choose from user requirements, output quality bar, offline needs, credential state, install cost, and provider notes.
274. Escalate to paid or metered APIs only when credentials are already present or the user explicitly consents. AI image is paid-API-diverse, so ask which provider the user wants when several credentialed choices are available.
28
29Offline context? GIMP, Krita, Inkscape, and local `diffusers` cover almost everything offline.
30
31---
32
33## Preflight
34
35Run `cli-hub matrix preflight image-design --json` first. Use the manual block below for extra probes or older `cli-hub` versions.
36
37```bash
38cli-hub list --json
39python - <<'PY'
40import importlib.util
41for m in ("PIL","cv2","skimage","rembg","svgwrite","cairosvg","svgpathtools","vpype",
42 "diffusers","replicate","rawpy"):
43 print(m, importlib.util.find_spec(m) is not None)
44PY
45for b in inkscape gimp krita drawio magick convert exiftool upscayl darktable-cli \
46 rawtherapee-cli graphviz dot mermaid plantuml hugo mkdocs; do
47 command -v "$b" >/dev/null && echo "$b: yes" || echo "$b: no"
48done
49for e in OPENAI_API_KEY STABILITY_API_KEY IDEOGRAM_API_KEY RECRAFT_API_KEY \
50 GOOGLE_API_KEY MIDJOURNEY_TOKEN FIGMA_TOKEN CANVA_API_KEY PENPOT_TOKEN \
51 REPLICATE_API_TOKEN TOPAZ_API_KEY REMOVE_BG_API_KEY FIREFLY_TOKEN; do
52 [ -n "${!e}" ] && echo "$e: set" || echo "$e: unset"
53done
54```
55
56---
57
58## Suggest-to-user template
59
60```
61To enable <capability> via <provider>, please set <ENV_VAR>.
62 Cost: <cost notes>
63 Quality: <quality tier>
64Reply 'skip' to fall back to <next provider>.
65```
66
67Examples:
68- *To enable sota AI image generation via OpenAI GPT-Image-1, please set `OPENAI_API_KEY`. Cost: metered per-image. Quality: sota for photoreal + text rendering. Reply 'skip' to fall back to local `comfyui` (FLUX/SDXL).*
69- *To round-trip UI mockups with Figma, please set `FIGMA_TOKEN`. Cost: free tier works for most users. Quality: sota (design system aware). Reply 'skip' to fall back to `sketch` or `drawio` wireframes.*
70
71---
72
73## Capabilities
74
75### `visual.generate` — AI image generation
76
77| Provider | Kind | Requires | Cost | Quality | Offline |
78|---|---|---|---|---|---|
79| `cli-anything-comfyui` | harness-cli | ComfyUI + weights | free | high | yes |
80| `jimeng` | public-cli | `dreamina` bin | metered | high | no |
81| `diffusers` (SD/SDXL/FLUX) | python | pkg + weights + GPU | free | good-high | yes |
82| `replicate` | python | `REPLICATE_API_TOKEN` | metered | high | no |
83| OpenAI GPT-Image-1 | api | `OPENAI_API_KEY` | metered | sota | no |
84| Ideogram | api | `IDEOGRAM_API_KEY` | metered | sota | no |
85| Stability AI | api | `STABILITY_API_KEY` | metered | high | no |
86| Recraft | api | `RECRAFT_API_KEY` | paid | sota | no |
87| Google Imagen / Nano Banana | api | `GOOGLE_API_KEY` | metered | high | no |
88| Midjourney (Discord bridge) | api | `MIDJOURNEY_TOKEN` | paid | sota | no |
89| Adobe Firefly | api | `FIREFLY_TOKEN` | paid | high | no |
90
91### `visual.edit.raster` — raster editing
92
93| Provider | Kind | Requires | Cost | Quality | Offline |
94|---|---|---|---|---|---|
95| `cli-anything-gimp` | harness-cli | GIMP installed | free | sota | yes |
96| `cli-anything-krita` | harness-cli | Krita installed | free | sota | yes |
97| `Pillow` | python | pkg | free | good | yes |
98| `opencv-python` | python | pkg | free | high | yes |
99| `scikit-image` | python | pkg | free | high | yes |
100| `rembg` (background removal) | python | pkg | free | high | yes |
101| `remove.bg` | api | `REMOVE_BG_API_KEY` | metered | sota | no |
102| Adobe Firefly | api | `FIREFLY_TOKEN` | paid | sota | no |
103| Cutout.pro | api | token | metered | high | no |
104
105### `visual.edit.vector` — vector editing
106
107| Provider | Kind | Requires | Cost | Quality | Offline |
108|---|---|---|---|---|---|
109| `cli-anything-inkscape` | harness-cli | Inkscape installed | free | sota | yes |
110| `svgwrite` | python | pkg | free | good | yes |
111| `cairosvg` | python | pkg | free | good | yes |
112| `svgpathtools` | python | pkg | free | high | yes |
113| `vpype` (vector post-processing) | python | pkg | free | high | yes |
114
115### `visual.mockup` — UI / mockup / wireframe
116
117| Provider | Kind | Requires | Cost | Quality | Offline |
118|---|---|---|---|---|---|
119| `cli-anything-sketch` | harness-cli | Sketch installed (macOS) | paid app | sota | yes |
120| `cli-anything-drawio` | harness-cli | drawio installed | free | high | yes |
121| `drawio-desktop` | native | binary | free | high | yes |
122| `penpot` | native | binary / self-host | free | high | yes |
123| Figma API | api | `FIGMA_TOKEN` | free tier | sota | no |
124| Canva API | api | `CANVA_API_KEY` | paid | high | no |
125| Penpot API | api | `PENPOT_TOKEN` | free | high | no |
126
127**Known gap** — Figma is the cross-scenario gap (S5 and S7).
128
129### `visual.diagram` — diagrams / flowcharts
130
131| Provider | Kind | Requires | Cost | Quality | Offline |
132|---|---|---|---|---|---|
133| `cli-anything-drawio` | harness-cli | drawio | free | sota | yes |
134| `cli-anything-mermaid` | harness-cli | mermaid-cli | free | high | yes |
135| `graphviz` (`dot`) | native | binary | free | high | yes |
136| `plantuml` | native | binary + java | free | high | yes |
137
138### `visual.upscale` — super-resolution
139
140| Provider | Kind | Requires | Cost | Quality | Offline |
141|---|---|---|---|---|---|
142| `Real-ESRGAN` | python | pkg + weights | free | high | yes |
143| `GFPGAN` (faces) | python | pkg + weights | free | high | yes |
144| `upscayl` | native | binary | free | high | yes |
145| Topaz | api | `TOPAZ_API_KEY` | paid | sota | no |
146| Replicate upscalers | python | `REPLICATE_API_TOKEN` | metered | high | no |
147
148### `photo.library` — DAM / photo organization
149
150| Provider | Kind | Requires | Cost | Quality | Offline |
151|---|---|---|---|---|---|
152| `exiftool` + `Pillow` | native+python | binary+pkg | free | high | yes |
153| `digikam` | native | binary | free | high | yes |
154| `photoprism` | native | binary / self-host | free | high | yes |
155| Google Photos API | api | OAuth | free tier | high | no |
156
157### `photo.develop` — RAW processing
158
159| Provider | Kind | Requires | Cost | Quality | Offline |
160|---|---|---|---|---|---|
161| `rawpy` | python | pkg | free | high | yes |
162| `darktable-cli` | native | binary | free | sota | yes |
163| `rawtherapee-cli` | native | binary | free | sota | yes |
164| Adobe Lightroom API | api | Adobe creds | paid | sota | no |
165
166### `publish.cms` — publish images / articles to a CMS
167
168| Provider | Kind | Requires | Cost | Quality | Offline |
169|---|---|---|---|---|---|
170| `contentful` | public-cli | bin + token | metered | high | no |
171| `sanity` | public-cli | bin + token | metered | high | no |
172| `hugo` / `mkdocs` | native/python | binary/pkg | free | high | yes |
173| WordPress REST | api | app password | free | high | no |
174
175---
176
177## Recipes
178
179- **`social-card`** — generate + compose a social sharing image.
180 Uses: `visual.generate`, `visual.edit.raster`, `publish.cms`.
181
182- **`logo-set`** — design a logo + size variants.
183 Uses: `visual.edit.vector`, `visual.edit.raster` (rasterize), batch export.
184
185- **`ui-wireframe`** — mockup a UI flow.
186 Uses: `visual.mockup`, optional `visual.edit.vector` polish.
187
188- **`photo-batch`** — RAW ingest → develop → edit → library → publish.
189 Uses: `photo.develop`, `visual.edit.raster`, `photo.library`, `publish.cms`.
190
191- **`icon-pack`** — systematic icon production.
192 Uses: `visual.edit.vector`, batch rasterize via `cairosvg`.
193
194- **`thumbnail-set`** — thumbnails for a video/article series.
195 Uses: `visual.generate` (hero imagery), `visual.edit.raster` (layout, type), batch variant export.
196
197- **`ai-concept-art`** — generate → upscale → touch up.
198 Uses: `visual.generate`, `visual.upscale`, `visual.edit.raster`.
199
200---
201
202## Known gaps
203
204- **Figma** — cross-scenario gap (UI/UX loop for S5 and S7). API escalation works but we lack a native harness.
205- **`photo.library` / `photo.develop`** — strong native CLIs, no harness.
206- **Midjourney** — Discord bridge only; no clean API.
207
208---
209
210## Agent guidance
211
212- **Match generation provider to intent.** GPT-Image-1 for text-in-image and photoreal; Ideogram for poster/typography; FLUX for artistic; Midjourney for stylized beauty shots; Stability for control+speed.
213- **Vector-first for design systems** — logos, icons, illustrations start in `visual.edit.vector`, rasterize last.
214- **Preserve color profiles.** `exiftool` + `Pillow` handles ICC; when moving between `rawpy` and `Pillow`, convert to sRGB at the boundary.
215- **AI + edit chain.** Agents should plan: generate → background removal (`rembg`) → composite (`visual.edit.raster`) → export. Skipping cleanup is the most common visible defect.
216- **Workspace discipline.** Keep generation seeds + prompts in a manifest alongside output PNGs so variations are reproducible.