imgx-mcp 0.9.2 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,183 +1,221 @@
1
- # Changelog
2
-
3
- ## 0.9.1 (2026-03-02)
4
-
5
- ### Added
6
-
7
- - **Skill included in npm package** — `skills/image-generation/SKILL.md` and `references/providers.md` now ship with the npm package, making it easier to install the Claude Code skill
8
-
9
- ### Changed
10
-
11
- - README restructured: Skill section moved after Quick Start, Plugin section moved to bottom
12
- - Skill install instructions added (npm copy, curl from GitHub, manual placement)
13
- - SKILL.md: added missing MCP parameters (`output_format`, `output_dir`, `model`, `provider` on edit tools)
14
- - SKILL.md: CLI fallback updated from plugin path to `npx imgx-mcp`
15
- - providers.md: OpenAI `OUTPUT_FORMAT` corrected from CLI-only to MCP `output_format` parameter
16
- - npm keywords: added `skill`, `claude-code`
17
-
18
- ## 0.9.0 (2026-02-28)
19
-
20
- ### Changed
21
-
22
- - **Renamed from `imgx-cli` to `imgx-mcp`** reflects primary value as an MCP server for AI coding agents (Claude Code, Codex CLI, Cursor, etc.). CLI command remains `imgx`. npm package is now `imgx-mcp`.
23
- - Updated tagline: "AI image generation and editing for Claude Code, Codex CLI, and MCP-compatible AI agents"
24
- - All plugin manifests, registry entries, and documentation updated to `imgx-mcp`
25
-
26
- ### Migration
27
-
28
- - `npm install -g imgx-mcp` (replaces `imgx-cli`)
29
- - MCP config: `--package=imgx-mcp` (replaces `--package=imgx-cli`)
30
- - Claude Code plugin: `somacoffeekyoto/imgx-mcp` (replaces `somacoffeekyoto/imgx-cli`)
31
- - GitHub repo: `somacoffeekyoto/imgx-mcp` (auto-redirect from old URL)
32
-
33
- ## 0.8.1 (2026-02-27)
34
-
35
- ### Changed
36
-
37
- - Remove MCP inline preview size guard — always include base64 image data in MCP responses regardless of size. MCP clients that support `type: "image"` content (e.g. Claude Desktop) will display inline; others will use the file path from the text content. Gemini-generated images (~900KB raw, ~1.2MB base64) exceed Claude Desktop's 1MB limit but the file path fallback ensures usability.
38
-
39
- ## 0.8.0 (2026-02-27)
40
-
41
- ### Fixed
42
-
43
- - **MCP inline preview size guard** — images exceeding ~780KB base64 (Claude Desktop's 1MB tool result limit) are now gracefully skipped from inline preview. Full-quality images are always saved to disk. Previously, oversized images caused silent display failures in Claude Desktop.
44
-
45
- ## 0.7.1 (2026-02-27)
46
-
47
- ### Fixed
48
-
49
- - Remove `MULTIPLE_OUTPUTS` capability from Gemini provider `gemini-3-pro-image-preview` does not support `candidateCount`, causing errors when `count > 1`
50
-
51
- ## 0.7.0 (2026-02-27)
52
-
53
- ### Added
54
-
55
- - **Output format selection** — `--format` flag (CLI) and `output_format` parameter (MCP) to choose between `png`, `jpeg`, or `webp` output. Currently supported by OpenAI provider (`gpt-image-1`). Gemini provider outputs PNG regardless of format setting.
56
- - `OUTPUT_FORMAT` capability added to provider capability system
57
-
58
- ## 0.6.2 (2026-02-27)
59
-
60
- ### Added
61
-
62
- - **Image preview in MCP responses** — MCP tool results now include inline image data (base64) alongside file paths. Claude Desktop and other MCP clients can display generated/edited images directly without opening files manually.
63
-
64
- ## 0.6.1 (2026-02-27)
65
-
66
- ### Fixed
67
-
68
- - Default output directory changed from process cwd to `~/Pictures/imgx` — fixes images being saved to AppData when used via MCP (Claude Desktop, etc.)
69
-
70
- ## 0.6.0 (2026-02-27)
71
-
72
- ### Added
73
-
74
- - **OpenAI provider** — `gpt-image-1` model with generate and edit support
75
- - Native `fetch` implementation (no `openai` npm dependency)
76
- - Aspect ratio mapping to OpenAI size strings, resolution mapping to quality parameter
77
- - Manual multipart/form-data construction for Node 18 compatibility
78
- - `OPENAI_API_KEY` environment variable support
79
- - `--provider` flag for `imgx config set api-key` — manage API keys per provider
80
- - `imgx config set api-key <key> --provider openai`
81
- - `imgx config list` now shows all configured provider keys
82
-
83
- ### Changed
84
-
85
- - CLI and MCP server now initialize both Gemini and OpenAI providers at startup
86
- - `imgx providers` and error messages updated for multi-provider context
87
- - Help text updated with OpenAI provider info and env var
88
-
89
- ## 0.5.2 (2026-02-26)
90
-
91
- ### Fixed
92
-
93
- - `imgx-mcp` bin: added missing shebang (`#!/usr/bin/env node`) fixes `npx imgx-mcp` and Claude Desktop MCP integration on all platforms
94
-
95
- ### Changed
96
-
97
- - README: add Claude Desktop MCP configuration (Windows `cmd /c` + macOS/Linux)
98
- - README: switch all MCP config examples from local `node` path to `npx`
99
- - README: replace "Version updates" with full release checklist (version bump → build → publish → verify)
100
-
101
- ## 0.5.1 (2026-02-26)
102
-
103
- ### Added
104
-
105
- - Published to npm (`npm install -g imgx-cli` / `npx imgx`)
106
- - `mcpName` field for MCP Registry integration
107
- - `server.json` for MCP Registry publishing
108
-
109
- ### Changed
110
-
111
- - README: added Claude Desktop MCP configuration section with output directory note
112
- - README: added Google AI Studio link for API key setup, MCP env section note
113
-
114
- ## 0.5.0 (2026-02-26)
115
-
116
- ### Added
117
-
118
- - `edit_last` MCP tool edit the last generated/edited image via MCP without specifying input path
119
- - `imgx init` command — create `.imgxrc` project config template in current directory
120
- - MCP server now tracks last output (shared with CLI `--last` flag)
121
-
122
- ## 0.4.0 (2026-02-26)
123
-
124
- ### Added
125
-
126
- - `--last` (`-l`) flag for `edit` command — use the previous output as input automatically
127
- - Works with both `generate` and `edit` outputs
128
- - Enables iterative editing without manually specifying file paths
129
- - `.imgxrc` project config — place in project directory for project-level defaults
130
- - Supports `defaults.model`, `defaults.outputDir`, `defaults.aspectRatio`, `defaults.resolution`, `defaults.provider`
131
- - Shared via Git (no API keys use `imgx config set api-key` or env vars)
132
-
133
- ### Changed
134
-
135
- - Settings resolution expanded to 5 layers: CLI flags env vars `.imgxrc` user config → provider defaults
136
-
137
- ## 0.3.0 (2026-02-26)
138
-
139
- ### Added
140
-
141
- - `imgx config` command — manage API keys and default settings via config file
142
- - `config set api-key <key>` — save Gemini API key (no more manual environment variable setup)
143
- - `config set model|provider|output-dir|aspect-ratio|resolution <value>` set defaults
144
- - `config list` show all settings
145
- - `config get <key>` show a specific setting (API key is masked)
146
- - `config path` — show config file location
147
- - Config file at `~/.config/imgx/config.json` (Linux/macOS) or `%APPDATA%\imgx\config.json` (Windows)
148
- - Settings resolution: CLI flags → environment variables → config file → provider defaults
149
- - Uninstall instructions in README (plugin, npm, MCP, config cleanup)
150
-
151
- ### Changed
152
-
153
- - API key resolution: environment variable → config file (env var still takes precedence)
154
- - Default model, provider, output-dir, aspect-ratio, resolution are now configurable via `imgx config set`
155
-
156
- ## 0.2.0 (2026-02-26)
157
-
158
- ### Added
159
-
160
- - MCP server (`dist/mcp.bundle.js`) — exposes `generate_image`, `edit_image`, `list_providers` tools via Model Context Protocol stdio transport
161
- - Works with Gemini CLI, Codex CLI, Antigravity, Cursor, Windsurf, Continue.dev, Cline, Zed, and any MCP-compatible tool
162
- - `.mcp.json` updated with actual server config for Claude Code plugin auto-registration
163
- - `imgx-mcp` bin command for direct MCP server execution
164
-
165
- ## 0.1.0 (2026-02-26)
166
-
167
- Initial release.
168
-
169
- ### Features
170
-
171
- - `generate` command: text-to-image generation
172
- - `edit` command: image editing with text instructions
173
- - `providers` command: list available providers
174
- - `capabilities` command: show provider capabilities
175
- - Gemini provider with 6 capabilities (generate, edit, aspect ratio, resolution, reference images, person control)
176
- - Capability-based provider abstraction (model-independent core + model-dependent providers)
177
- - JSON output for scripting and tool integration
178
- - Single-file esbuild bundle
179
-
180
- ### Distribution
181
-
182
- - Claude Code plugin: `somacoffeekyoto/imgx-cli` marketplace with `image-generation` skill
183
- - npm package name reserved: `imgx-cli` (publish pending)
1
+ # Changelog
2
+
3
+ ## 1.0.1 (2026-03-03)
4
+
5
+ ### Fixed
6
+
7
+ - **`edit_last` now inherits session `output_dir`**When `generate_image` specifies `output_dir`, subsequent `edit_last` calls without explicit `output_dir` now output to the same directory. Previously, `edit_last` always fell back to the default (`~/Pictures/imgx`), causing session images to scatter across two locations
8
+ - **`clear_history` now removes empty session directories** — MCP `clear_history` with `delete_files: true` now removes empty `s-XXXXXXXX/` directories after deleting image files, matching CLI `history clear` behavior
9
+
10
+ ### Added
11
+
12
+ - `outputDir` field on `Session` type stores the output directory used when creating a session
13
+ - `getActiveSessionOutputDir()` export returns the active session's output directory for fallback resolution
14
+ - 6 new tests for session `outputDir` storage and `getActiveSessionOutputDir()` behavior (total: 37 tests)
15
+
16
+ ## 1.0.0 (2026-03-03)
17
+
18
+ ### Added
19
+
20
+ - **Session-based undo/redo** — N-step undo and redo within editing sessions. Each `generate` starts a new session; `edit --last` appends to the active session. Up to 10 entries per session with root protection
21
+ - **Edit history** — Full session history with metadata (prompt, provider, model, operation, timestamps). View with `imgx history` or `edit_history` MCP tool
22
+ - **Session management**Switch between sessions (`imgx history switch <id>` / `switch_session`), clear history with optional file deletion (`imgx history clear` / `clear_history`)
23
+ - **Session directories** Image output organized by session ID under the output directory (`~/Pictures/imgx/<session-id>/`)
24
+ - **Output directory migration** `imgx config set output-dir` now offers to move existing files and updates all history paths
25
+ - **6 new MCP tools** — `undo_edit`, `redo_edit`, `edit_history`, `switch_session`, `clear_history`, `set_output_dir`
26
+ - **3 new CLI commands** — `imgx undo`, `imgx redo`, `imgx history` (with `switch` and `clear` subcommands)
27
+ - **Test framework** — Vitest introduced with 31 tests covering history and storage modules
28
+
29
+ ### Changed
30
+
31
+ - `saveLastOutput` / `loadLastOutput` replaced by session-based `pushHistory` / `getActiveEntry`
32
+ - `last-output.json` replaced by `output-history.json` (no backward compatibility)
33
+ - `edit -i <image>` now creates a new session (external image starts a new chain)
34
+ - `edit --last` / `edit_last` appends to the active session at cursor position
35
+
36
+ ### Removed
37
+
38
+ - `last-output.json` — replaced by `output-history.json`
39
+ - `saveLastOutput()` / `loadLastOutput()` functions from config module
40
+
41
+ ## 0.9.1 (2026-03-02)
42
+
43
+ ### Added
44
+
45
+ - **Skill included in npm package** — `skills/image-generation/SKILL.md` and `references/providers.md` now ship with the npm package, making it easier to install the Claude Code skill
46
+
47
+ ### Changed
48
+
49
+ - README restructured: Skill section moved after Quick Start, Plugin section moved to bottom
50
+ - Skill install instructions added (npm copy, curl from GitHub, manual placement)
51
+ - SKILL.md: added missing MCP parameters (`output_format`, `output_dir`, `model`, `provider` on edit tools)
52
+ - SKILL.md: CLI fallback updated from plugin path to `npx imgx-mcp`
53
+ - providers.md: OpenAI `OUTPUT_FORMAT` corrected from CLI-only to MCP `output_format` parameter
54
+ - npm keywords: added `skill`, `claude-code`
55
+
56
+ ## 0.9.0 (2026-02-28)
57
+
58
+ ### Changed
59
+
60
+ - **Renamed from `imgx-cli` to `imgx-mcp`** — reflects primary value as an MCP server for AI coding agents (Claude Code, Codex CLI, Cursor, etc.). CLI command remains `imgx`. npm package is now `imgx-mcp`.
61
+ - Updated tagline: "AI image generation and editing for Claude Code, Codex CLI, and MCP-compatible AI agents"
62
+ - All plugin manifests, registry entries, and documentation updated to `imgx-mcp`
63
+
64
+ ### Migration
65
+
66
+ - `npm install -g imgx-mcp` (replaces `imgx-cli`)
67
+ - MCP config: `--package=imgx-mcp` (replaces `--package=imgx-cli`)
68
+ - Claude Code plugin: `somacoffeekyoto/imgx-mcp` (replaces `somacoffeekyoto/imgx-cli`)
69
+ - GitHub repo: `somacoffeekyoto/imgx-mcp` (auto-redirect from old URL)
70
+
71
+ ## 0.8.1 (2026-02-27)
72
+
73
+ ### Changed
74
+
75
+ - Remove MCP inline preview size guard — always include base64 image data in MCP responses regardless of size. MCP clients that support `type: "image"` content (e.g. Claude Desktop) will display inline; others will use the file path from the text content. Gemini-generated images (~900KB raw, ~1.2MB base64) exceed Claude Desktop's 1MB limit but the file path fallback ensures usability.
76
+
77
+ ## 0.8.0 (2026-02-27)
78
+
79
+ ### Fixed
80
+
81
+ - **MCP inline preview size guard** — images exceeding ~780KB base64 (Claude Desktop's 1MB tool result limit) are now gracefully skipped from inline preview. Full-quality images are always saved to disk. Previously, oversized images caused silent display failures in Claude Desktop.
82
+
83
+ ## 0.7.1 (2026-02-27)
84
+
85
+ ### Fixed
86
+
87
+ - Remove `MULTIPLE_OUTPUTS` capability from Gemini provider `gemini-3-pro-image-preview` does not support `candidateCount`, causing errors when `count > 1`
88
+
89
+ ## 0.7.0 (2026-02-27)
90
+
91
+ ### Added
92
+
93
+ - **Output format selection** `--format` flag (CLI) and `output_format` parameter (MCP) to choose between `png`, `jpeg`, or `webp` output. Currently supported by OpenAI provider (`gpt-image-1`). Gemini provider outputs PNG regardless of format setting.
94
+ - `OUTPUT_FORMAT` capability added to provider capability system
95
+
96
+ ## 0.6.2 (2026-02-27)
97
+
98
+ ### Added
99
+
100
+ - **Image preview in MCP responses** — MCP tool results now include inline image data (base64) alongside file paths. Claude Desktop and other MCP clients can display generated/edited images directly without opening files manually.
101
+
102
+ ## 0.6.1 (2026-02-27)
103
+
104
+ ### Fixed
105
+
106
+ - Default output directory changed from process cwd to `~/Pictures/imgx` fixes images being saved to AppData when used via MCP (Claude Desktop, etc.)
107
+
108
+ ## 0.6.0 (2026-02-27)
109
+
110
+ ### Added
111
+
112
+ - **OpenAI provider** `gpt-image-1` model with generate and edit support
113
+ - Native `fetch` implementation (no `openai` npm dependency)
114
+ - Aspect ratio mapping to OpenAI size strings, resolution mapping to quality parameter
115
+ - Manual multipart/form-data construction for Node 18 compatibility
116
+ - `OPENAI_API_KEY` environment variable support
117
+ - `--provider` flag for `imgx config set api-key` — manage API keys per provider
118
+ - `imgx config set api-key <key> --provider openai`
119
+ - `imgx config list` now shows all configured provider keys
120
+
121
+ ### Changed
122
+
123
+ - CLI and MCP server now initialize both Gemini and OpenAI providers at startup
124
+ - `imgx providers` and error messages updated for multi-provider context
125
+ - Help text updated with OpenAI provider info and env var
126
+
127
+ ## 0.5.2 (2026-02-26)
128
+
129
+ ### Fixed
130
+
131
+ - `imgx-mcp` bin: added missing shebang (`#!/usr/bin/env node`)fixes `npx imgx-mcp` and Claude Desktop MCP integration on all platforms
132
+
133
+ ### Changed
134
+
135
+ - README: add Claude Desktop MCP configuration (Windows `cmd /c` + macOS/Linux)
136
+ - README: switch all MCP config examples from local `node` path to `npx`
137
+ - README: replace "Version updates" with full release checklist (version bump → build → publish → verify)
138
+
139
+ ## 0.5.1 (2026-02-26)
140
+
141
+ ### Added
142
+
143
+ - Published to npm (`npm install -g imgx-cli` / `npx imgx`)
144
+ - `mcpName` field for MCP Registry integration
145
+ - `server.json` for MCP Registry publishing
146
+
147
+ ### Changed
148
+
149
+ - README: added Claude Desktop MCP configuration section with output directory note
150
+ - README: added Google AI Studio link for API key setup, MCP env section note
151
+
152
+ ## 0.5.0 (2026-02-26)
153
+
154
+ ### Added
155
+
156
+ - `edit_last` MCP tool — edit the last generated/edited image via MCP without specifying input path
157
+ - `imgx init` command — create `.imgxrc` project config template in current directory
158
+ - MCP server now tracks last output (shared with CLI `--last` flag)
159
+
160
+ ## 0.4.0 (2026-02-26)
161
+
162
+ ### Added
163
+
164
+ - `--last` (`-l`) flag for `edit` command — use the previous output as input automatically
165
+ - Works with both `generate` and `edit` outputs
166
+ - Enables iterative editing without manually specifying file paths
167
+ - `.imgxrc` project config — place in project directory for project-level defaults
168
+ - Supports `defaults.model`, `defaults.outputDir`, `defaults.aspectRatio`, `defaults.resolution`, `defaults.provider`
169
+ - Shared via Git (no API keys — use `imgx config set api-key` or env vars)
170
+
171
+ ### Changed
172
+
173
+ - Settings resolution expanded to 5 layers: CLI flags → env vars → `.imgxrc` → user config → provider defaults
174
+
175
+ ## 0.3.0 (2026-02-26)
176
+
177
+ ### Added
178
+
179
+ - `imgx config` command — manage API keys and default settings via config file
180
+ - `config set api-key <key>` — save Gemini API key (no more manual environment variable setup)
181
+ - `config set model|provider|output-dir|aspect-ratio|resolution <value>` — set defaults
182
+ - `config list` show all settings
183
+ - `config get <key>` show a specific setting (API key is masked)
184
+ - `config path` — show config file location
185
+ - Config file at `~/.config/imgx/config.json` (Linux/macOS) or `%APPDATA%\imgx\config.json` (Windows)
186
+ - Settings resolution: CLI flags → environment variables → config file → provider defaults
187
+ - Uninstall instructions in README (plugin, npm, MCP, config cleanup)
188
+
189
+ ### Changed
190
+
191
+ - API key resolution: environment variable → config file (env var still takes precedence)
192
+ - Default model, provider, output-dir, aspect-ratio, resolution are now configurable via `imgx config set`
193
+
194
+ ## 0.2.0 (2026-02-26)
195
+
196
+ ### Added
197
+
198
+ - MCP server (`dist/mcp.bundle.js`) — exposes `generate_image`, `edit_image`, `list_providers` tools via Model Context Protocol stdio transport
199
+ - Works with Gemini CLI, Codex CLI, Antigravity, Cursor, Windsurf, Continue.dev, Cline, Zed, and any MCP-compatible tool
200
+ - `.mcp.json` updated with actual server config for Claude Code plugin auto-registration
201
+ - `imgx-mcp` bin command for direct MCP server execution
202
+
203
+ ## 0.1.0 (2026-02-26)
204
+
205
+ Initial release.
206
+
207
+ ### Features
208
+
209
+ - `generate` command: text-to-image generation
210
+ - `edit` command: image editing with text instructions
211
+ - `providers` command: list available providers
212
+ - `capabilities` command: show provider capabilities
213
+ - Gemini provider with 6 capabilities (generate, edit, aspect ratio, resolution, reference images, person control)
214
+ - Capability-based provider abstraction (model-independent core + model-dependent providers)
215
+ - JSON output for scripting and tool integration
216
+ - Single-file esbuild bundle
217
+
218
+ ### Distribution
219
+
220
+ - Claude Code plugin: `somacoffeekyoto/imgx-cli` marketplace with `image-generation` skill
221
+ - npm package name reserved: `imgx-cli` (publish pending)