@pollinations/cli 0.1.20 → 0.1.22

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
@@ -4,14 +4,20 @@ The Pollinations CLI — for humans, AI agents, and everything in between.
4
4
 
5
5
  Generate text, images, audio, video from the terminal. Backed by the [Pollinations API](https://gen.pollinations.ai).
6
6
 
7
- <video src="https://github.com/user-attachments/assets/c3ff5c45-672c-4c45-9027-7743d32f9785" controls muted loop playsinline width="720">
8
- <a href="https://github.com/user-attachments/assets/c3ff5c45-672c-4c45-9027-7743d32f9785">▶️ Watch the demo</a>
9
- </video>
7
+ ## First result
10
8
 
11
9
  ```bash
12
- npx @pollinations/cli gen image "a cat in space" --output cat.png
10
+ npm install -g @pollinations/cli
11
+ polli auth login
12
+ polli gen text "Say hello in one sentence" --model openai/gpt-5.4-nano
13
13
  ```
14
14
 
15
+ Device login opens a browser for approval. The last command prints a short, low-cost result in your terminal. To try an image next, run `polli gen image "a cat in space" --output cat.png` and check that `cat.png` was saved.
16
+
17
+ <video src="https://github.com/user-attachments/assets/c3ff5c45-672c-4c45-9027-7743d32f9785" controls muted loop playsinline width="720">
18
+ <a href="https://github.com/user-attachments/assets/c3ff5c45-672c-4c45-9027-7743d32f9785">▶️ Watch the demo</a>
19
+ </video>
20
+
15
21
  ## For AI agents
16
22
 
17
23
  Point your coding agent (Claude Code, Cursor, Windsurf, Codex) at the skill file and it gets the full usage map — flags, stdin conventions, `--json` output shape, error codes, the lot:
@@ -24,18 +30,16 @@ Every command is agent-friendly:
24
30
 
25
31
  - `--json` — structured stdout, human messages to stderr. Safe to parse.
26
32
  - Exit code `0` on success, non-zero on error.
27
- - When a call runs out of pollen, the first line of the error is the top-up link.
33
+ - A 402 error links to your balance, Quests, and top-up options.
28
34
  - `polli auth status --json` (or `polli whoami --json`) exposes everything about the current session.
29
35
 
30
- ## Get started
36
+ ## Other ways to start
31
37
 
32
38
  ```bash
33
- npm install -g @pollinations/cli # installs the `polli` binary
34
- polli auth login # device-flow via enter.pollinations.ai
35
39
  printf '%s' "$POLLINATIONS_API_KEY" | polli auth login --with-token
36
40
  ```
37
41
 
38
- Credentials land at `~/.pollinations/credentials.json`. For one-off runs pass `--key sk_...` or set `POLLINATIONS_API_KEY`. Get keys at [enter.pollinations.ai](https://enter.pollinations.ai/keys).
42
+ 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
43
 
40
44
  Set `POLLINATIONS_ENV=staging` to use the staging API, with a separate login stored in `~/.pollinations/credentials.staging.json`. `polli upload` has no staging.
41
45
 
@@ -145,6 +149,9 @@ Point an agentic coding tool at Pollinations. `on` logs in if needed, mints a
145
149
  key for the harness, backs up its config, and writes the provider; `off`
146
150
  restores the backup.
147
151
 
152
+ The default is `openai/gpt-6-sol`; pass `--model <id>` to choose another model.
153
+ Bloom is key-only and keeps its own model selection.
154
+
148
155
  ```bash
149
156
  polli harness --help # supported harnesses
150
157
  polli harness bloom on # creates a dedicated key for Bloom CLI
@@ -171,6 +178,9 @@ stores its provider and skill under `$HERMES_HOME` (default `~/.hermes`, or
171
178
  install its hosted MCP servers with `polli mcp install hermes --all`. OpenCode uses
172
179
  its official plugin; OpenClaw uses `openclaw.json`, while Pi and Prime Agent use
173
180
  their native `models.json` provider support.
181
+ Pi 0.99+ also supports `polli mcp install pi --all` for native hosted MCP
182
+ servers. Run `/reload` in Pi afterward; remove them with `polli mcp remove pi`.
183
+ Model setup remains compatible with older Pi versions.
174
184
 
175
185
  See [Coding Harnesses](https://github.com/pollinations/pollinations/blob/main/CODING_HARNESSES.md) for what each profile changes and how to add one.
176
186
 
package/SKILL.md CHANGED
@@ -58,6 +58,7 @@ One-time: `polli auth login` (device-flow; creates a key with `profile`, `usage`
58
58
  `printf '%s' "$POLLINATIONS_API_KEY" | polli auth login --with-token`. Verify
59
59
  with `polli auth status` (or `polli whoami`).
60
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.
61
62
 
62
63
  ## Recipes
63
64
 
@@ -72,7 +73,7 @@ Defaults: `zimage`, 1024x1024. Pick a different model with `--model flux` (see `
72
73
  URL=$(polli upload cat.png)
73
74
  polli gen image "make the cat purple" --image "$URL" --output purple.png
74
75
  ```
75
- `polli upload <file>` posts a multipart upload to `media.pollinations.ai` (100MB max; 30-day lifecycle, refreshed by GETs once the object is at least 15 days old). Each upload receives a unique id. Human mode: URL on stdout and id/size/contentType on stderr. `--json`: full upload response on stdout. The returned URL is public (no auth to fetch) and works anywhere `--image` is accepted — `gen image`, `gen video`, etc.
76
+ `polli upload <file>` streams one raw-file request to `media.pollinations.ai` (400 MiB max; 30-day lifecycle, refreshed by GETs once the object is at least 15 days old). Each upload receives a unique id. Human mode: URL on stdout and id/size/contentType on stderr. `--json`: full upload response on stdout. The returned URL is public (no auth to fetch) and works anywhere `--image` is accepted — `gen image`, `gen video`, etc.
76
77
 
77
78
  ### Generate text
78
79
  ```bash
@@ -241,6 +242,8 @@ polli keys revoke <id> # id comes fr
241
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.
242
243
 
243
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
+
244
247
  ```bash
245
248
  polli harness --help # supported harnesses
246
249
  polli harness bloom on # create a dedicated key for Bloom CLI