@blinkdotnew/cli 0.1.9 → 0.2.0
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 +58 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @blinkdotnew/cli
|
|
2
2
|
|
|
3
|
-
The Blink platform CLI. Deploy apps, query databases, generate AI content, manage storage — all from your terminal or agent scripts.
|
|
3
|
+
The Blink platform CLI. Deploy apps, query databases, generate AI content, manage storage, and control Blink Claw agents — all from your terminal or agent scripts.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install -g @blinkdotnew/cli
|
|
@@ -15,20 +15,27 @@ blink --help
|
|
|
15
15
|
# Install
|
|
16
16
|
npm install -g @blinkdotnew/cli
|
|
17
17
|
|
|
18
|
-
# Authenticate (enter your blnk_ak_... API key)
|
|
18
|
+
# Authenticate (enter your blnk_ak_... API key from blink.new → Settings → API Keys)
|
|
19
19
|
blink login --interactive
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
blink
|
|
21
|
+
# See full context: agent + project + auth
|
|
22
|
+
blink status
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
blink
|
|
24
|
+
# Manage Claw agents
|
|
25
|
+
blink agent list
|
|
26
|
+
eval $(blink agent use clw_xxx --export)
|
|
27
|
+
blink secrets set GITHUB_TOKEN ghp_xxx
|
|
28
|
+
blink secrets list
|
|
29
|
+
|
|
30
|
+
# Deploy an app
|
|
31
|
+
npm run build && blink deploy ./dist --prod
|
|
26
32
|
|
|
27
33
|
# Query your database
|
|
28
34
|
blink db query "SELECT count(*) FROM users"
|
|
29
35
|
|
|
30
|
-
# Generate
|
|
36
|
+
# Generate AI content
|
|
31
37
|
blink ai image "a glowing blink logo on dark background"
|
|
38
|
+
blink ai text "Summarize this article: ..."
|
|
32
39
|
```
|
|
33
40
|
|
|
34
41
|
---
|
|
@@ -338,8 +345,8 @@ blink storage upload ./banner.png --json | jq -r '.url'
|
|
|
338
345
|
The CLI is **pre-installed** in every Blink Claw agent (Fly.io Firecracker VM). These env vars are already injected — no login needed:
|
|
339
346
|
|
|
340
347
|
```
|
|
341
|
-
BLINK_API_KEY auth token
|
|
342
|
-
BLINK_AGENT_ID
|
|
348
|
+
BLINK_API_KEY auth token (workspace-scoped)
|
|
349
|
+
BLINK_AGENT_ID this agent's ID — auto-used by blink agent/secrets commands
|
|
343
350
|
BLINK_APIS_URL https://core.blink.new
|
|
344
351
|
BLINK_APP_URL https://blink.new
|
|
345
352
|
```
|
|
@@ -351,6 +358,48 @@ Agents use the CLI directly in skill scripts:
|
|
|
351
358
|
blink ai image "$PROMPT" --model "$MODEL" --json
|
|
352
359
|
```
|
|
353
360
|
|
|
361
|
+
### `blink agent` — Manage agents
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
blink agent list # List all agents in workspace
|
|
365
|
+
blink agent use clw_xxx # Show how to set active agent
|
|
366
|
+
eval $(blink agent use clw_xxx --export) # Set active agent for this session
|
|
367
|
+
blink agent status # Show current agent details
|
|
368
|
+
blink agent status clw_xxx # Show specific agent details
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
On Claw machines, `BLINK_AGENT_ID` is already set — `blink agent status` works with zero config.
|
|
372
|
+
|
|
373
|
+
### `blink secrets` — Agent encrypted vault
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
# All commands auto-use BLINK_AGENT_ID on Claw machines
|
|
377
|
+
blink secrets list # List secret key names (values never shown)
|
|
378
|
+
blink secrets set GITHUB_TOKEN ghp_xxx # Add or update a secret
|
|
379
|
+
blink secrets delete OLD_KEY # Remove a secret (--yes to skip prompt)
|
|
380
|
+
|
|
381
|
+
# Cross-agent management (agent manager pattern)
|
|
382
|
+
blink secrets list --agent clw_other # Another agent's keys
|
|
383
|
+
blink secrets set --agent clw_other OPENAI_KEY sk-xxx # Set on another agent
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
Secrets are stored encrypted and available as `$KEY_NAME` in all agent shell commands.
|
|
387
|
+
|
|
388
|
+
Agent ID resolution for `blink agent` and `blink secrets`:
|
|
389
|
+
1. `--agent <id>` flag
|
|
390
|
+
2. `BLINK_AGENT_ID` env var ← always set on Claw Fly machines
|
|
391
|
+
3. `BLINK_ACTIVE_AGENT` env var ← from `eval $(blink agent use clw_xxx --export)`
|
|
392
|
+
|
|
393
|
+
### `blink status` — Full context at a glance
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
$ BLINK_AGENT_ID=clw_xxx blink status
|
|
397
|
+
|
|
398
|
+
Agent clw_xxx (BLINK_AGENT_ID env)
|
|
399
|
+
Project proj_yyy (.blink/project.json)
|
|
400
|
+
Auth ~/.config/blink/config.toml
|
|
401
|
+
```
|
|
402
|
+
|
|
354
403
|
---
|
|
355
404
|
|
|
356
405
|
## Links
|