@mynthio/cli 0.0.21 → 0.0.23
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 +51 -28
- package/dist/bin.js +2602 -9
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -62,22 +62,22 @@ mynth image generate -p "A watercolor city skyline" --size 16:9 --count 2 -o ./o
|
|
|
62
62
|
mynth image generate -p "A neon koi pond" --magic-prompt --format png
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
| Flag | Purpose
|
|
66
|
-
| ------------------------- |
|
|
67
|
-
| `-p, --prompt` | Prompt.
|
|
68
|
-
| `-n, --negative` | Negative prompt.
|
|
69
|
-
| `--magic-prompt` | Let Mynth expand the prompt before generating. Off by default.
|
|
70
|
-
| `-m, --model` | Model ID. Defaults to `auto`. See `mynth models list`.
|
|
71
|
-
| `-s, --size` | Preset or aspect ratio: `square`, `landscape`, `16:9`, `16:9_4k`, `auto`, …
|
|
72
|
-
| `-c, --count` | Images per request.
|
|
73
|
-
| `-f, --format` | `png`, `jpg`, or `webp`.
|
|
74
|
-
| `-i, --input` | Input image as `[role:]path-or-url`, repeatable. Roles: `auto`, `
|
|
75
|
-
| `-o, --output-dir` | Download the results into this directory.
|
|
76
|
-
| `--destination` | Deliver to a configured storage destination. Defaults to `MYNTH_DESTINATION`.
|
|
77
|
-
| `--content-rating` | Classify each image `sfw`/`nsfw`. Use `--level` for custom levels.
|
|
78
|
-
| `--webhook-url` | Deliver this task's events to a URL (repeatable).
|
|
79
|
-
| `--no-dashboard-webhooks` | Skip dashboard-configured webhooks for this task.
|
|
80
|
-
| `--metadata` | Inline JSON attached to the task.
|
|
65
|
+
| Flag | Purpose |
|
|
66
|
+
| ------------------------- | -------------------------------------------------------------------------------------- |
|
|
67
|
+
| `-p, --prompt` | Prompt. |
|
|
68
|
+
| `-n, --negative` | Negative prompt. |
|
|
69
|
+
| `--magic-prompt` | Let Mynth expand the prompt before generating. Off by default. |
|
|
70
|
+
| `-m, --model` | Model ID. Defaults to `auto`. See `mynth models list`. |
|
|
71
|
+
| `-s, --size` | Preset or aspect ratio: `square`, `landscape`, `16:9`, `16:9_4k`, `auto`, … |
|
|
72
|
+
| `-c, --count` | Images per request. |
|
|
73
|
+
| `-f, --format` | `png`, `jpg`, or `webp`. |
|
|
74
|
+
| `-i, --input` | Input image as `[role:]path-or-url`, repeatable. Roles: `auto`, `source`, `reference`. |
|
|
75
|
+
| `-o, --output-dir` | Download the results into this directory. |
|
|
76
|
+
| `--destination` | Deliver to a configured storage destination. Defaults to `MYNTH_DESTINATION`. |
|
|
77
|
+
| `--content-rating` | Classify each image `sfw`/`nsfw`. Use `--level` for custom levels. |
|
|
78
|
+
| `--webhook-url` | Deliver this task's events to a URL (repeatable). |
|
|
79
|
+
| `--no-dashboard-webhooks` | Skip dashboard-configured webhooks for this task. |
|
|
80
|
+
| `--metadata` | Inline JSON attached to the task. |
|
|
81
81
|
|
|
82
82
|
Local paths passed to `-i` are uploaded first; `https://` inputs are used as-is.
|
|
83
83
|
|
|
@@ -123,6 +123,26 @@ is why they are most useful alongside `--type`.
|
|
|
123
123
|
`--capability` matches the modes a model actually serves, so a model that both takes a prompt and
|
|
124
124
|
accepts images matches `txt2img` and `img2img` alike.
|
|
125
125
|
|
|
126
|
+
## Removing backgrounds
|
|
127
|
+
|
|
128
|
+
Takes one URL or one local file. Mynth picks the model:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
mynth image remove-background https://cdn.example.com/product.jpg
|
|
132
|
+
mynth image remove-background ./shot.jpg --format webp -o ./out
|
|
133
|
+
mynth image remove-background ./shot.jpg --destination bunny-prod --async --json
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
| Flag | Purpose |
|
|
137
|
+
| ------------------------- | ----------------------------------------------------------------------------- |
|
|
138
|
+
| `-f, --format` | `png` or `webp`. Defaults to whatever the provider returns. |
|
|
139
|
+
| `-o, --output-dir` | Download the result into this directory. |
|
|
140
|
+
| `--destination` | Deliver to a configured storage destination. Defaults to `MYNTH_DESTINATION`. |
|
|
141
|
+
| `--webhook-url` | Deliver this task's events to a URL (repeatable). |
|
|
142
|
+
| `--no-dashboard-webhooks` | Skip dashboard-configured webhooks for this task. |
|
|
143
|
+
| `--metadata` | Inline JSON attached to the task. |
|
|
144
|
+
| `--async` | Print the task ID and a public access token instead of waiting. |
|
|
145
|
+
|
|
126
146
|
## Analyzing images
|
|
127
147
|
|
|
128
148
|
Every analysis command takes one URL or one local file, and waits for the result:
|
|
@@ -217,19 +237,22 @@ mynth webhook delete whk_... --yes
|
|
|
217
237
|
The signing secret is printed once, on create, and cannot be retrieved again.
|
|
218
238
|
|
|
219
239
|
By default a webhook only receives tasks created with an **API key** — that matches where webhooks
|
|
220
|
-
are actually consumed, on a server.
|
|
221
|
-
|
|
240
|
+
are actually consumed, on a server. Tasks from this CLI carry the key from `auth login`, so they
|
|
241
|
+
deliver on the default. Pass `--oauth-events` to also receive tasks that have no API key, such as
|
|
242
|
+
playground runs.
|
|
222
243
|
|
|
223
244
|
## Documentation
|
|
224
245
|
|
|
225
246
|
```bash
|
|
226
|
-
mynth docs get
|
|
247
|
+
mynth docs get concepts/tasks
|
|
227
248
|
mynth docs list
|
|
228
|
-
mynth docs get reference/
|
|
249
|
+
mynth docs get api-reference/webhook-payloads --json
|
|
229
250
|
```
|
|
230
251
|
|
|
231
|
-
|
|
232
|
-
|
|
252
|
+
Pages come from `https://mynth.io/docs/<path>.md` and the index from `https://mynth.io/llms.txt`.
|
|
253
|
+
Set `MYNTH_DOCS_URL` to read another host. Paths take an optional leading slash and must not
|
|
254
|
+
include the `.md` suffix. `index` is the introduction. Documentation commands need no
|
|
255
|
+
authentication.
|
|
233
256
|
|
|
234
257
|
## Exit codes
|
|
235
258
|
|
|
@@ -253,7 +276,7 @@ failure exits 1.
|
|
|
253
276
|
| Variable | Effect |
|
|
254
277
|
| --------------------- | ---------------------------------------------------------- |
|
|
255
278
|
| `MYNTH_API_KEY` | API key; takes precedence over stored credentials |
|
|
256
|
-
| `MYNTH_DESTINATION` | Default `--destination` for image
|
|
279
|
+
| `MYNTH_DESTINATION` | Default `--destination` for image commands |
|
|
257
280
|
| `MYNTH_DEBUG=1` | Print stack traces and error causes to stderr |
|
|
258
281
|
| `MYNTH_NO_KEYCHAIN=1` | Store credentials in a file instead of the system keychain |
|
|
259
282
|
| `MYNTH_API_URL` | Override the API base URL |
|
|
@@ -263,11 +286,11 @@ failure exits 1.
|
|
|
263
286
|
|
|
264
287
|
```bash
|
|
265
288
|
cd packages/cli
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
289
|
+
pnpm install
|
|
290
|
+
pnpm dev --help # run from source (Node 24 strips the types)
|
|
291
|
+
pnpm build # bundle to dist/bin.js
|
|
292
|
+
pnpm test
|
|
293
|
+
pnpm typecheck
|
|
271
294
|
```
|
|
272
295
|
|
|
273
296
|
### Layout
|