@imagerry/cli 0.1.9-beta → 0.2.0-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.
Files changed (2) hide show
  1. package/README.md +124 -128
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -1,11 +1,6 @@
1
- # Imagerry CLI (Beta)
1
+ # Imagerry CLI (v0.2.0-beta)
2
2
 
3
- The official command-line interface for [Imagerry](https://imagerry.com), built for automating image processing and styling directly from your terminal.
4
-
5
- > [!NOTE]
6
- > **Beta Release**
7
- >
8
- > Imagerry CLI is currently in beta. At this time, it only supports the **image customizer** mode with basic styling capabilities.
3
+ The official high-performance command-line interface for [Imagerry](https://imagerry.com), built for automating image processing, styling, format conversion, and mockups directly from your terminal.
9
4
 
10
5
  > [!IMPORTANT]
11
6
  > **Privacy-first processing**
@@ -16,14 +11,17 @@ The official command-line interface for [Imagerry](https://imagerry.com), built
16
11
 
17
12
  ## Features
18
13
 
19
- * 🖥️ Process images directly from the terminal
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)
22
- * 🔒 Keep image processing completely local
23
- * 🎨 Apply built-in styling presets
24
- * ⚙️ Create and reuse custom JSON presets
25
- * 🤖 Use in scripts, Docker, and CI/CD workflows
26
- * 📦 Automate workflows with GitHub Actions
14
+ * 🖥️ **Terminal Processing**: Style single images or batch process entire directories
15
+ * 🖼️ **Multi-Format Output**: Native WebP, JPEG, and PNG encoding with configurable quality
16
+ * 🎨 **Built-in Presets**: Stunning modern aesthetics (`mesh`, `gradient`, `cyberpunk`, `sunset`, `studio`, `aurora`)
17
+ * **Direct CLI Overrides**: Fine-tune `--padding`, `--radius`, `--shadow`, `--bg-color`, and `--ratio` directly from the command line without writing JSON
18
+ * 📁 **Batch Processing**: Parallel multi-image folder and wildcard conversion (`--batch`) with live progress
19
+ * ⚙️ **Project Config**: Define team-wide default styles in `imagerry.config.json` with `imagerry init`
20
+ * 🌐 **Self-Hosted API Server**: Run a local or VPS microservice with `imagerry serve`
21
+ * 🧠 **Model Context Protocol (MCP)**: Native tools for Claude Desktop, Cursor, and Zed AI assistants
22
+ * 🤖 **CI/CD & Automation**: Run in GitHub Actions, Docker, and shell pipelines
23
+
24
+ ---
27
25
 
28
26
  ## Installation
29
27
 
@@ -36,162 +34,186 @@ npm install -g @imagerry/cli
36
34
  Verify the installation:
37
35
 
38
36
  ```bash
37
+ imagerry -v
39
38
  imagerry -h
40
39
  ```
41
40
 
42
- ## Free Tier & Licensing
43
-
44
- Imagerry CLI includes a **Free Tier** that allows you to process up to **15 free images per day** without requiring a license key.
41
+ ---
45
42
 
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.
43
+ ## Free Tier & Licensing
47
44
 
48
- ### Using Pro License
45
+ Imagerry CLI includes a **Free Tier** allowing you to process up to **15 free images per day** without a license key.
49
46
 
50
- You can provide your license key in either of the following ways:
47
+ For unlimited daily processing, high-volume automated batch scripts, or hosting the self-hosted `serve` API and `mcp` server, an **[Imagerry Pro](https://imagerry.com/pro)** license is required.
51
48
 
52
- #### Command-line option
49
+ ### Providing Pro License
53
50
 
51
+ #### Option A: Command-line flag
54
52
  ```bash
55
- imagerry --input=input.png --output=output.png --license-key=YOUR_KEY
53
+ imagerry -i input.png -o output.png --license-key=YOUR_KEY
56
54
  ```
57
55
 
58
- #### Environment variable
59
-
60
- For automation, Docker, and CI/CD environments:
61
-
56
+ #### Option B: Environment variable (Recommended for CI/CD & Docker)
62
57
  ```bash
63
58
  export IMAGERRY_LICENSE_KEY="YOUR_KEY"
64
59
  ```
65
60
 
66
61
  > [!TIP]
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.
62
+ > CLI usage does **not count against your desktop device limit**. You can use your Pro license freely across terminals, servers, Docker containers, and CI/CD pipelines.
68
63
 
69
- ## Usage
64
+ ---
70
65
 
71
- ### Basic usage
66
+ ## Usage Guide
72
67
 
73
- Process an image using the default settings:
68
+ ### 1. Basic Usage & Formats
74
69
 
70
+ Process an image with default styles:
75
71
  ```bash
76
- imagerry --input=input.png --output=output.png
72
+ imagerry -i input.png -o output.png
77
73
  ```
78
74
 
79
- You can also use the shorter argument aliases:
80
-
75
+ Convert and compress to **WebP** or **JPEG** with custom quality:
81
76
  ```bash
82
- imagerry -i input.png -o output.png
83
- ```
77
+ # Auto-detected format from file extension
78
+ imagerry -i photo.png -o photo.webp -q 85
84
79
 
85
- ## Built-in Presets
80
+ # Explicit format flag
81
+ imagerry -i photo.png -o result.jpg --format jpeg --quality 80
82
+ ```
86
83
 
87
- Imagerry comes with built-in styling presets (such as `mesh`, `gradient`, `cyberpunk`, `aurora`, `sunset`, `studio`, and `default`).
84
+ ### 2. Built-in Presets
88
85
 
89
- To view the full list of available presets and their descriptions, run:
86
+ Imagerry includes curated visual presets (e.g. `mesh`, `gradient`, `cyberpunk`, `default`).
90
87
 
88
+ To list all available presets from your terminal:
91
89
  ```bash
92
90
  imagerry --list-presets
93
91
  ```
94
92
 
95
- Once you've found a style you like, apply it using the `--preset` flag:
93
+ All presets and configuration properties are documented in the **[JSON Schema](https://imagerry.com/schema/config.json)**.
96
94
 
95
+ Apply a preset:
97
96
  ```bash
98
- imagerry -i input.png -o output.png --preset=mesh
97
+ imagerry -i app.png -o app-styled.webp --preset mesh
99
98
  ```
100
99
 
101
- ## Custom JSON Presets
100
+ ### 3. Direct CLI Styling Flags (No JSON Required)
102
101
 
103
- For complete control over every visual attribute, Imagerry supports custom JSON presets matching the full capabilities of the image customizer engine.
104
-
105
- ### 1. Export a preset template
106
-
107
- Generate a starting configuration with all supported settings:
102
+ Easily adjust individual visual parameters without touching preset files:
108
103
 
109
104
  ```bash
110
- imagerry --export-preset-template=my-style.json
105
+ imagerry -i screenshot.png -o screenshot.webp \
106
+ --preset mesh \
107
+ --padding 40 \
108
+ --radius 20 \
109
+ --shadow 60 \
110
+ --bg-color "#0a0a0a" \
111
+ --ratio 16:9 \
112
+ --watermark "© 2026 Acme Corp"
111
113
  ```
112
114
 
113
- Edit `my-style.json` with your preferred settings.
115
+ Supported direct flags:
116
+ - `--padding <number>`: Canvas padding percent (e.g. `24`, `40`, `50`)
117
+ - `--radius <number>`: Inner image corner radius (e.g. `12`, `16`, `24`)
118
+ - `--shadow <number>`: Drop shadow strength (e.g. `30`, `50`, `70`)
119
+ - `--bg-color <hex>`: Solid background color (e.g. `"#000000"`, `"#18181b"`)
120
+ - `--ratio <ratio>`: Aspect ratio (`"16:9"`, `"1:1"`, `"4:3"`, `"auto"`)
121
+ - `--watermark <text>`: Watermark text overlay
122
+ - `--title <text>` & `--subtitle <text>`: Header overlay text
123
+ - `--blur <number>`, `--contrast <number>`, `--brightness <number>`, `--saturation <number>`
114
124
 
115
- ### 2. Apply a preset file
125
+ ### 4. Batch & Directory Processing
126
+
127
+ Process an entire folder of screenshots or images in one command:
116
128
 
117
129
  ```bash
118
- imagerry \
119
- -i input.png \
120
- -o output.png \
121
- -m image-customizer \
122
- --preset my-style.json
130
+ # Process all images in a directory to ./dist
131
+ imagerry -i ./screenshots -o ./dist --preset mesh --format webp
132
+
133
+ # Batch process with wildcard pattern
134
+ imagerry --batch "assets/*.png" -o ./dist --preset gradient --quality 85
135
+
136
+ # Adjust parallel worker concurrency
137
+ imagerry -i ./raw-photos -o ./compressed --preset studio --concurrency 6
123
138
  ```
124
139
 
125
- ### 3. Pass JSON directly
140
+ ### 5. Project Configuration (`imagerry.config.json`)
126
141
 
127
- For simple configurations, you can provide the preset directly from the terminal:
142
+ Standardize visual branding across team members and repositories. Initialize a configuration file in your project root:
128
143
 
129
144
  ```bash
130
- imagerry \
131
- -i input.png \
132
- -o output.png \
133
- -m image-customizer \
134
- --preset '{"padding": 64, "bgColor": "#000000"}'
145
+ imagerry init --preset mesh
135
146
  ```
136
147
 
137
- This can be useful for scripts where creating a separate preset file would add unnecessary complexity.
148
+ This creates an `imagerry.config.json`:
149
+ ```json
150
+ {
151
+ "$schema": "https://imagerry.com/schema/config.json",
152
+ "preset": "mesh",
153
+ "format": "webp",
154
+ "quality": 90,
155
+ "padding": 36,
156
+ "borderRadius": 16,
157
+ "shadowSize": 50,
158
+ "canvasRatio": "auto"
159
+ }
160
+ ```
161
+
162
+ Whenever you run `imagerry -i input.png -o output.webp`, the CLI automatically detects and applies your project configuration!
138
163
 
139
- ## Command Reference
164
+ ### 6. Custom JSON Presets
140
165
 
141
- To view all available commands, options, and examples:
166
+ For full control over every setting, export and customize template JSON files:
142
167
 
143
168
  ```bash
144
- imagerry -h
169
+ # Export template
170
+ imagerry --export-preset-template=my-style.json
171
+
172
+ # Apply template
173
+ imagerry -i input.png -o output.png --preset my-style.json
145
174
  ```
146
175
 
147
- ## API Server
176
+ ---
148
177
 
149
- Imagerry CLI includes a built-in Express server that allows you to self-host the engine as a REST API. You can host this on Railway, Render, or any VPS.
178
+ ## API Server
150
179
 
151
- To start the API server:
180
+ Self-host the Imagerry engine as a high-performance REST API:
152
181
 
153
182
  ```bash
154
183
  imagerry serve --port 5273
155
184
  ```
156
- *(Note: A valid `IMAGERRY_LICENSE_KEY` environment variable or `--license-key` flag is required to start the server).*
157
-
158
- ### API Example
185
+ *(Requires `IMAGERRY_LICENSE_KEY`)*
159
186
 
160
- Send a `multipart/form-data` POST request to process an image instantly over HTTP:
187
+ ### Processing via HTTP:
161
188
 
162
189
  ```bash
163
190
  curl -f -X POST http://localhost:5273/api/v1/process \
164
- -F "image=@/path/to/your/input.png" \
165
- -F 'preset={"padding": 64, "bgColor": "#18181b"}' \
166
- --output result.png
191
+ -F "image=@/path/to/screenshot.png" \
192
+ -F "preset=mesh" \
193
+ -F "format=webp" \
194
+ -F "quality=85" \
195
+ -F "padding=40" \
196
+ --output result.webp
167
197
  ```
168
198
 
169
- > [!WARNING]
170
- > We strongly recommend including the `-f` (or `--fail-with-body`) flag when using `curl` with `--output`. If the API returns an error, this flag prevents `curl` from saving the JSON error response directly into your output image file, which would result in a corrupted image.
171
-
172
- ### API Documentation
199
+ Helpful metadata endpoints:
200
+ - `GET /presets` List built-in presets
201
+ - `GET /template` — Full JSON template structure
202
+ - `GET /health` — Server health status and version
173
203
 
174
- Explore the full API documentation, parameter specifications, and integration guides at **[imagerry.com/cli/docs/serve-api](https://imagerry.com/cli/docs)**.
175
-
176
- The server also exposes helpful informational routes:
177
-
178
- - `GET /presets` — Returns a JSON array of all built-in named presets.
179
- - `GET /template` — Returns a JSON object of all available settings keys and their defaults.
180
- - `GET /health` — Returns server health status and engine version.
204
+ ---
181
205
 
182
206
  ## Model Context Protocol (MCP) Server
183
207
 
184
- 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.
208
+ Imagerry CLI includes a built-in MCP server enabling AI coding assistants (Claude Desktop, Cursor, Zed) to style, format, and batch-process local images autonomously.
185
209
 
186
- ### Starting the MCP Server
210
+ ### Starting MCP:
187
211
 
188
212
  ```bash
189
213
  imagerry mcp
190
214
  ```
191
215
 
192
- ### Claude Desktop Configuration
193
-
194
- Add the following to your `claude_desktop_config.json`:
216
+ ### Configuration (`claude_desktop_config.json`):
195
217
 
196
218
  ```json
197
219
  {
@@ -207,45 +229,19 @@ Add the following to your `claude_desktop_config.json`:
207
229
  }
208
230
  ```
209
231
 
210
- ### Registered Tools
211
- * **`customize_image`**: Applies presets, gradients, and custom styles to local images (`inputPath`, `outputPath`, `preset`, `mode`).
212
-
213
- ## Automation
214
-
215
- Imagerry CLI is designed to work well in automated environments.
216
-
217
- For example, you can provide your license through an environment variable:
218
-
219
- ```bash
220
- export IMAGERRY_LICENSE_KEY="YOUR_KEY"
221
-
222
- imagerry \
223
- -i input.png \
224
- -o output.png \
225
- --preset=gradient
226
- ```
227
-
228
- When using a CI provider, store `IMAGERRY_LICENSE_KEY` as a secret rather than committing the license key to your repository.
232
+ ### Available AI Tools:
233
+ 1. **`customize_image`**: Format and style single images with preset, padding, radius, format (`webp`, `jpeg`, `png`), and quality.
234
+ 2. **`batch_customize_images`**: Process entire directories in bulk for agents generating assets.
235
+ 3. **`list_presets`**: Query descriptions of all available styling presets.
229
236
 
230
- > [!WARNING]
231
- > Never commit your Imagerry license key to Git or include it directly in a public workflow configuration.
237
+ ---
232
238
 
233
- ## Troubleshooting
239
+ ## Troubleshooting & Privacy
234
240
 
235
- ### License issues
236
-
237
- If your license cannot be verified, double-check that your key is valid and it belongs to Imagerry. If you lost your key or need help, please contact us at **support@imagerry.com**.
238
-
239
- ## Privacy
240
-
241
- Your source images stay on your machine or your own hosted server.
242
-
243
- Imagerry CLI processes and renders all images locally. Images do not need to be uploaded to Imagerry or any external image-processing server.
244
-
245
- The CLI only communicates with the licensing service when verifying your Imagerry Pro license.
241
+ - **Image Security**: All image manipulation is performed in-memory on your local CPU/GPU using native Skia bindings (`@napi-rs/canvas`). Your images are **never transmitted over the network**.
242
+ - **Licensing**: For support or key inquiries, contact **support@imagerry.com**.
246
243
 
247
244
  ## Links
248
-
249
- * [Imagerry](https://imagerry.com)
245
+ * [Imagerry Official Website](https://imagerry.com)
250
246
  * [Imagerry Pro](https://imagerry.com/pro)
251
- * [Legal & Terms](https://imagerry.com/legal)
247
+ * [Legal & Privacy Terms](https://imagerry.com/legal)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imagerry/cli",
3
- "version": "0.1.9-beta",
3
+ "version": "0.2.0-beta",
4
4
  "description": "Command-line interface for the Imagerry engine",
5
5
  "homepage": "https://cli.imagerry.com",
6
6
  "repository": {
@@ -23,13 +23,13 @@
23
23
  "imagerry": "bin/imagerry.js"
24
24
  },
25
25
  "optionalDependencies": {
26
- "@imagerry/cli-android-arm64": "0.1.9-beta",
27
- "@imagerry/cli-darwin-arm64": "0.1.9-beta",
28
- "@imagerry/cli-darwin-x64": "0.1.9-beta",
29
- "@imagerry/cli-linux-arm64": "0.1.9-beta",
30
- "@imagerry/cli-linux-x64": "0.1.9-beta",
31
- "@imagerry/cli-win32-arm64": "0.1.9-beta",
32
- "@imagerry/cli-win32-x64": "0.1.9-beta"
26
+ "@imagerry/cli-android-arm64": "0.2.0-beta",
27
+ "@imagerry/cli-darwin-arm64": "0.2.0-beta",
28
+ "@imagerry/cli-darwin-x64": "0.2.0-beta",
29
+ "@imagerry/cli-linux-arm64": "0.2.0-beta",
30
+ "@imagerry/cli-linux-x64": "0.2.0-beta",
31
+ "@imagerry/cli-win32-arm64": "0.2.0-beta",
32
+ "@imagerry/cli-win32-x64": "0.2.0-beta"
33
33
  },
34
34
  "keywords": [
35
35
  "image",
@@ -45,6 +45,6 @@
45
45
  "author": "Imagerry <support@imagerry.com>",
46
46
  "license": "SEE LICENSE IN LICENSE.md",
47
47
  "imagerry": {
48
- "minimumVersion": "0.1.7-beta"
48
+ "minimumVersion": "0.2.0-beta"
49
49
  }
50
50
  }