@keystrokehq/cli 0.1.139 → 0.1.141
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 +17 -8
- package/dist/dist-BcY5XTlp.mjs.map +1 -1
- package/dist/{dist-Bo7OJs1C.mjs → dist-Cp7XrP0x.mjs} +3 -3
- package/dist/{dist-Bo7OJs1C.mjs.map → dist-Cp7XrP0x.mjs.map} +1 -1
- package/dist/{dist-Wf-gc7FZ.mjs → dist-D95-g2ba.mjs} +2 -2
- package/dist/{dist-Wf-gc7FZ.mjs.map → dist-D95-g2ba.mjs.map} +1 -1
- package/dist/{dist-BkXtCIR2.mjs → dist-DaDxDpeX.mjs} +2 -2
- package/dist/{dist-BkXtCIR2.mjs.map → dist-DaDxDpeX.mjs.map} +1 -1
- package/dist/dist-Dw1cWy89.mjs +3 -0
- package/dist/index.mjs +1 -1
- package/dist/{maybe-auto-update-C99Obm7k.mjs → maybe-auto-update-D8VbU88T.mjs} +2 -2
- package/dist/{maybe-auto-update-C99Obm7k.mjs.map → maybe-auto-update-D8VbU88T.mjs.map} +1 -1
- package/dist/{program-DMhbEvwF.mjs → program-CYtD52e1.mjs} +356 -60
- package/dist/program-CYtD52e1.mjs.map +1 -0
- package/dist/{run-package-manager-update-CQT2HD0m.mjs → run-package-manager-update-DS5Xr8oA.mjs} +36 -3
- package/dist/run-package-manager-update-DS5Xr8oA.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/dist-C3AKWkMS.mjs +0 -3
- package/dist/program-DMhbEvwF.mjs.map +0 -1
- package/dist/run-package-manager-update-CQT2HD0m.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -73,24 +73,33 @@ EOF
|
|
|
73
73
|
|
|
74
74
|
### `auth`
|
|
75
75
|
|
|
76
|
-
Authenticate with Keystroke via Better Auth device flow.
|
|
76
|
+
Authenticate with Keystroke via Better Auth device flow. Non-secret config lives in `~/.keystroke`. Session bearer tokens default to the OS keychain:
|
|
77
|
+
|
|
78
|
+
- **macOS** — Apple's `/usr/bin/security` (stable system identity; avoids Node-path Keychain ACL prompts)
|
|
79
|
+
- **Windows / Linux** — `@napi-rs/keyring` (Credential Manager / Secret Service)
|
|
77
80
|
|
|
78
81
|
```bash
|
|
79
82
|
keystroke auth login
|
|
80
83
|
keystroke auth login --web-url http://localhost:3000
|
|
81
84
|
keystroke auth login --web-url https://keystroke.ai --platform-url https://api.keystroke.ai
|
|
85
|
+
keystroke auth login --credential-storage file
|
|
82
86
|
keystroke auth status
|
|
83
87
|
keystroke auth logout
|
|
84
88
|
```
|
|
85
89
|
|
|
86
|
-
| Setting
|
|
87
|
-
|
|
|
88
|
-
| `webUrl`
|
|
89
|
-
| `platformUrl`
|
|
90
|
+
| Setting | Default | Purpose |
|
|
91
|
+
| -------------------- | -------------------------- | ---------------------------------------------------------------- |
|
|
92
|
+
| `webUrl` | `https://keystroke.ai` | Web dashboard; device login and session checks |
|
|
93
|
+
| `platformUrl` | `https://api.keystroke.ai` | Platform API (direct; used by CLI platform commands) |
|
|
94
|
+
| `credentialStorage` | `keychain` | `keychain` (OS secure storage) or `file` (`~/.keystroke/credentials.json`, mode `0600`) |
|
|
95
|
+
|
|
96
|
+
`auth login` persists `webUrl`, `platformUrl`, and `credentialStorage` only after the token is stored successfully. There is **no silent fallback** from keychain to file — if the keychain is unavailable, set `KEYSTROKE_API_KEY` or pass `--credential-storage file` explicitly. File storage is owner-readable on disk (not encrypted); prefer keychain when available.
|
|
97
|
+
|
|
98
|
+
On macOS, tokens previously stored under the Node-bound `keystroke` Keychain service are migrated once into the `keystroke-cli` service used by `/usr/bin/security`.
|
|
90
99
|
|
|
91
|
-
|
|
100
|
+
Omit `--web-url` to always reset to production defaults (`https://keystroke.ai` / `https://api.keystroke.ai`), even if a previous login pointed at localhost. Local dev: `--web-url http://localhost:3000` (platform URL resolves to `http://localhost:3002`).
|
|
92
101
|
|
|
93
|
-
|
|
102
|
+
Use `resolveCliAuth()` when adding protected commands.
|
|
94
103
|
|
|
95
104
|
### Platform commands
|
|
96
105
|
|
|
@@ -251,7 +260,7 @@ Custom output directory: `node apps/cli/scripts/pack.mjs /path/to/install`.
|
|
|
251
260
|
| [`conf`](https://github.com/sindresorhus/conf) | Persistent non-secret config (profiles, defaults, project prefs). MIT. |
|
|
252
261
|
| [`@napi-rs/keyring`](https://github.com/Brooooooklyn/keyring-node) | API tokens and other secrets via the OS keychain. MIT. |
|
|
253
262
|
|
|
254
|
-
`conf` stores `webUrl`, `platformUrl`, and other non-secrets under `~/.keystroke`.
|
|
263
|
+
`conf` stores `webUrl`, `platformUrl`, `credentialStorage`, and other non-secrets under `~/.keystroke`. Session tokens default to the OS keychain — on macOS via `/usr/bin/security` (service `keystroke-cli`), elsewhere via `@napi-rs/keyring`. Pass `--credential-storage file` to store tokens in `~/.keystroke/credentials.json` (`0600`) instead; the CLI never silently falls back from keychain to file.
|
|
255
264
|
|
|
256
265
|
## Development
|
|
257
266
|
|