@pollinations/cli 0.1.19 → 0.1.21
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 +19 -3
- package/SKILL.md +42 -4
- package/dist/index.js +1677 -445
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,9 @@ polli auth login # device-flow via enter.pollinations.ai
|
|
|
35
35
|
printf '%s' "$POLLINATIONS_API_KEY" | polli auth login --with-token
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Credentials land at `~/.pollinations/credentials.json`. For one-off runs pass `--key sk_
|
|
38
|
+
Credentials land at `~/.pollinations/credentials.json`. For one-off runs pass `--key sk_...`. Get keys at [enter.pollinations.ai](https://enter.pollinations.ai/keys).
|
|
39
|
+
|
|
40
|
+
Set `POLLINATIONS_ENV=staging` to use the staging API, with a separate login stored in `~/.pollinations/credentials.staging.json`. `polli upload` has no staging.
|
|
39
41
|
|
|
40
42
|
```bash
|
|
41
43
|
polli update # npm install -g @pollinations/cli@latest, if installed globally
|
|
@@ -57,7 +59,13 @@ polli gen image "enhance this" --image https://media.pollinations.ai/abc --model
|
|
|
57
59
|
|
|
58
60
|
polli gen audio "Hello world" --voice nova --output speech.mp3
|
|
59
61
|
polli gen audio "read it to me" --play # plays back after saving (blocks until done)
|
|
62
|
+
polli gen audio "Hello world" --timestamps # also saves speech.mp3.json with character timings
|
|
60
63
|
polli gen video "a waterfall in slow motion" --duration 5 --output clip.mp4
|
|
64
|
+
polli gen 3d "a red fox" --output fox.glb
|
|
65
|
+
polli gen 3d --image https://media.pollinations.ai/abc --resolution high
|
|
66
|
+
polli gen embeddings "first text" "second text" # one vector per line
|
|
67
|
+
polli gen voice-change talk.mp3 --voice nova
|
|
68
|
+
polli gen isolate interview.mp4 # strip music/noise, keep speech
|
|
61
69
|
polli gen transcribe speech.mp3
|
|
62
70
|
|
|
63
71
|
polli gen chat --model openai # interactive multi-turn
|
|
@@ -69,7 +77,7 @@ polli gen chat --model openai # interactive multi-turn
|
|
|
69
77
|
|
|
70
78
|
```bash
|
|
71
79
|
polli models # all models
|
|
72
|
-
polli models --type image # filter
|
|
80
|
+
polli models --type image # filter (text, image, audio, video, 3d, embedding)
|
|
73
81
|
polli models --stats # health + perf (last 60m)
|
|
74
82
|
polli docs # full API reference in the terminal
|
|
75
83
|
polli docs /image # one endpoint
|
|
@@ -137,12 +145,17 @@ Point an agentic coding tool at Pollinations. `on` logs in if needed, mints a
|
|
|
137
145
|
key for the harness, backs up its config, and writes the provider; `off`
|
|
138
146
|
restores the backup.
|
|
139
147
|
|
|
148
|
+
The default is `openai/gpt-6-sol`; pass `--model <id>` to choose another model.
|
|
149
|
+
Bloom is key-only and keeps its own model selection.
|
|
150
|
+
|
|
140
151
|
```bash
|
|
141
152
|
polli harness --help # supported harnesses
|
|
142
153
|
polli harness bloom on # creates a dedicated key for Bloom CLI
|
|
143
154
|
polli harness dsh on # DeepSeek Harness → Pollinations
|
|
144
155
|
polli harness dsh on --model moonshotai/kimi-k2.6
|
|
145
156
|
polli harness dsh on --no-mcp # skip MCP tool configuration
|
|
157
|
+
polli harness hermes on # adds the Pollinations provider + Polli skill to Hermes Agent
|
|
158
|
+
polli harness hermes on --model deepseek/deepseek-v4-flash
|
|
146
159
|
polli harness opencode on # enables the Pollinations OpenCode plugin + default model
|
|
147
160
|
polli harness openclaw on # adds the Pollinations provider + Polli skill to OpenClaw
|
|
148
161
|
polli harness pi on # native provider, key, startup model, and Polli skill
|
|
@@ -155,7 +168,10 @@ polli harness <harness> off
|
|
|
155
168
|
Bloom stores its dedicated key in `$BLOOM_HOME/.env` (default `~/.bloom/.env`).
|
|
156
169
|
tgpt stores its provider, dedicated key, and model in `~/.config/tgpt/config.conf`.
|
|
157
170
|
The DSH adapter configures the Pollinations provider, hosted Pollinations MCP,
|
|
158
|
-
and Polli CLI skill globally under `$DSH_HOME` (default `~/.dsh`).
|
|
171
|
+
and Polli CLI skill globally under `$DSH_HOME` (default `~/.dsh`). Hermes Agent
|
|
172
|
+
stores its provider and skill under `$HERMES_HOME` (default `~/.hermes`, or
|
|
173
|
+
`%LOCALAPPDATA%\hermes` on Windows) and discovers the live Pollinations models;
|
|
174
|
+
install its hosted MCP servers with `polli mcp install hermes --all`. OpenCode uses
|
|
159
175
|
its official plugin; OpenClaw uses `openclaw.json`, while Pi and Prime Agent use
|
|
160
176
|
their native `models.json` provider support.
|
|
161
177
|
|
package/SKILL.md
CHANGED
|
@@ -33,10 +33,15 @@ If `polli` is not installed, run `npm i -g @pollinations/cli@latest` (provides t
|
|
|
33
33
|
| One-shot TTS | `polli gen audio "<text>" --output speech.mp3` |
|
|
34
34
|
| Speak out loud | `polli gen audio "<text>" --play` (uses `afplay` on macOS; `ffplay`/`mpv`/`mpg123` on Linux) |
|
|
35
35
|
| Generate video | `polli gen video "<prompt>" --output out.mp4` |
|
|
36
|
+
| Generate a 3D model | `polli gen 3d "<prompt>" --output out.glb` (or `--image <url>` for image-only models) |
|
|
37
|
+
| Embed text | `polli gen embeddings "<text>" ["<text2>" ...]` (one vector per line; also reads stdin) |
|
|
38
|
+
| Change a voice | `polli gen voice-change talk.mp3 --voice nova` |
|
|
39
|
+
| Isolate speech | `polli gen isolate interview.mp4` (strips music/noise) |
|
|
40
|
+
| Speech + character timings | `polli gen audio "<text>" --timestamps` (also writes `speech.mp3.json`) |
|
|
36
41
|
| Transcribe audio | `polli gen transcribe path/to.mp3` |
|
|
37
42
|
| Upload a local file | `polli upload path/to.png` (prints public URL) |
|
|
38
43
|
| List all models | `polli models` |
|
|
39
|
-
| Filter models by type | `polli models --type image` |
|
|
44
|
+
| Filter models by type | `polli models --type image` (text, image, audio, video, 3d, embedding) |
|
|
40
45
|
| Model health + latency | `polli models --stats` (default 60m, `--window <min>`) |
|
|
41
46
|
| Check balance | `polli usage` |
|
|
42
47
|
| Developer earnings | `polli earnings` (`--days <n>`, max 90) |
|
|
@@ -44,7 +49,7 @@ If `polli` is not installed, run `npm i -g @pollinations/cli@latest` (provides t
|
|
|
44
49
|
| Manage prompt agents | `polli agents list` |
|
|
45
50
|
| Manage invite-only community models | `polli my-models list` |
|
|
46
51
|
| Update the CLI | `polli update` (global installs only; npx/local get instructions) |
|
|
47
|
-
| Connect a coding harness to Pollinations | `polli harness <bloom\|dsh\|opencode\|openclaw\|pi\|prime\|tgpt> on` (available adapters: `polli harness --help`) |
|
|
52
|
+
| Connect a coding harness to Pollinations | `polli harness <bloom\|dsh\|hermes\|opencode\|openclaw\|pi\|prime\|tgpt> on` (available adapters: `polli harness --help`) |
|
|
48
53
|
| Machine-readable output | append `--json` to any command |
|
|
49
54
|
|
|
50
55
|
## Setup
|
|
@@ -53,6 +58,7 @@ One-time: `polli auth login` (device-flow; creates a key with `profile`, `usage`
|
|
|
53
58
|
`printf '%s' "$POLLINATIONS_API_KEY" | polli auth login --with-token`. Verify
|
|
54
59
|
with `polli auth status` (or `polli whoami`).
|
|
55
60
|
Override the stored key for a single command with `--key <key>`.
|
|
61
|
+
Prefix any command with `POLLINATIONS_ENV=staging` to use staging; it keeps its own login, so run `POLLINATIONS_ENV=staging polli auth login` once.
|
|
56
62
|
|
|
57
63
|
## Recipes
|
|
58
64
|
|
|
@@ -126,7 +132,34 @@ Cheapest path: `--model wan-fast` at ~$0.01/sec, **fixed 5-second output** (any
|
|
|
126
132
|
|
|
127
133
|
**Flag support varies per model and is not enforced client-side.** `--duration`, `--aspect-ratio`, and `--audio` are forwarded to the server but may be silently ignored — verified on `wan-fast` where duration is locked to 5s, `--aspect-ratio 9:16` still returns 16:9, and `--audio` produces no audio track. Always inspect the output (`file`, `ffprobe`) before trusting a flag worked. Check `polli models --type video --json` for per-model capabilities.
|
|
128
134
|
|
|
129
|
-
**Video is not tracked by `--stats`.** `polli models --type video --stats` returns empty — the stats pipe only records text/image/audio events. To compare video models, fall back to `polli models --type video --json` and look at price/description fields.
|
|
135
|
+
**Video is not tracked by `--stats`.** `polli models --type video --stats` returns empty — the stats pipe only records text/image/audio events. To compare video models, fall back to `polli models --type video --json` and look at price/description fields. The same applies to `--type 3d`.
|
|
136
|
+
|
|
137
|
+
### Generate a 3D model
|
|
138
|
+
```bash
|
|
139
|
+
polli gen 3d "a red fox" --output fox.glb
|
|
140
|
+
polli gen 3d --image https://media.pollinations.ai/abc --resolution high
|
|
141
|
+
```
|
|
142
|
+
`--model` defaults to `hyper3d/rodin-2.5` for a text-only prompt and `microsoft/trellis-2` once `--image <url>` is given (public http(s), upload local files first with `polli upload`) — `trellis-2` is **image-to-3D only** and rejects a bare prompt. `--resolution low|medium|high` only affects `trellis-2`. The output extension is inferred from the response's `Content-Type`, not the model name: `nvidia/asset-harvester` returns a Gaussian Splat `.ply`, everything else returns `.glb`. `hyper3d/rodin-2.5` and `nvidia/asset-harvester` require Paid Pollen.
|
|
143
|
+
|
|
144
|
+
### Generate embeddings
|
|
145
|
+
```bash
|
|
146
|
+
polli gen embeddings "first text" "second text" --model google/gemini-embedding-2
|
|
147
|
+
printf 'first\nsecond\n' | polli gen embeddings # one input per stdin line
|
|
148
|
+
```
|
|
149
|
+
Prints one JSON array per input, in input order, one per line (pipe/`jq`-friendly). `--dimensions <n>` (128-4096), `--task-type` (Gemini retrieval hint), and `--input-type query|document` (Cohere) are optional. `--json` prints the full response including `usage`.
|
|
150
|
+
|
|
151
|
+
### Change or isolate a voice
|
|
152
|
+
```bash
|
|
153
|
+
polli gen voice-change talk.mp3 --voice nova --format wav
|
|
154
|
+
polli gen isolate interview.mp4
|
|
155
|
+
```
|
|
156
|
+
`voice-change` re-speaks a **local** audio file in another voice (preset name or ElevenLabs voice ID) — default output `voice.<format>`. `isolate` strips music/background noise from local audio **or video**, keeping only speech — default output `isolated.mp3`. Both upload the file as multipart form data; ElevenLabs requires **at least 4.6 seconds** of audio for isolation, shorter clips fail with the API's `audio_too_short` error.
|
|
157
|
+
|
|
158
|
+
### Speech with character-level timestamps
|
|
159
|
+
```bash
|
|
160
|
+
polli gen audio "Hello world" --timestamps
|
|
161
|
+
```
|
|
162
|
+
Saves the audio as usual (`speech.mp3` by default) and appends `.json` to its path for the `alignment`/`normalized_alignment` character timings. Only `elevenlabs/eleven-v3`, `elevenlabs/eleven-flash-v2.5`, and `elevenlabs/eleven-multilingual-v2` support this — other models fail with the API's error message.
|
|
130
163
|
|
|
131
164
|
### Transcribe audio to text
|
|
132
165
|
```bash
|
|
@@ -209,6 +242,8 @@ polli keys revoke <id> # id comes fr
|
|
|
209
242
|
`--permissions <perms...>` scopes what the new key can do on the account (e.g. `profile usage` lets it call `polli --key <new> usage`). **Without `--permissions`, new scoped keys can generate media but cannot read account state** — `polli --key <new> usage` will 403. Include `keys` to let the new key create, list, and revoke keys itself. Existing keys with `account:keys` can manage my-models where that invite-only feature is enabled, but still need `account:usage` for read-only account state. Publishable app keys default developer earnings off; pass `--earnings` to enable them. To inspect a specific key other than the current one, use `polli keys list --json | jq '.[] | select(.id == "<id>")'`. `keys info` is intentionally scoped to the caller's own key.
|
|
210
243
|
|
|
211
244
|
### Connect a coding harness
|
|
245
|
+
Polli defaults to `openai/gpt-6-sol`; `--model <id>` overrides it. Bloom is key-only and keeps its own model selection.
|
|
246
|
+
|
|
212
247
|
```bash
|
|
213
248
|
polli harness --help # supported harnesses
|
|
214
249
|
polli harness bloom on # create a dedicated key for Bloom CLI
|
|
@@ -216,6 +251,9 @@ polli harness dsh on # login if needed, mint key "polli-harness-d
|
|
|
216
251
|
polli harness dsh on --model moonshotai/kimi-k2.6 # use the model ID from `polli models`
|
|
217
252
|
polli harness dsh on --no-mcp # configure the provider and skill without MCP tools
|
|
218
253
|
polli harness dsh off # restore the config backed up before "on"
|
|
254
|
+
polli harness hermes on # login if needed, mint key "polli-harness-hermes", add provider + Polli skill
|
|
255
|
+
polli harness hermes on --model deepseek/deepseek-v4-flash # use the model ID from `polli models`
|
|
256
|
+
polli harness hermes off # restore the config backed up before "on"
|
|
219
257
|
polli harness opencode on # enable the Pollinations OpenCode plugin
|
|
220
258
|
polli harness opencode off # remove the plugin setup and stored key
|
|
221
259
|
polli harness pi on # login if needed, mint key "polli-harness-pi", configure Pi with Pollinations
|
|
@@ -226,7 +264,7 @@ polli harness openclaw off # remove the Pollinations provider, key, and
|
|
|
226
264
|
polli harness tgpt on # use tgpt's Pollinations provider with a dedicated key
|
|
227
265
|
polli harness tgpt off # restore tgpt's previous configuration
|
|
228
266
|
```
|
|
229
|
-
Each adapter checks that its harness can be launched before login, key creation, or configuration. DSH's official launch uses `npx`, so its adapter checks for `npx`; Bloom, OpenCode, OpenClaw, Pi, and tgpt require their installed commands.
|
|
267
|
+
Each adapter checks that its harness can be launched before login, key creation, or configuration. DSH's official launch uses `npx`, so its adapter checks for `npx`; Bloom, Hermes Agent, OpenCode, OpenClaw, Pi, and tgpt require their installed commands.
|
|
230
268
|
|
|
231
269
|
Bloom already uses Pollinations and only needs a dedicated key in `$BLOOM_HOME/.env` (default `~/.bloom/.env`). tgpt's existing Pollinations provider is selected in `~/.config/tgpt/config.conf` with a dedicated key and model. The DSH adapter globally configures the Pollinations provider, hosted Pollinations MCP, and this skill under `$DSH_HOME` (default `~/.dsh`). OpenCode enables the existing Pollinations plugin and stores its dedicated key in the plugin config. OpenClaw adds a `pollinations` provider to `~/.openclaw/openclaw.json`, stores a dedicated key in `env.vars`, and installs this skill under `~/.openclaw/skills/polli/`. Pi writes `~/.pi/agent/models.json`, `auth.json`, and `settings.json`, and installs this skill under `~/.pi/agent/skills/polli/`. Guide: `polli docs` section "Coding Harnesses".
|
|
232
270
|
|