@pollinations/cli 0.1.7 → 0.1.9
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 +15 -3
- package/SKILL.md +30 -5
- package/dist/index.js +392 -278
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,9 @@ 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
|
-
https://github.com/user-attachments/assets/
|
|
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>
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
12
|
npx @pollinations/cli gen image "a cat in space" --output cat.png
|
|
@@ -33,7 +35,7 @@ polli auth login # device-flow via enter.pollinations.ai
|
|
|
33
35
|
printf '%s' "$POLLINATIONS_API_KEY" | polli auth login --with-token
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
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).
|
|
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).
|
|
37
39
|
|
|
38
40
|
## Generate
|
|
39
41
|
|
|
@@ -91,7 +93,17 @@ polli usage # pollen balance
|
|
|
91
93
|
polli usage --history # recent requests
|
|
92
94
|
polli usage --daily # daily spend
|
|
93
95
|
polli quests mine --completed # completed and earned quests
|
|
94
|
-
polli
|
|
96
|
+
polli agents list # managed prompt agents
|
|
97
|
+
polli my-models list # invite-only community text and image models
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Manage agents with API-shaped JSON config files:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
polli agents get <id>
|
|
104
|
+
polli agents create --config agent.json
|
|
105
|
+
polli agents update <id> --config agent.json
|
|
106
|
+
polli agents delete <id>
|
|
95
107
|
```
|
|
96
108
|
|
|
97
109
|
`polli auth login` creates a key with all account permissions Polli needs: `profile`, `usage`, and `keys`. Use `account:usage` for narrow read-only account state like usage and quests. Use `account:keys` to manage keys and, where invite-only My Models access is enabled, my-models. Quest claiming remains in the dashboard.
|
package/SKILL.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: polli
|
|
3
|
-
description: Generate images, text, audio, video, and transcribe speech via the Pollinations API using the polli CLI. Use when asked to generate media, call pollinations.ai, check pollen balance, list models, manage API keys, inspect quests, manage my-models, or run polli commands.
|
|
3
|
+
description: Generate images, text, audio, video, and transcribe speech via the Pollinations API using the polli CLI. Use when asked to generate media, call pollinations.ai, check pollen balance, list models, manage API keys, inspect quests, manage agents or my-models, or run polli commands.
|
|
4
4
|
allowed-tools: Bash(polli *)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# polli — Pollinations CLI
|
|
8
8
|
|
|
9
|
-
Thin wrapper around `gen.pollinations.ai`. Generates images, text, audio, video; transcribes speech; manages API keys, usage, quests, and invite-only my-models.
|
|
9
|
+
Thin wrapper around `gen.pollinations.ai`. Generates images, text, audio, video; transcribes speech; manages API keys, usage, quests, agents, and invite-only my-models.
|
|
10
10
|
|
|
11
11
|
Install: `npm i -g @pollinations/cli@latest` (provides the `polli` binary).
|
|
12
12
|
|
|
@@ -18,6 +18,7 @@ Install: `npm i -g @pollinations/cli@latest` (provides the `polli` binary).
|
|
|
18
18
|
- User asks about their **pollen balance, usage, or API keys**
|
|
19
19
|
- User wants to **browse or filter available models**
|
|
20
20
|
- User wants to inspect **quests** or manage invite-only **my-models**
|
|
21
|
+
- User wants to create or update a hosted prompt **agent**
|
|
21
22
|
|
|
22
23
|
## Quick reference
|
|
23
24
|
|
|
@@ -39,6 +40,7 @@ Install: `npm i -g @pollinations/cli@latest` (provides the `polli` binary).
|
|
|
39
40
|
| Model health + latency | `polli models --stats` (default 60m, `--window <min>`) |
|
|
40
41
|
| Check balance | `polli usage` |
|
|
41
42
|
| List your quests + claim state | `polli quests` (filters: `--open --claimable --claimed --coming-soon`) |
|
|
43
|
+
| Manage prompt agents | `polli agents list` |
|
|
42
44
|
| Manage invite-only community models | `polli my-models list` |
|
|
43
45
|
| Machine-readable output | append `--json` to any command |
|
|
44
46
|
|
|
@@ -127,7 +129,7 @@ Cheapest path: `--model wan-fast` at ~$0.01/sec, **fixed 5-second output** (any
|
|
|
127
129
|
```bash
|
|
128
130
|
polli gen transcribe recording.mp3 --language en
|
|
129
131
|
```
|
|
130
|
-
Models: `whisper` (default), `scribe`, `universal-2`, `universal-3-pro`. Accepts common audio formats (mp3, wav, m4a, flac, ogg); non-audio input (e.g. a `.txt` file) returns a clear `400 invalid_request_error: extension "txt" not supported` — no need to pre-validate with `file`. Default output is the plain transcript on stdout as a single line (pipe-friendly). Use `--json` for structured output: **whisper** and **AssemblyAI** return timing data when requested through the API; **scribe** returns only `{text: "..."}` — use whisper or AssemblyAI if you need timing data. `--language <ISO-639-1>` (e.g. `en`, `fr`) is an optional hint that can improve accuracy for non-English or accented speech.
|
|
132
|
+
Models: `whisper` (default), `scribe`, `universal-2`, `universal-3.5-pro`. Accepts common audio formats (mp3, wav, m4a, flac, ogg); non-audio input (e.g. a `.txt` file) returns a clear `400 invalid_request_error: extension "txt" not supported` — no need to pre-validate with `file`. Default output is the plain transcript on stdout as a single line (pipe-friendly). Use `--json` for structured output: **whisper** and **AssemblyAI** return timing data when requested through the API; **scribe** returns only `{text: "..."}` — use whisper or AssemblyAI if you need timing data. `--language <ISO-639-1>` (e.g. `en`, `fr`) is an optional hint that can improve accuracy for non-English or accented speech.
|
|
131
133
|
|
|
132
134
|
### Discover models
|
|
133
135
|
```bash
|
|
@@ -154,11 +156,34 @@ polli quests --claimable # only rewards ready to claim
|
|
|
154
156
|
```bash
|
|
155
157
|
polli my-models list
|
|
156
158
|
polli my-models models --base-url https://api.example.com/v1 --bearer-token "$UPSTREAM_KEY"
|
|
157
|
-
polli my-models create --name my-model --base-url https://api.example.com/v1 --bearer-token "$UPSTREAM_KEY" --upstream-model gpt-4.1-mini
|
|
159
|
+
polli my-models create --name my-model --title "My Model" --base-url https://api.example.com/v1 --bearer-token "$UPSTREAM_KEY" --upstream-model gpt-4.1-mini
|
|
160
|
+
polli my-models create --name my-image --title "My Image" --modality image --image-pricing request --completion-image-price 0.01 --base-url https://api.example.com/v1 --bearer-token "$UPSTREAM_KEY" --upstream-model flux
|
|
158
161
|
polli my-models update <id> --description "Updated description"
|
|
159
162
|
polli my-models delete <id>
|
|
160
163
|
```
|
|
161
|
-
`my-models` manages owned community text models for invite-only accounts. It requires `communityEndpointsAllowed: true` plus a key with `account:keys`, or an authenticated dashboard session through the API. Use `account:usage` for narrow read-only usage and `polli quests`; use both permissions when a client needs both read-only account state and admin operations. Quest claiming is dashboard-only; `polli quests` is read-only and account-aware.
|
|
164
|
+
`my-models` manages owned community text and image models for invite-only accounts. It requires `communityEndpointsAllowed: true` plus a key with `account:keys`, or an authenticated dashboard session through the API. Use `account:usage` for narrow read-only usage and `polli quests`; use both permissions when a client needs both read-only account state and admin operations. Quest claiming is dashboard-only; `polli quests` is read-only and account-aware.
|
|
165
|
+
|
|
166
|
+
### Register an image my-model
|
|
167
|
+
```bash
|
|
168
|
+
polli my-models test --modality image --base-url https://api.example.com/v1 --bearer-token "$UPSTREAM_KEY" --model image-v1
|
|
169
|
+
polli my-models create --name my-image --title "My Image" --modality image --image-pricing request --completion-image-price 0.01 --input-modalities text,image --base-url https://api.example.com/v1 --bearer-token "$UPSTREAM_KEY" --upstream-model image-v1
|
|
170
|
+
```
|
|
171
|
+
Test before creating. The probe reports the pricing mode it detected and the input modalities it found, including whether the endpoint accepts image edits; pass those back as `--input-modalities text,image` to advertise edit support. `polli my-models list` shows them in the `inputs` column.
|
|
172
|
+
|
|
173
|
+
Two billing modes: `--image-pricing request` charges `--completion-image-price` per generated image, while `--image-pricing tokens` bills returned token usage per 1M through `--prompt-text-price`, `--prompt-image-price`, and `--completion-image-price`.
|
|
174
|
+
|
|
175
|
+
`--modality` is fixed at creation — `update` cannot change it.
|
|
176
|
+
|
|
177
|
+
### Manage agents
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
polli agents list
|
|
181
|
+
polli agents get <id>
|
|
182
|
+
polli agents create --config agent.json
|
|
183
|
+
polli agents update <id> --config agent.json
|
|
184
|
+
polli agents delete <id>
|
|
185
|
+
```
|
|
186
|
+
The config file is sent directly to the agent API. It contains `systemPrompt`, `baseModel`, and optional `mcpServers`. The only supported server ID is currently `"pollinations"`. Updates replace the complete agent configuration.
|
|
162
187
|
|
|
163
188
|
### Manage API keys
|
|
164
189
|
```bash
|