@pollinations/cli 0.1.16 → 0.1.17
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 +3 -1
- package/SKILL.md +8 -6
- package/dist/index.js +890 -43
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Every command is agent-friendly:
|
|
|
25
25
|
- `--json` — structured stdout, human messages to stderr. Safe to parse.
|
|
26
26
|
- Exit code `0` on success, non-zero on error.
|
|
27
27
|
- When a call runs out of pollen, the first line of the error is the top-up link.
|
|
28
|
-
- `polli auth status --json` exposes everything about the current session.
|
|
28
|
+
- `polli auth status --json` (or `polli whoami --json`) exposes everything about the current session.
|
|
29
29
|
|
|
30
30
|
## Get started
|
|
31
31
|
|
|
@@ -147,11 +147,13 @@ polli harness opencode on # enables the Pollinations OpenCode plugin + d
|
|
|
147
147
|
polli harness openclaw on # adds the Pollinations provider + Polli skill to OpenClaw
|
|
148
148
|
polli harness pi on # native provider, key, startup model, and Polli skill
|
|
149
149
|
polli harness prime on # native Prime Agent provider support
|
|
150
|
+
polli harness tgpt on # authenticated Pollinations text models in tgpt
|
|
150
151
|
polli harness <harness> status
|
|
151
152
|
polli harness <harness> off
|
|
152
153
|
```
|
|
153
154
|
|
|
154
155
|
Bloom stores its dedicated key in `$BLOOM_HOME/.env` (default `~/.bloom/.env`).
|
|
156
|
+
tgpt stores its provider, dedicated key, and model in `~/.config/tgpt/config.conf`.
|
|
155
157
|
The DSH adapter configures the Pollinations provider, hosted Pollinations MCP,
|
|
156
158
|
and Polli CLI skill globally under `$DSH_HOME` (default `~/.dsh`). OpenCode uses
|
|
157
159
|
its official plugin; OpenClaw uses `openclaw.json`, while Pi and Prime Agent use
|
package/SKILL.md
CHANGED
|
@@ -44,14 +44,14 @@ If `polli` is not installed, run `npm i -g @pollinations/cli@latest` (provides t
|
|
|
44
44
|
| Manage prompt agents | `polli agents list` |
|
|
45
45
|
| Manage invite-only community models | `polli my-models list` |
|
|
46
46
|
| 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> on` (available adapters: `polli harness --help`) |
|
|
47
|
+
| Connect a coding harness to Pollinations | `polli harness <bloom\|dsh\|opencode\|openclaw\|pi\|prime\|tgpt> on` (available adapters: `polli harness --help`) |
|
|
48
48
|
| Machine-readable output | append `--json` to any command |
|
|
49
49
|
|
|
50
50
|
## Setup
|
|
51
51
|
|
|
52
52
|
One-time: `polli auth login` (device-flow; creates a key with `profile`, `usage`, and `keys`). To store an existing key, run
|
|
53
53
|
`printf '%s' "$POLLINATIONS_API_KEY" | polli auth login --with-token`. Verify
|
|
54
|
-
with `polli auth status
|
|
54
|
+
with `polli auth status` (or `polli whoami`).
|
|
55
55
|
Override the stored key for a single command with `--key <key>`.
|
|
56
56
|
|
|
57
57
|
## Recipes
|
|
@@ -223,10 +223,12 @@ polli harness pi on --model moonshotai/kimi-k2.6 # use the model ID from `polli
|
|
|
223
223
|
polli harness pi off # restore the Pi config backed up before "on"
|
|
224
224
|
polli harness openclaw on # login if needed, mint key "polli-harness-openclaw", add provider + Polli skill
|
|
225
225
|
polli harness openclaw off # remove the Pollinations provider, key, and skill
|
|
226
|
+
polli harness tgpt on # use tgpt's Pollinations provider with a dedicated key
|
|
227
|
+
polli harness tgpt off # restore tgpt's previous configuration
|
|
226
228
|
```
|
|
227
|
-
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, and
|
|
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.
|
|
228
230
|
|
|
229
|
-
Bloom already uses Pollinations and only needs a dedicated key in `$BLOOM_HOME/.env` (default `~/.bloom/.env`). 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".
|
|
231
|
+
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".
|
|
230
232
|
|
|
231
233
|
### Read API docs
|
|
232
234
|
```bash
|
|
@@ -243,7 +245,7 @@ polli docs --open # open in browser
|
|
|
243
245
|
|
|
244
246
|
## Agent operating rules
|
|
245
247
|
|
|
246
|
-
1. **Run `polli auth status` first** if you don't know whether the user is logged in. Fail fast with a clear "run `polli auth login`" message if not.
|
|
248
|
+
1. **Run `polli auth status` (or `polli whoami`) first** if you don't know whether the user is logged in. Fail fast with a clear "run `polli auth login`" message if not.
|
|
247
249
|
2. **Prefer `--json`** whenever you'll parse the output. Never grep human-formatted tables.
|
|
248
250
|
3. **Don't hardcode model IDs.** Fetch the live list with `polli models --type <type>`. Model availability changes.
|
|
249
251
|
4. **Before picking a model for production use, check `polli models --stats`.** Rule of thumb for "healthy": `err%` ≤ 5, `avg` latency in a reasonable range for the modality (standard text <5s, image <10s, video <60s), and `requests` high enough to be statistically meaningful (ignore rows with <10 requests — noise). **Filter by capability first, then optimize by health** — e.g. for a reasoning task, narrow to models where `reasoning: true` (via `polli models --type text --json`), *then* cross-reference against `--stats` output. The healthiest model overall may not support the capability you need. **Reasoning models are inherently slower — expect 5–50s, not <5s**; when picking among them, prioritize low `err%` and request count over raw latency, and compare latency only within the reasoning-capable subset.
|
|
@@ -256,7 +258,7 @@ polli docs --open # open in browser
|
|
|
256
258
|
|
|
257
259
|
- Forgetting `--output` on binary generators (image/audio/video) — the file goes to a default path, which may not be what the user wants.
|
|
258
260
|
- Using `polli gen text --json` expecting OpenAI chat-completions shape — the CLI's `--json` wraps its own structure. Use `polli docs /v1/chat/completions` to see the raw API shape if you need it.
|
|
259
|
-
- Running commands without auth — `polli auth status` tells you who you're logged in as and your balance in one call.
|
|
261
|
+
- Running commands without auth — `polli auth status` / `polli whoami` tells you who you're logged in as and your balance in one call.
|
|
260
262
|
- **`gen text` streams to a TTY, buffers when piped.** The default now auto-detects — a human at the terminal sees tokens tick in, a pipe/redirect gets the full response once. Force either mode with `--stream` or `--no-stream`. For scripts and chains like `polli gen text … | polli gen audio …`, you don't need to do anything; buffering happens automatically.
|
|
261
263
|
- **Translating a `polli` workflow into a browser app.** `gen.pollinations.ai` requires a bearer token for generation requests, so a plain client-side `fetch` with no auth returns 401 unless it is served from cache. Mint a scoped key with `polli keys create` and proxy via your own backend.
|
|
262
264
|
- **Backgrounded `polli gen` can fail silently** — no output file, empty log, no error (a safety rejection is an explicit 400). Run in the foreground; if backgrounded, check the `--output` file exists and retry once in the foreground before calling it failed.
|