@imagerry/cli 0.1.6-beta → 0.1.8-beta

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 CHANGED
@@ -18,6 +18,7 @@ The official command-line interface for [Imagerry](https://imagerry.com), built
18
18
 
19
19
  * 🖥️ Process images directly from the terminal
20
20
  * 🌐 **New:** Host a self-hosted API server with `serve`
21
+ * 🧠 **New:** Model Context Protocol (MCP) server support for AI agents (Claude Desktop, Cursor, Zed)
21
22
  * 🔒 Keep image processing completely local
22
23
  * 🎨 Apply built-in styling presets
23
24
  * ⚙️ Create and reuse custom JSON presets
@@ -38,28 +39,32 @@ Verify the installation:
38
39
  imagerry -h
39
40
  ```
40
41
 
41
- ## Licensing
42
+ ## Free Tier & Licensing
42
43
 
43
- Imagerry CLI requires an **Imagerry Pro** license.
44
+ Imagerry CLI includes a **Free Tier** that allows you to process up to **15 free images per day** without requiring a license key.
44
45
 
45
- You can provide your license key in either of the following ways.
46
+ For unlimited daily processing, automated loops/batch scripts, or hosting the self-hosted `serve` API and `mcp` server, an **[Imagerry Pro](https://imagerry.com/pro)** license is required.
46
47
 
47
- ### Command-line option
48
+ ### Using Pro License
49
+
50
+ You can provide your license key in either of the following ways:
51
+
52
+ #### Command-line option
48
53
 
49
54
  ```bash
50
55
  imagerry --input=input.png --output=output.png --license-key=YOUR_KEY
51
56
  ```
52
57
 
53
- ### Environment variable
58
+ #### Environment variable
54
59
 
55
- For automation and CI/CD environments, using an environment variable is recommended:
60
+ For automation, Docker, and CI/CD environments:
56
61
 
57
62
  ```bash
58
63
  export IMAGERRY_LICENSE_KEY="YOUR_KEY"
59
64
  ```
60
65
 
61
66
  > [!TIP]
62
- > The CLI verifies your license with the payment server, but CLI usage does **not count against your device limit**. This makes it suitable for automated environments such as GitHub Actions, Docker, and CI/CD pipelines.
67
+ > CLI usage does **not count against your device limit**. You can use your Pro license freely across your local terminal, Docker containers, and CI/CD pipelines.
63
68
 
64
69
  ## Usage
65
70
 
@@ -172,6 +177,37 @@ The server also exposes a few helpful informational routes:
172
177
  - `GET /template` — Returns a JSON object of all available settings keys and their defaults.
173
178
  - `GET /health` — Returns server health status and engine version.
174
179
 
180
+ ## Model Context Protocol (MCP) Server
181
+
182
+ Imagerry CLI includes an official **Model Context Protocol (MCP)** server that exposes local image styling and formatting tools directly to AI assistants like Claude Desktop, Cursor, and Zed.
183
+
184
+ ### Starting the MCP Server
185
+
186
+ ```bash
187
+ imagerry mcp
188
+ ```
189
+
190
+ ### Claude Desktop Configuration
191
+
192
+ Add the following to your `claude_desktop_config.json`:
193
+
194
+ ```json
195
+ {
196
+ "mcpServers": {
197
+ "imagerry": {
198
+ "command": "imagerry",
199
+ "args": ["mcp"],
200
+ "env": {
201
+ "IMAGERRY_LICENSE_KEY": "YOUR_PRO_LICENSE_KEY"
202
+ }
203
+ }
204
+ }
205
+ }
206
+ ```
207
+
208
+ ### Registered Tools
209
+ * **`customize_image`**: Applies presets, gradients, and custom styles to local images (`inputPath`, `outputPath`, `preset`, `mode`).
210
+
175
211
  ## Automation
176
212
 
177
213
  Imagerry CLI is designed to work well in automated environments.
@@ -209,4 +245,5 @@ The CLI only communicates with the licensing service when verifying your Imagerr
209
245
  ## Links
210
246
 
211
247
  * [Imagerry](https://imagerry.com)
248
+ * [Imagerry Pro](https://imagerry.com/pro)
212
249
  * [Legal & Terms](https://imagerry.com/legal)
package/bin/imagerry.js CHANGED
@@ -12,28 +12,14 @@ const packageName = `@imagerry/cli-${platform}-${arch}`;
12
12
 
13
13
  try {
14
14
  const require = createRequire(import.meta.url);
15
-
15
+
16
16
  // Resolve the platform-specific package
17
17
  const pkgPath = require.resolve(`${packageName}/package.json`);
18
18
  const pkgDir = path.dirname(pkgPath);
19
-
20
- // if (platform === 'android') {
21
- // const entryPath = path.join(pkgDir, 'index.cjs');
22
- // if (!fs.existsSync(entryPath)) {
23
- // throw new Error(`Android JS entry not found at ${entryPath}`);
24
- // }
25
- // const { status, signal, error } = spawnSync('node', [entryPath, ...process.argv.slice(2)], {
26
- // stdio: 'inherit',
27
- // });
28
- //
29
- // if (error) throw error;
30
- // if (signal) process.exit(1);
31
- // process.exit(status ?? 0);
32
- // }
33
19
 
34
20
  const binName = platform === 'win32' ? 'imagerry.exe' : 'imagerry';
35
21
  const binPath = path.join(pkgDir, binName);
36
-
22
+
37
23
  if (!fs.existsSync(binPath)) {
38
24
  throw new Error(`Native binary not found at ${binPath}`);
39
25
  }
@@ -42,6 +28,10 @@ try {
42
28
  const { status, signal, error } = spawnSync(binPath, process.argv.slice(2), {
43
29
  stdio: 'inherit',
44
30
  windowsHide: true,
31
+ env: {
32
+ ...process.env,
33
+ IMAGERRY_INSTALLED_BY: 'npm',
34
+ },
45
35
  });
46
36
 
47
37
  if (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imagerry/cli",
3
- "version": "0.1.6-beta",
3
+ "version": "0.1.8-beta",
4
4
  "description": "Command-line interface for the Imagerry engine",
5
5
  "homepage": "https://cli.imagerry.com",
6
6
  "repository": {
@@ -23,12 +23,13 @@
23
23
  "imagerry": "bin/imagerry.js"
24
24
  },
25
25
  "optionalDependencies": {
26
- "@imagerry/cli-darwin-arm64": "0.1.6-beta",
27
- "@imagerry/cli-darwin-x64": "0.1.6-beta",
28
- "@imagerry/cli-linux-arm64": "0.1.6-beta",
29
- "@imagerry/cli-linux-x64": "0.1.6-beta",
30
- "@imagerry/cli-win32-arm64": "0.1.6-beta",
31
- "@imagerry/cli-win32-x64": "0.1.6-beta"
26
+ "@imagerry/cli-android-arm64": "0.1.8-beta",
27
+ "@imagerry/cli-darwin-arm64": "0.1.8-beta",
28
+ "@imagerry/cli-darwin-x64": "0.1.8-beta",
29
+ "@imagerry/cli-linux-arm64": "0.1.8-beta",
30
+ "@imagerry/cli-linux-x64": "0.1.8-beta",
31
+ "@imagerry/cli-win32-arm64": "0.1.8-beta",
32
+ "@imagerry/cli-win32-x64": "0.1.8-beta"
32
33
  },
33
34
  "keywords": [
34
35
  "image",
@@ -44,6 +45,6 @@
44
45
  "author": "Imagerry <support@imagerry.com>",
45
46
  "license": "SEE LICENSE IN LICENSE.md",
46
47
  "imagerry": {
47
- "minimumVersion": "0.1.0-beta"
48
+ "minimumVersion": "0.1.7-beta"
48
49
  }
49
50
  }