flipstream 0.4.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/LICENSE +202 -0
- package/README.md +659 -0
- package/bin/dev.js +9 -0
- package/bin/run.js +7 -0
- package/dist/commands/auth/clear-all.d.ts +10 -0
- package/dist/commands/auth/clear-all.js +50 -0
- package/dist/commands/auth/login.d.ts +11 -0
- package/dist/commands/auth/login.js +49 -0
- package/dist/commands/auth/logout.d.ts +10 -0
- package/dist/commands/auth/logout.js +51 -0
- package/dist/commands/auth/status.d.ts +8 -0
- package/dist/commands/auth/status.js +47 -0
- package/dist/commands/connections/list.d.ts +19 -0
- package/dist/commands/connections/list.js +43 -0
- package/dist/commands/query.d.ts +13 -0
- package/dist/commands/query.js +76 -0
- package/dist/commands/version.d.ts +15 -0
- package/dist/commands/version.js +17 -0
- package/dist/commands/workspaces/connections.d.ts +21 -0
- package/dist/commands/workspaces/connections.js +41 -0
- package/dist/commands/workspaces/get.d.ts +15 -0
- package/dist/commands/workspaces/get.js +65 -0
- package/dist/commands/workspaces/list.d.ts +20 -0
- package/dist/commands/workspaces/list.js +87 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/api/admin-client.d.ts +19 -0
- package/dist/lib/api/admin-client.js +44 -0
- package/dist/lib/api/client.d.ts +13 -0
- package/dist/lib/api/client.js +21 -0
- package/dist/lib/api/connections.d.ts +14 -0
- package/dist/lib/api/connections.js +44 -0
- package/dist/lib/api/errors.d.ts +7 -0
- package/dist/lib/api/errors.js +68 -0
- package/dist/lib/api/http.d.ts +9 -0
- package/dist/lib/api/http.js +55 -0
- package/dist/lib/api/ids.d.ts +1 -0
- package/dist/lib/api/ids.js +8 -0
- package/dist/lib/api/list.d.ts +12 -0
- package/dist/lib/api/list.js +31 -0
- package/dist/lib/api/projections.d.ts +2 -0
- package/dist/lib/api/projections.js +34 -0
- package/dist/lib/api/retry.d.ts +13 -0
- package/dist/lib/api/retry.js +37 -0
- package/dist/lib/auth/claims.d.ts +3 -0
- package/dist/lib/auth/claims.js +20 -0
- package/dist/lib/auth/discovery.d.ts +13 -0
- package/dist/lib/auth/discovery.js +62 -0
- package/dist/lib/auth/flow.d.ts +22 -0
- package/dist/lib/auth/flow.js +135 -0
- package/dist/lib/auth/headless.d.ts +12 -0
- package/dist/lib/auth/headless.js +61 -0
- package/dist/lib/auth/loopback.d.ts +15 -0
- package/dist/lib/auth/loopback.js +198 -0
- package/dist/lib/auth/pkce.d.ts +6 -0
- package/dist/lib/auth/pkce.js +17 -0
- package/dist/lib/auth/provider.d.ts +15 -0
- package/dist/lib/auth/provider.js +23 -0
- package/dist/lib/auth/refresh.d.ts +6 -0
- package/dist/lib/auth/refresh.js +69 -0
- package/dist/lib/auth/register.d.ts +4 -0
- package/dist/lib/auth/register.js +43 -0
- package/dist/lib/auth/revoke.d.ts +8 -0
- package/dist/lib/auth/revoke.js +28 -0
- package/dist/lib/auth/session.d.ts +6 -0
- package/dist/lib/auth/session.js +13 -0
- package/dist/lib/command/admin.d.ts +4 -0
- package/dist/lib/command/admin.js +30 -0
- package/dist/lib/command/base.d.ts +28 -0
- package/dist/lib/command/base.js +75 -0
- package/dist/lib/command/crash.d.ts +2 -0
- package/dist/lib/command/crash.js +37 -0
- package/dist/lib/command/flags.d.ts +7 -0
- package/dist/lib/command/flags.js +10 -0
- package/dist/lib/config/constants.d.ts +5 -0
- package/dist/lib/config/constants.js +20 -0
- package/dist/lib/config/xdg.d.ts +21 -0
- package/dist/lib/config/xdg.js +97 -0
- package/dist/lib/errors.d.ts +38 -0
- package/dist/lib/errors.js +122 -0
- package/dist/lib/exit-codes.d.ts +10 -0
- package/dist/lib/exit-codes.js +13 -0
- package/dist/lib/help.d.ts +4 -0
- package/dist/lib/help.js +14 -0
- package/dist/lib/output/ndjson.d.ts +1 -0
- package/dist/lib/output/ndjson.js +16 -0
- package/dist/lib/output/redact.d.ts +1 -0
- package/dist/lib/output/redact.js +47 -0
- package/dist/lib/output/render.d.ts +2 -0
- package/dist/lib/output/render.js +8 -0
- package/dist/lib/output/table.d.ts +3 -0
- package/dist/lib/output/table.js +19 -0
- package/dist/lib/store/credentials.d.ts +12 -0
- package/dist/lib/store/credentials.js +40 -0
- package/dist/lib/store/index.d.ts +5 -0
- package/dist/lib/store/index.js +21 -0
- package/dist/lib/store/keyring.d.ts +16 -0
- package/dist/lib/store/keyring.js +45 -0
- package/dist/lib/store/memory-store.d.ts +10 -0
- package/dist/lib/store/memory-store.js +21 -0
- package/oclif.manifest.json +851 -0
- package/package.json +79 -0
package/README.md
ADDED
|
@@ -0,0 +1,659 @@
|
|
|
1
|
+
# flipstream
|
|
2
|
+
|
|
3
|
+
Flipstream CLI — query your Flipstream data from the terminal. A thin OAuth2 client that
|
|
4
|
+
authenticates once and prints clean **structured JSON** for AI coding agents.
|
|
5
|
+
|
|
6
|
+
> **Architecture:** this supersedes `flipstream-cli-kickoff.md`. See [`CLAUDE.md`](./CLAUDE.md)
|
|
7
|
+
> for the corrected model (thin client, two hosts, **no natural-language "ask"**).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- [Bun](https://bun.sh) (development toolchain)
|
|
12
|
+
- Node.js **20+** (the published CLI runs under Node)
|
|
13
|
+
|
|
14
|
+
## Install (development)
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
bun install
|
|
18
|
+
bun run build
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
./bin/run.js --help # or during dev: bun bin/dev.js --help
|
|
25
|
+
./bin/run.js --version
|
|
26
|
+
./bin/run.js version --json # {version,node,platform,contractVersion}
|
|
27
|
+
./bin/run.js auth login # opens the browser to sign in (OAuth2 + PKCE)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## For agents (Claude Code / Codex / MCP)
|
|
31
|
+
|
|
32
|
+
The CLI is self-describing. Discover the whole surface in one call, then invoke:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
flipstream commands --json # full machine-readable catalog: every command's
|
|
36
|
+
# id, summary, description, flags, args, aliases
|
|
37
|
+
flipstream <command> --help # detail for one command
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Output is a deterministic agent contract — **stdout = data** (JSON via `--json`,
|
|
41
|
+
NDJSON via `--ndjson`), **stderr = diagnostics**, and on failure a single
|
|
42
|
+
`{"error":{"code","message","exit"}}` envelope on **stdout** so
|
|
43
|
+
`flipstream <cmd> --json 2>/dev/null | jq .` works on success *and* failure.
|
|
44
|
+
Branch on `error.code` + the exit code. The full contract (exit codes, error
|
|
45
|
+
taxonomy, per-command shapes, `CONTRACT_VERSION`) lives in
|
|
46
|
+
[`docs/AGENT-CONTRACT.md`](./docs/AGENT-CONTRACT.md) and is enforced by a
|
|
47
|
+
conformance suite.
|
|
48
|
+
|
|
49
|
+
## Scripts
|
|
50
|
+
|
|
51
|
+
- `bun run build` — compile TypeScript to `dist/`
|
|
52
|
+
- `bun run lint` — eslint (flat config)
|
|
53
|
+
- `bun run check:secrets` — static deny-list gate over `src/lib/auth` (CI-enforced)
|
|
54
|
+
- `bun run format` — prettier
|
|
55
|
+
- `bun test` — run the test suite
|
|
56
|
+
- `bun run dev` — run the CLI from source (`./bin/dev.js`)
|
|
57
|
+
|
|
58
|
+
## Security
|
|
59
|
+
|
|
60
|
+
The CLI is a **public OAuth2 client** (Authorization Code + PKCE + Dynamic Client
|
|
61
|
+
Registration) — it holds **no client secret**.
|
|
62
|
+
|
|
63
|
+
- **Tokens live only in the OS keychain** (`@napi-rs/keyring`, service id
|
|
64
|
+
`io.flipstream.cli`); nothing is written to disk in plaintext, and the
|
|
65
|
+
non-secret config under `~/.config/flipstream-cli` never contains tokens.
|
|
66
|
+
- **Tokens are never printed.** Every log/error/`--json` path is routed through a
|
|
67
|
+
redactor that masks JWT-shaped values, `Authorization: Bearer` headers, and
|
|
68
|
+
secret URL/form params. `auth login` prints only the decoded (display-only) claims.
|
|
69
|
+
- **PKCE is S256-only**; `state` and the PKCE verifier come from a CSPRNG
|
|
70
|
+
(`node:crypto`), never `Math.random`.
|
|
71
|
+
- **The loopback redirect binds `127.0.0.1` only** (RFC 8252) — never `0.0.0.0`/`::`.
|
|
72
|
+
- **No command exposes a `--token`/`--secret`/`--verifier`/`--bearer` flag.**
|
|
73
|
+
- **No telemetry, no phone-home.** The CLI collects no analytics and makes no
|
|
74
|
+
network calls beyond the OAuth provider and the data host you query. There is no
|
|
75
|
+
update-notifier dependency; were one ever added, its notice would go to **stderr
|
|
76
|
+
only** (never stdout — it would corrupt `--json`/NDJSON), honor `NO_COLOR`, and be
|
|
77
|
+
disableable via `FLIPSTREAM_DISABLE_UPDATE_CHECK`.
|
|
78
|
+
|
|
79
|
+
`bun run check:secrets` (a CI gate) and `test/security/no-secrets.test.ts` enforce
|
|
80
|
+
these invariants on every change.
|
|
81
|
+
|
|
82
|
+
## Uninstall / purge
|
|
83
|
+
|
|
84
|
+
`flipstream auth clear-all` removes **every** keychain entry under
|
|
85
|
+
`io.flipstream.cli` (best-effort revoking each host's refresh token first) and
|
|
86
|
+
deletes `~/.config/flipstream-cli`. Run it **before** removing the binary —
|
|
87
|
+
uninstalling the package/Homebrew/Scoop artifact does **not** clean these up, so
|
|
88
|
+
without it the keychain items and config dir are orphaned.
|
|
89
|
+
|
|
90
|
+
If you already removed the binary, clean up manually:
|
|
91
|
+
|
|
92
|
+
- **macOS:** Keychain Access → search `io.flipstream.cli` → delete the items.
|
|
93
|
+
- **Linux:** `secret-tool clear service io.flipstream.cli` (libsecret).
|
|
94
|
+
- **Windows:** Credential Manager → remove `io.flipstream.cli` entries.
|
|
95
|
+
- **All:** `rm -rf ~/.config/flipstream-cli`.
|
|
96
|
+
|
|
97
|
+
## Commands
|
|
98
|
+
|
|
99
|
+
<!-- commands -->
|
|
100
|
+
* [`flipstream auth clear-all`](#flipstream-auth-clear-all)
|
|
101
|
+
* [`flipstream auth login`](#flipstream-auth-login)
|
|
102
|
+
* [`flipstream auth logout`](#flipstream-auth-logout)
|
|
103
|
+
* [`flipstream auth status`](#flipstream-auth-status)
|
|
104
|
+
* [`flipstream commands`](#flipstream-commands)
|
|
105
|
+
* [`flipstream conn list`](#flipstream-conn-list)
|
|
106
|
+
* [`flipstream connections list`](#flipstream-connections-list)
|
|
107
|
+
* [`flipstream query`](#flipstream-query)
|
|
108
|
+
* [`flipstream version`](#flipstream-version)
|
|
109
|
+
* [`flipstream workspaces connections ID`](#flipstream-workspaces-connections-id)
|
|
110
|
+
* [`flipstream workspaces get ID`](#flipstream-workspaces-get-id)
|
|
111
|
+
* [`flipstream workspaces list`](#flipstream-workspaces-list)
|
|
112
|
+
* [`flipstream ws connections ID`](#flipstream-ws-connections-id)
|
|
113
|
+
* [`flipstream ws get ID`](#flipstream-ws-get-id)
|
|
114
|
+
* [`flipstream ws list`](#flipstream-ws-list)
|
|
115
|
+
|
|
116
|
+
## `flipstream auth clear-all`
|
|
117
|
+
|
|
118
|
+
Purge ALL credentials: every keychain entry and the local config dir.
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
USAGE
|
|
122
|
+
$ flipstream auth clear-all [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--no-revoke]
|
|
123
|
+
|
|
124
|
+
FLAGS
|
|
125
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
126
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
127
|
+
--no-revoke Clear local credentials only; skip the per-host server revocation calls.
|
|
128
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
129
|
+
--verbose Print redacted diagnostics to stderr.
|
|
130
|
+
|
|
131
|
+
GLOBAL FLAGS
|
|
132
|
+
--json Format output as json.
|
|
133
|
+
|
|
134
|
+
DESCRIPTION
|
|
135
|
+
Purge ALL credentials: every keychain entry and the local config dir.
|
|
136
|
+
|
|
137
|
+
Purge ALL Flipstream credentials: every keychain entry and the local config directory.
|
|
138
|
+
|
|
139
|
+
EXAMPLES
|
|
140
|
+
$ flipstream auth clear-all
|
|
141
|
+
|
|
142
|
+
$ flipstream auth clear-all --no-revoke
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## `flipstream auth login`
|
|
146
|
+
|
|
147
|
+
Log in via the browser (OAuth2 + PKCE).
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
USAGE
|
|
151
|
+
$ flipstream auth login [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--no-browser]
|
|
152
|
+
[--scope <value>...]
|
|
153
|
+
|
|
154
|
+
FLAGS
|
|
155
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
156
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
157
|
+
--no-browser Headless mode: print the authorization URL, then paste the redirected URL back (no browser).
|
|
158
|
+
--scope=<value>... OAuth scope (repeatable).
|
|
159
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
160
|
+
--verbose Print redacted diagnostics to stderr.
|
|
161
|
+
|
|
162
|
+
GLOBAL FLAGS
|
|
163
|
+
--json Format output as json.
|
|
164
|
+
|
|
165
|
+
DESCRIPTION
|
|
166
|
+
Log in via the browser (OAuth2 + PKCE).
|
|
167
|
+
|
|
168
|
+
Log in to Flipstream in the browser (OAuth2 Authorization Code + PKCE).
|
|
169
|
+
|
|
170
|
+
EXAMPLES
|
|
171
|
+
$ flipstream auth login
|
|
172
|
+
|
|
173
|
+
$ flipstream auth login --no-browser
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## `flipstream auth logout`
|
|
177
|
+
|
|
178
|
+
Log out: revoke the token (best-effort) and clear the keychain.
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
USAGE
|
|
182
|
+
$ flipstream auth logout [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--no-revoke]
|
|
183
|
+
|
|
184
|
+
FLAGS
|
|
185
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
186
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
187
|
+
--no-revoke Clear local credentials only; skip the server revocation call.
|
|
188
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
189
|
+
--verbose Print redacted diagnostics to stderr.
|
|
190
|
+
|
|
191
|
+
GLOBAL FLAGS
|
|
192
|
+
--json Format output as json.
|
|
193
|
+
|
|
194
|
+
DESCRIPTION
|
|
195
|
+
Log out: revoke the token (best-effort) and clear the keychain.
|
|
196
|
+
|
|
197
|
+
Log out of Flipstream: revoke the token (best-effort) and clear the keychain.
|
|
198
|
+
|
|
199
|
+
EXAMPLES
|
|
200
|
+
$ flipstream auth logout
|
|
201
|
+
|
|
202
|
+
$ flipstream auth logout --no-revoke
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## `flipstream auth status`
|
|
206
|
+
|
|
207
|
+
Show whether you are logged in, and your account, scopes, and expiry.
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
USAGE
|
|
211
|
+
$ flipstream auth status [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose]
|
|
212
|
+
|
|
213
|
+
FLAGS
|
|
214
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
215
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
216
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
217
|
+
--verbose Print redacted diagnostics to stderr.
|
|
218
|
+
|
|
219
|
+
GLOBAL FLAGS
|
|
220
|
+
--json Format output as json.
|
|
221
|
+
|
|
222
|
+
DESCRIPTION
|
|
223
|
+
Show whether you are logged in, and your account, scopes, and expiry.
|
|
224
|
+
|
|
225
|
+
Show the current Flipstream authentication status for a host.
|
|
226
|
+
|
|
227
|
+
EXAMPLES
|
|
228
|
+
$ flipstream auth status
|
|
229
|
+
|
|
230
|
+
$ flipstream auth status --json
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## `flipstream commands`
|
|
234
|
+
|
|
235
|
+
List all flipstream commands.
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
USAGE
|
|
239
|
+
$ flipstream commands [--json] [-c id|plugin|summary|type... | --tree] [--deprecated] [-x | ] [--hidden]
|
|
240
|
+
[--no-truncate | ] [--sort id|plugin|summary|type | ]
|
|
241
|
+
|
|
242
|
+
FLAGS
|
|
243
|
+
-c, --columns=<option>... Only show provided columns (comma-separated).
|
|
244
|
+
<options: id|plugin|summary|type>
|
|
245
|
+
-x, --extended Show extra columns.
|
|
246
|
+
--deprecated Show deprecated commands.
|
|
247
|
+
--hidden Show hidden commands.
|
|
248
|
+
--no-truncate Do not truncate output.
|
|
249
|
+
--sort=<option> [default: id] Property to sort by.
|
|
250
|
+
<options: id|plugin|summary|type>
|
|
251
|
+
--tree Show tree of commands.
|
|
252
|
+
|
|
253
|
+
GLOBAL FLAGS
|
|
254
|
+
--json Format output as json.
|
|
255
|
+
|
|
256
|
+
DESCRIPTION
|
|
257
|
+
List all flipstream commands.
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
_See code: [@oclif/plugin-commands](https://github.com/oclif/plugin-commands/blob/4.1.59/src/commands/commands.ts)_
|
|
261
|
+
|
|
262
|
+
## `flipstream conn list`
|
|
263
|
+
|
|
264
|
+
List connections, org-wide or for one workspace.
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
USAGE
|
|
268
|
+
$ flipstream conn list [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--all] [--limit
|
|
269
|
+
<value>] [--offset <value>] [--q <value>] [--sort <value>] [--workspace <value>]
|
|
270
|
+
|
|
271
|
+
FLAGS
|
|
272
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
273
|
+
--all Fetch every page (drains pagination).
|
|
274
|
+
--limit=<value> [default: 50] Page size.
|
|
275
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
276
|
+
--offset=<value> Starting offset.
|
|
277
|
+
--q=<value> Free-text filter.
|
|
278
|
+
--sort=<value> Sort field.
|
|
279
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
280
|
+
--verbose Print redacted diagnostics to stderr.
|
|
281
|
+
--workspace=<value> List only this workspace's connections (UUID).
|
|
282
|
+
|
|
283
|
+
GLOBAL FLAGS
|
|
284
|
+
--json Format output as json.
|
|
285
|
+
|
|
286
|
+
DESCRIPTION
|
|
287
|
+
List connections, org-wide or for one workspace.
|
|
288
|
+
|
|
289
|
+
List connections (data sources) — org-wide, or for one workspace via --workspace (or `ws connections <id>`). Returns
|
|
290
|
+
each connection id + source metadata; secret_id / parameters are redacted. Targets the OAuth/admin host.
|
|
291
|
+
|
|
292
|
+
ALIASES
|
|
293
|
+
$ flipstream conn list
|
|
294
|
+
|
|
295
|
+
EXAMPLES
|
|
296
|
+
$ flipstream connections list
|
|
297
|
+
|
|
298
|
+
$ flipstream connections list --workspace <id> --json
|
|
299
|
+
|
|
300
|
+
$ flipstream conn list --all
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## `flipstream connections list`
|
|
304
|
+
|
|
305
|
+
List connections, org-wide or for one workspace.
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
USAGE
|
|
309
|
+
$ flipstream connections list [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--all] [--limit
|
|
310
|
+
<value>] [--offset <value>] [--q <value>] [--sort <value>] [--workspace <value>]
|
|
311
|
+
|
|
312
|
+
FLAGS
|
|
313
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
314
|
+
--all Fetch every page (drains pagination).
|
|
315
|
+
--limit=<value> [default: 50] Page size.
|
|
316
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
317
|
+
--offset=<value> Starting offset.
|
|
318
|
+
--q=<value> Free-text filter.
|
|
319
|
+
--sort=<value> Sort field.
|
|
320
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
321
|
+
--verbose Print redacted diagnostics to stderr.
|
|
322
|
+
--workspace=<value> List only this workspace's connections (UUID).
|
|
323
|
+
|
|
324
|
+
GLOBAL FLAGS
|
|
325
|
+
--json Format output as json.
|
|
326
|
+
|
|
327
|
+
DESCRIPTION
|
|
328
|
+
List connections, org-wide or for one workspace.
|
|
329
|
+
|
|
330
|
+
List connections (data sources) — org-wide, or for one workspace via --workspace (or `ws connections <id>`). Returns
|
|
331
|
+
each connection id + source metadata; secret_id / parameters are redacted. Targets the OAuth/admin host.
|
|
332
|
+
|
|
333
|
+
ALIASES
|
|
334
|
+
$ flipstream conn list
|
|
335
|
+
|
|
336
|
+
EXAMPLES
|
|
337
|
+
$ flipstream connections list
|
|
338
|
+
|
|
339
|
+
$ flipstream connections list --workspace <id> --json
|
|
340
|
+
|
|
341
|
+
$ flipstream conn list --all
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
## `flipstream query`
|
|
345
|
+
|
|
346
|
+
Run an opaque query against the Flipstream data API.
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
USAGE
|
|
350
|
+
$ flipstream query [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--auth-host <value>]
|
|
351
|
+
[--body <value> | --body-file <value>]
|
|
352
|
+
|
|
353
|
+
FLAGS
|
|
354
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
355
|
+
--auth-host=<value> OAuth issuer host for credentials/refresh (defaults to the prod issuer).
|
|
356
|
+
--body=<value> Opaque JSON request body as a string.
|
|
357
|
+
--body-file=<value> Path to a file holding the opaque JSON request body.
|
|
358
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
359
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
360
|
+
--verbose Print redacted diagnostics to stderr.
|
|
361
|
+
|
|
362
|
+
GLOBAL FLAGS
|
|
363
|
+
--json Format output as json.
|
|
364
|
+
|
|
365
|
+
DESCRIPTION
|
|
366
|
+
Run an opaque query against the Flipstream data API.
|
|
367
|
+
|
|
368
|
+
Send an OPAQUE JSON body (--body, --body-file, or piped stdin) to the Flipstream data API and print the structured
|
|
369
|
+
JSON response. The CLI never constructs, validates, or transforms the query payload — the body is forwarded verbatim
|
|
370
|
+
(your agent/Skill builds it).
|
|
371
|
+
|
|
372
|
+
EXAMPLES
|
|
373
|
+
$ flipstream query --body '{"opaque":true}'
|
|
374
|
+
|
|
375
|
+
echo '{"opaque":true}' | flipstream query
|
|
376
|
+
|
|
377
|
+
$ flipstream query --body-file query.json --json
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
## `flipstream version`
|
|
381
|
+
|
|
382
|
+
Print version, runtime, and agent-contract version.
|
|
383
|
+
|
|
384
|
+
```
|
|
385
|
+
USAGE
|
|
386
|
+
$ flipstream version [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose]
|
|
387
|
+
|
|
388
|
+
FLAGS
|
|
389
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
390
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
391
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
392
|
+
--verbose Print redacted diagnostics to stderr.
|
|
393
|
+
|
|
394
|
+
GLOBAL FLAGS
|
|
395
|
+
--json Format output as json.
|
|
396
|
+
|
|
397
|
+
DESCRIPTION
|
|
398
|
+
Print version, runtime, and agent-contract version.
|
|
399
|
+
|
|
400
|
+
Print the CLI version, runtime, and agent-contract version as JSON.
|
|
401
|
+
|
|
402
|
+
EXAMPLES
|
|
403
|
+
$ flipstream version
|
|
404
|
+
|
|
405
|
+
$ flipstream version --json
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
## `flipstream workspaces connections ID`
|
|
409
|
+
|
|
410
|
+
List one workspace's connections.
|
|
411
|
+
|
|
412
|
+
```
|
|
413
|
+
USAGE
|
|
414
|
+
$ flipstream workspaces connections ID [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--all] [--limit
|
|
415
|
+
<value>] [--offset <value>] [--q <value>] [--sort <value>]
|
|
416
|
+
|
|
417
|
+
ARGUMENTS
|
|
418
|
+
ID Workspace id (UUID).
|
|
419
|
+
|
|
420
|
+
FLAGS
|
|
421
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
422
|
+
--all Fetch every page (drains pagination).
|
|
423
|
+
--limit=<value> [default: 50] Page size.
|
|
424
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
425
|
+
--offset=<value> Starting offset.
|
|
426
|
+
--q=<value> Free-text filter.
|
|
427
|
+
--sort=<value> Sort field.
|
|
428
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
429
|
+
--verbose Print redacted diagnostics to stderr.
|
|
430
|
+
|
|
431
|
+
GLOBAL FLAGS
|
|
432
|
+
--json Format output as json.
|
|
433
|
+
|
|
434
|
+
DESCRIPTION
|
|
435
|
+
List one workspace's connections.
|
|
436
|
+
|
|
437
|
+
List one workspace's connections — the ergonomic form of `connections list --workspace <id>`. Targets the OAuth/admin
|
|
438
|
+
host.
|
|
439
|
+
|
|
440
|
+
ALIASES
|
|
441
|
+
$ flipstream ws connections
|
|
442
|
+
|
|
443
|
+
EXAMPLES
|
|
444
|
+
$ flipstream workspaces connections <id>
|
|
445
|
+
|
|
446
|
+
$ flipstream ws connections <id> --json
|
|
447
|
+
|
|
448
|
+
$ flipstream ws connections <id> --all
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
## `flipstream workspaces get ID`
|
|
452
|
+
|
|
453
|
+
Show one workspace by id.
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
USAGE
|
|
457
|
+
$ flipstream workspaces get ID [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--refresh]
|
|
458
|
+
[--with-connection-count]
|
|
459
|
+
|
|
460
|
+
ARGUMENTS
|
|
461
|
+
ID Workspace id (UUID).
|
|
462
|
+
|
|
463
|
+
FLAGS
|
|
464
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
465
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
466
|
+
--refresh Ask the server to refresh derived data (refresh=true).
|
|
467
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
468
|
+
--verbose Print redacted diagnostics to stderr.
|
|
469
|
+
--with-connection-count Include connection_count (one extra request to the connections endpoint).
|
|
470
|
+
|
|
471
|
+
GLOBAL FLAGS
|
|
472
|
+
--json Format output as json.
|
|
473
|
+
|
|
474
|
+
DESCRIPTION
|
|
475
|
+
Show one workspace by id.
|
|
476
|
+
|
|
477
|
+
Fetch one workspace by id (the admin API "Client"). A foreign or missing id collapses to a single not-found message
|
|
478
|
+
(no existence leak). Targets the OAuth/admin host.
|
|
479
|
+
|
|
480
|
+
ALIASES
|
|
481
|
+
$ flipstream ws get
|
|
482
|
+
|
|
483
|
+
EXAMPLES
|
|
484
|
+
$ flipstream workspaces get <id>
|
|
485
|
+
|
|
486
|
+
$ flipstream ws get <id> --json
|
|
487
|
+
|
|
488
|
+
$ flipstream ws get <id> --with-connection-count
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
## `flipstream workspaces list`
|
|
492
|
+
|
|
493
|
+
List your organization's workspaces.
|
|
494
|
+
|
|
495
|
+
```
|
|
496
|
+
USAGE
|
|
497
|
+
$ flipstream workspaces list [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--all] [--limit
|
|
498
|
+
<value>] [--offset <value>] [--q <value>] [--sort <value>] [--with-connection-counts]
|
|
499
|
+
|
|
500
|
+
FLAGS
|
|
501
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
502
|
+
--all Fetch every page (drains pagination).
|
|
503
|
+
--limit=<value> [default: 50] Page size.
|
|
504
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
505
|
+
--offset=<value> Starting offset.
|
|
506
|
+
--q=<value> Free-text filter.
|
|
507
|
+
--sort=<value> Sort field.
|
|
508
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
509
|
+
--verbose Print redacted diagnostics to stderr.
|
|
510
|
+
--with-connection-counts Add connection_count per workspace (opt-in: one extra request each, N+1).
|
|
511
|
+
|
|
512
|
+
GLOBAL FLAGS
|
|
513
|
+
--json Format output as json.
|
|
514
|
+
|
|
515
|
+
DESCRIPTION
|
|
516
|
+
List your organization's workspaces.
|
|
517
|
+
|
|
518
|
+
List the workspaces (the Flipstream business entity, "Client" in the admin API) in your organization. Account-scoped
|
|
519
|
+
server-side (the CLI sends no org id). Targets the OAuth/admin host (whereas `query` targets the data host).
|
|
520
|
+
|
|
521
|
+
ALIASES
|
|
522
|
+
$ flipstream ws list
|
|
523
|
+
|
|
524
|
+
EXAMPLES
|
|
525
|
+
$ flipstream workspaces list
|
|
526
|
+
|
|
527
|
+
$ flipstream ws list --json
|
|
528
|
+
|
|
529
|
+
$ flipstream ws list --all
|
|
530
|
+
|
|
531
|
+
$ flipstream ws list --q acme --limit 10
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
## `flipstream ws connections ID`
|
|
535
|
+
|
|
536
|
+
List one workspace's connections.
|
|
537
|
+
|
|
538
|
+
```
|
|
539
|
+
USAGE
|
|
540
|
+
$ flipstream ws connections ID [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--all] [--limit
|
|
541
|
+
<value>] [--offset <value>] [--q <value>] [--sort <value>]
|
|
542
|
+
|
|
543
|
+
ARGUMENTS
|
|
544
|
+
ID Workspace id (UUID).
|
|
545
|
+
|
|
546
|
+
FLAGS
|
|
547
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
548
|
+
--all Fetch every page (drains pagination).
|
|
549
|
+
--limit=<value> [default: 50] Page size.
|
|
550
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
551
|
+
--offset=<value> Starting offset.
|
|
552
|
+
--q=<value> Free-text filter.
|
|
553
|
+
--sort=<value> Sort field.
|
|
554
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
555
|
+
--verbose Print redacted diagnostics to stderr.
|
|
556
|
+
|
|
557
|
+
GLOBAL FLAGS
|
|
558
|
+
--json Format output as json.
|
|
559
|
+
|
|
560
|
+
DESCRIPTION
|
|
561
|
+
List one workspace's connections.
|
|
562
|
+
|
|
563
|
+
List one workspace's connections — the ergonomic form of `connections list --workspace <id>`. Targets the OAuth/admin
|
|
564
|
+
host.
|
|
565
|
+
|
|
566
|
+
ALIASES
|
|
567
|
+
$ flipstream ws connections
|
|
568
|
+
|
|
569
|
+
EXAMPLES
|
|
570
|
+
$ flipstream workspaces connections <id>
|
|
571
|
+
|
|
572
|
+
$ flipstream ws connections <id> --json
|
|
573
|
+
|
|
574
|
+
$ flipstream ws connections <id> --all
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
## `flipstream ws get ID`
|
|
578
|
+
|
|
579
|
+
Show one workspace by id.
|
|
580
|
+
|
|
581
|
+
```
|
|
582
|
+
USAGE
|
|
583
|
+
$ flipstream ws get ID [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--refresh]
|
|
584
|
+
[--with-connection-count]
|
|
585
|
+
|
|
586
|
+
ARGUMENTS
|
|
587
|
+
ID Workspace id (UUID).
|
|
588
|
+
|
|
589
|
+
FLAGS
|
|
590
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
591
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
592
|
+
--refresh Ask the server to refresh derived data (refresh=true).
|
|
593
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
594
|
+
--verbose Print redacted diagnostics to stderr.
|
|
595
|
+
--with-connection-count Include connection_count (one extra request to the connections endpoint).
|
|
596
|
+
|
|
597
|
+
GLOBAL FLAGS
|
|
598
|
+
--json Format output as json.
|
|
599
|
+
|
|
600
|
+
DESCRIPTION
|
|
601
|
+
Show one workspace by id.
|
|
602
|
+
|
|
603
|
+
Fetch one workspace by id (the admin API "Client"). A foreign or missing id collapses to a single not-found message
|
|
604
|
+
(no existence leak). Targets the OAuth/admin host.
|
|
605
|
+
|
|
606
|
+
ALIASES
|
|
607
|
+
$ flipstream ws get
|
|
608
|
+
|
|
609
|
+
EXAMPLES
|
|
610
|
+
$ flipstream workspaces get <id>
|
|
611
|
+
|
|
612
|
+
$ flipstream ws get <id> --json
|
|
613
|
+
|
|
614
|
+
$ flipstream ws get <id> --with-connection-count
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
## `flipstream ws list`
|
|
618
|
+
|
|
619
|
+
List your organization's workspaces.
|
|
620
|
+
|
|
621
|
+
```
|
|
622
|
+
USAGE
|
|
623
|
+
$ flipstream ws list [--json] [-H <value>] [--ndjson] [--timeout <value>] [--verbose] [--all] [--limit
|
|
624
|
+
<value>] [--offset <value>] [--q <value>] [--sort <value>] [--with-connection-counts]
|
|
625
|
+
|
|
626
|
+
FLAGS
|
|
627
|
+
-H, --host=<value> OAuth provider host (defaults to the prod issuer).
|
|
628
|
+
--all Fetch every page (drains pagination).
|
|
629
|
+
--limit=<value> [default: 50] Page size.
|
|
630
|
+
--ndjson Stream output as NDJSON (one compact JSON object per line).
|
|
631
|
+
--offset=<value> Starting offset.
|
|
632
|
+
--q=<value> Free-text filter.
|
|
633
|
+
--sort=<value> Sort field.
|
|
634
|
+
--timeout=<value> Network timeout in milliseconds.
|
|
635
|
+
--verbose Print redacted diagnostics to stderr.
|
|
636
|
+
--with-connection-counts Add connection_count per workspace (opt-in: one extra request each, N+1).
|
|
637
|
+
|
|
638
|
+
GLOBAL FLAGS
|
|
639
|
+
--json Format output as json.
|
|
640
|
+
|
|
641
|
+
DESCRIPTION
|
|
642
|
+
List your organization's workspaces.
|
|
643
|
+
|
|
644
|
+
List the workspaces (the Flipstream business entity, "Client" in the admin API) in your organization. Account-scoped
|
|
645
|
+
server-side (the CLI sends no org id). Targets the OAuth/admin host (whereas `query` targets the data host).
|
|
646
|
+
|
|
647
|
+
ALIASES
|
|
648
|
+
$ flipstream ws list
|
|
649
|
+
|
|
650
|
+
EXAMPLES
|
|
651
|
+
$ flipstream workspaces list
|
|
652
|
+
|
|
653
|
+
$ flipstream ws list --json
|
|
654
|
+
|
|
655
|
+
$ flipstream ws list --all
|
|
656
|
+
|
|
657
|
+
$ flipstream ws list --q acme --limit 10
|
|
658
|
+
```
|
|
659
|
+
<!-- commandsstop -->
|
package/bin/dev.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// Dev entry: runs the TypeScript source directly (Bun transpiles on the fly).
|
|
3
|
+
import {execute} from '@oclif/core'
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line n/no-unpublished-import -- dev entry runs from src, never shipped
|
|
6
|
+
import {installCrashHandlers} from '../src/lib/command/crash.js'
|
|
7
|
+
|
|
8
|
+
installCrashHandlers()
|
|
9
|
+
await execute({development: true, dir: import.meta.url})
|
package/bin/run.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../lib/command/base.js';
|
|
2
|
+
export default class AuthClearAll extends BaseCommand<typeof AuthClearAll> {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
'no-revoke': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
};
|
|
8
|
+
static summary: string;
|
|
9
|
+
run(): Promise<Record<string, unknown>>;
|
|
10
|
+
}
|