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