@pollinations/cli 0.1.72 → 0.1.73
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 +1 -2
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,12 +98,11 @@ polli quests --claimed # already-completed and earned quest status
|
|
|
98
98
|
Two kinds of keys:
|
|
99
99
|
|
|
100
100
|
- **Secret (`sk_`)** — backend use, full access. Default.
|
|
101
|
-
- **
|
|
101
|
+
- **App Key (`pk_`)** — identifies your app in Connect User Wallets sign-in; never authenticates requests.
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
104
|
polli keys list
|
|
105
105
|
polli keys create --name mybot --budget 100 # secret (default)
|
|
106
|
-
polli keys create --name myapp --type publishable # API publishable
|
|
107
106
|
polli keys create --name myapp --type publishable \
|
|
108
107
|
--redirect-uri https://myapp.com/callback --earnings # 3rd-party app key
|
|
109
108
|
polli keys create --name server --models black-forest-labs/flux.1-schnell tongyi-mai/z-image-turbo # only these models
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var init_package = __esm({
|
|
|
14
14
|
"package.json"() {
|
|
15
15
|
package_default = {
|
|
16
16
|
name: "@pollinations/cli",
|
|
17
|
-
version: "0.1.
|
|
17
|
+
version: "0.1.73",
|
|
18
18
|
description: "The Pollinations CLI \u2014 for humans, AI agents, and everything in between",
|
|
19
19
|
type: "module",
|
|
20
20
|
bin: {
|
|
@@ -408,13 +408,14 @@ async function pollForToken(deviceCode, interval, expiresIn) {
|
|
|
408
408
|
return { error: "expired_token", error_description: "Device code expired" };
|
|
409
409
|
}
|
|
410
410
|
function storeKey(key) {
|
|
411
|
-
|
|
412
|
-
saveCredentials({ apiKey: key, keyType });
|
|
411
|
+
saveCredentials({ apiKey: key });
|
|
413
412
|
}
|
|
414
413
|
function assertApiKey(key) {
|
|
415
414
|
const trimmed = key.trim();
|
|
416
|
-
if (!trimmed.startsWith("
|
|
417
|
-
printError(
|
|
415
|
+
if (!trimmed.startsWith("sk_")) {
|
|
416
|
+
printError(
|
|
417
|
+
"Invalid key format. Must start with sk_; pk_ App Keys only identify an app"
|
|
418
|
+
);
|
|
418
419
|
throw new ExitSignal(1);
|
|
419
420
|
}
|
|
420
421
|
return trimmed;
|
|
@@ -585,7 +586,7 @@ var init_auth = __esm({
|
|
|
585
586
|
login = new Command2("login").description("Authenticate with Pollinations").addOption(
|
|
586
587
|
new Option(
|
|
587
588
|
"--token <key>",
|
|
588
|
-
"API key (
|
|
589
|
+
"Secret API key (sk_) for direct auth"
|
|
589
590
|
).hideHelp()
|
|
590
591
|
).option("--with-token", "Read an existing API key from stdin").option("--no-browser", "Print URL instead of opening browser").action(async (opts) => {
|
|
591
592
|
if (opts.token) {
|
|
@@ -4238,7 +4239,6 @@ var info = new Command17("info").description(
|
|
|
4238
4239
|
expires: keyInfo.expiresAt ?? "never",
|
|
4239
4240
|
budget: keyInfo.pollenBudget ?? "unlimited",
|
|
4240
4241
|
quest_pollen_only: keyInfo.questPollenOnly ?? false,
|
|
4241
|
-
rate_limited: keyInfo.rateLimitEnabled,
|
|
4242
4242
|
model_restrictions: keyInfo.permissions?.models?.join(", ") ?? "none (all models)",
|
|
4243
4243
|
account_permissions: keyInfo.permissions?.account?.join(", ") ?? "none"
|
|
4244
4244
|
});
|