@blinkdotnew/cli 0.4.2 → 0.4.3
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 +9 -20
- package/dist/cli.js +4 -9
- package/package.json +1 -1
- package/src/cli.ts +6 -9
package/README.md
CHANGED
|
@@ -190,35 +190,24 @@ blink usage # Usage breakdown
|
|
|
190
190
|
blink usage --period month # Monthly summary
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
### Personal Access Tokens
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
blink tokens list # List all PATs
|
|
197
|
-
blink tokens create --name "CI key" # Create a new token (shown once)
|
|
198
|
-
blink tokens revoke tok_xxx --yes # Revoke a token
|
|
199
|
-
```
|
|
200
|
-
|
|
201
193
|
## Authentication
|
|
202
194
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
1. **`--token` flag** — per-command override
|
|
206
|
-
2. **`BLINK_API_KEY` env var** — for CI/CD and coding agents
|
|
207
|
-
3. **Config file** — saved by `blink login --interactive` at `~/.config/blink/config.toml`
|
|
208
|
-
|
|
209
|
-
Get your API key at [blink.new/settings?tab=api-keys](https://blink.new/settings?tab=api-keys).
|
|
195
|
+
Get your workspace API key from [blink.new/settings?tab=api-keys](https://blink.new/settings?tab=api-keys) (starts with `blnk_ak_`).
|
|
210
196
|
|
|
211
197
|
```bash
|
|
212
|
-
#
|
|
198
|
+
# Opens the API keys page in your browser, then prompts for the key
|
|
199
|
+
blink login
|
|
213
200
|
blink login --interactive
|
|
214
201
|
|
|
215
|
-
#
|
|
202
|
+
# Or set the env var directly (CI/agents)
|
|
216
203
|
export BLINK_API_KEY=blnk_ak_...
|
|
217
|
-
|
|
218
|
-
# Per-command
|
|
219
|
-
blink deploy ./dist --prod --token blnk_ak_...
|
|
220
204
|
```
|
|
221
205
|
|
|
206
|
+
Auth is resolved in this order:
|
|
207
|
+
1. **`--token` flag** — per-command override
|
|
208
|
+
2. **`BLINK_API_KEY` env var** — for CI/CD and coding agents
|
|
209
|
+
3. **Config file** — saved by `blink login --interactive` at `~/.config/blink/config.toml`
|
|
210
|
+
|
|
222
211
|
## Project Context
|
|
223
212
|
|
|
224
213
|
Commands that operate on a project resolve it in this order:
|
package/dist/cli.js
CHANGED
|
@@ -3706,12 +3706,12 @@ var pkg = require2("../package.json");
|
|
|
3706
3706
|
var program = new Command();
|
|
3707
3707
|
program.name("blink").description("Blink platform CLI \u2014 build, deploy, and manage AI-powered apps").version(pkg.version).option("--token <key>", "Override API token for this command").option("--json", "Machine-readable JSON output (no colors, great for scripting)").option("-y, --yes", "Skip confirmation prompts").option("--debug", "Verbose request logging").option("--profile <name>", "Use named config profile from ~/.config/blink/config.toml").addHelpText("after", `
|
|
3708
3708
|
Auth:
|
|
3709
|
-
|
|
3710
|
-
$ blink login --interactive
|
|
3711
|
-
$ export BLINK_API_KEY=blnk_ak_... Or set env var directly (
|
|
3709
|
+
$ blink login Opens blink.new to copy your API key
|
|
3710
|
+
$ blink login --interactive Paste and save key to ~/.config/blink/config.toml
|
|
3711
|
+
$ export BLINK_API_KEY=blnk_ak_... Or set env var directly (CI/agents)
|
|
3712
3712
|
|
|
3713
3713
|
Quick Start:
|
|
3714
|
-
$ blink login
|
|
3714
|
+
$ blink login Get your workspace API key
|
|
3715
3715
|
$ blink link Link current dir to a project (interactive picker)
|
|
3716
3716
|
$ npm run build && blink deploy ./dist --prod Build then deploy to production
|
|
3717
3717
|
|
|
@@ -3836,11 +3836,6 @@ Billing:
|
|
|
3836
3836
|
$ blink credits Check credit balance
|
|
3837
3837
|
$ blink usage Usage breakdown
|
|
3838
3838
|
|
|
3839
|
-
Tokens (Personal Access Tokens):
|
|
3840
|
-
$ blink tokens list List PATs
|
|
3841
|
-
$ blink tokens create --name "CI" Create PAT (shown once!)
|
|
3842
|
-
$ blink tokens revoke <id> --yes Revoke a PAT
|
|
3843
|
-
|
|
3844
3839
|
Init:
|
|
3845
3840
|
$ blink init Create project + link to current dir
|
|
3846
3841
|
$ blink init --name "My App" Create with custom name
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -28,6 +28,8 @@ import { registerInitCommands } from './commands/init.js'
|
|
|
28
28
|
import { registerWorkspaceCommands } from './commands/workspace.js'
|
|
29
29
|
import { registerVersionCommands } from './commands/versions.js'
|
|
30
30
|
import { registerBillingCommands } from './commands/billing.js'
|
|
31
|
+
// PAT tokens are deprecated in favor of workspace API keys (blnk_ak_*).
|
|
32
|
+
// The tokens command is kept for backward compat but hidden from help.
|
|
31
33
|
import { registerTokenCommands } from './commands/tokens.js'
|
|
32
34
|
|
|
33
35
|
const require = createRequire(import.meta.url)
|
|
@@ -46,12 +48,12 @@ program
|
|
|
46
48
|
.option('--profile <name>', 'Use named config profile from ~/.config/blink/config.toml')
|
|
47
49
|
.addHelpText('after', `
|
|
48
50
|
Auth:
|
|
49
|
-
|
|
50
|
-
$ blink login --interactive
|
|
51
|
-
$ export BLINK_API_KEY=blnk_ak_... Or set env var directly (
|
|
51
|
+
$ blink login Opens blink.new to copy your API key
|
|
52
|
+
$ blink login --interactive Paste and save key to ~/.config/blink/config.toml
|
|
53
|
+
$ export BLINK_API_KEY=blnk_ak_... Or set env var directly (CI/agents)
|
|
52
54
|
|
|
53
55
|
Quick Start:
|
|
54
|
-
$ blink login
|
|
56
|
+
$ blink login Get your workspace API key
|
|
55
57
|
$ blink link Link current dir to a project (interactive picker)
|
|
56
58
|
$ npm run build && blink deploy ./dist --prod Build then deploy to production
|
|
57
59
|
|
|
@@ -176,11 +178,6 @@ Billing:
|
|
|
176
178
|
$ blink credits Check credit balance
|
|
177
179
|
$ blink usage Usage breakdown
|
|
178
180
|
|
|
179
|
-
Tokens (Personal Access Tokens):
|
|
180
|
-
$ blink tokens list List PATs
|
|
181
|
-
$ blink tokens create --name "CI" Create PAT (shown once!)
|
|
182
|
-
$ blink tokens revoke <id> --yes Revoke a PAT
|
|
183
|
-
|
|
184
181
|
Init:
|
|
185
182
|
$ blink init Create project + link to current dir
|
|
186
183
|
$ blink init --name "My App" Create with custom name
|