@roarkanalytics/cli 0.29.0 → 0.31.1
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/CHANGELOG.md +21 -0
- package/README.md +34 -0
- package/commands.js +35 -0
- package/completions.js +4 -4
- package/man/roark-project-list.1 +89 -0
- package/man/roark-whoami.1 +89 -0
- package/man/roark.1 +6 -0
- package/npm-shrinkwrap.json +6 -6
- package/package.json +5 -3
- package/runtime/browser-login.d.ts +15 -1
- package/runtime/browser-login.js +2 -1
- package/runtime/commands/api.js +4 -0
- package/runtime/commands/auth.js +99 -17
- package/runtime/commands/config.js +1 -0
- package/runtime/config.d.ts +12 -0
- package/runtime/config.js +1 -0
- package/runtime/program.d.ts +1 -0
- package/runtime/program.js +5 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.31.1](https://github.com/roarkhq/cli-roark-analytics/compare/v0.31.0...v0.31.1) (2026-09-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **deps:** require the SDK release that has the `project` option ([#77](https://github.com/roarkhq/cli-roark-analytics/issues/77)) ([04a2553](https://github.com/roarkhq/cli-roark-analytics/commit/04a255329242ab8abdc95acb77b26a6fcd7fff4d))
|
|
9
|
+
|
|
10
|
+
## [0.31.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.30.0...v0.31.0) (2026-09-29)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **project:** choose the project a command acts on ([#61](https://github.com/roarkhq/cli-roark-analytics/issues/61)) ([240b672](https://github.com/roarkhq/cli-roark-analytics/commit/240b67220696ca58c36f15e8c846cdffc396b293))
|
|
16
|
+
|
|
17
|
+
## [0.30.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.29.0...v0.30.0) (2026-09-28)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **cli:** cli update ([#74](https://github.com/roarkhq/cli-roark-analytics/issues/74)) ([2fd7ff5](https://github.com/roarkhq/cli-roark-analytics/commit/2fd7ff54f2dbfe0a47d933a96edd1cdc7d176d60))
|
|
23
|
+
|
|
3
24
|
## [0.29.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.28.0...v0.29.0) (2026-09-28)
|
|
4
25
|
|
|
5
26
|
|
package/README.md
CHANGED
|
@@ -40,6 +40,28 @@ a stored or environment credential to it. Pass `--allow-project-base-url` (or se
|
|
|
40
40
|
`ROARK_ALLOW_PROJECT_BASE_URL`) once you have read the file, or `--token` to send a
|
|
41
41
|
different credential.
|
|
42
42
|
|
|
43
|
+
## Choose a project
|
|
44
|
+
|
|
45
|
+
`auth login` gives you a credential that acts as you, and it can reach every project
|
|
46
|
+
you belong to. So commands need to know which project they act on. The login writes
|
|
47
|
+
the project you picked on the consent screen, and after that there is nothing to do:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
roark config set project <project-id> # change it
|
|
51
|
+
roark config get project # see it
|
|
52
|
+
roark agent list --project <id> # just this once
|
|
53
|
+
export ROARK_PROJECT_ID="..." # or for a shell
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Precedence is the usual one: `--project`, then `ROARK_PROJECT_ID`, then `.roark.json`,
|
|
57
|
+
then the user config. Committing `{"project": "..."}` in a repository's `.roark.json`
|
|
58
|
+
is the intended way to pin a checkout to one project, and unlike `baseURL` it needs no
|
|
59
|
+
opt-in: a project id chooses which of your own projects you act on, it cannot send your
|
|
60
|
+
credential anywhere new.
|
|
61
|
+
|
|
62
|
+
If you authenticate with a **project API key** instead, the key already names its
|
|
63
|
+
project and all of this is ignored.
|
|
64
|
+
|
|
43
65
|
## Usage
|
|
44
66
|
|
|
45
67
|
Commands read noun before verb, and the verb is one of `list`, `get`, `create`,
|
|
@@ -230,6 +252,12 @@ roark completion fish | source
|
|
|
230
252
|
| `roark metric variant list <id-or-slug>` | List a metric’s variants |
|
|
231
253
|
| `roark metric variant update <id-or-slug> <variant-id>` | Update a metric variant |
|
|
232
254
|
|
|
255
|
+
### project
|
|
256
|
+
|
|
257
|
+
| Command | Description |
|
|
258
|
+
| -------------------- | ------------------------------------------ |
|
|
259
|
+
| `roark project list` | List projects available to this credential |
|
|
260
|
+
|
|
233
261
|
### simulation
|
|
234
262
|
|
|
235
263
|
| Command | Description |
|
|
@@ -272,6 +300,12 @@ roark completion fish | source
|
|
|
272
300
|
| `roark webhook get <webhook-id>` | Get webhook by ID |
|
|
273
301
|
| `roark webhook list` | List webhooks |
|
|
274
302
|
|
|
303
|
+
### whoami
|
|
304
|
+
|
|
305
|
+
| Command | Description |
|
|
306
|
+
| -------------- | ------------------------------- |
|
|
307
|
+
| `roark whoami` | Describe the current credential |
|
|
308
|
+
|
|
275
309
|
## Requirements
|
|
276
310
|
|
|
277
311
|
Node.js 20 or newer.
|
package/commands.js
CHANGED
|
@@ -40,6 +40,7 @@ exports.GROUPS = {
|
|
|
40
40
|
'metric definition': 'Manage metric definitions',
|
|
41
41
|
'metric policy': 'Manage metric policies',
|
|
42
42
|
'metric variant': 'Manage metric variants',
|
|
43
|
+
project: 'Read projects',
|
|
43
44
|
simulation: 'Manage simulations',
|
|
44
45
|
'simulation environment': 'Manage simulation environments',
|
|
45
46
|
'simulation job': 'Read simulation jobs',
|
|
@@ -3562,6 +3563,23 @@ exports.COMMANDS = [
|
|
|
3562
3563
|
acceptsBody: true,
|
|
3563
3564
|
requiresAuth: true,
|
|
3564
3565
|
},
|
|
3566
|
+
{
|
|
3567
|
+
commandPath: ['project', 'list'],
|
|
3568
|
+
clientProperty: 'project',
|
|
3569
|
+
methodName: 'list',
|
|
3570
|
+
httpMethod: 'get',
|
|
3571
|
+
httpPath: '/v1/projects',
|
|
3572
|
+
summary: 'List projects available to this credential',
|
|
3573
|
+
description: 'Returns every project the calling credential may act on, with the permissions it holds in each. A project-scoped API key returns the single project it is bound to. A user-scoped credential returns the projects in its organization where the holder is an active member. Use the returned id in the X-Roark-Project-Id header.',
|
|
3574
|
+
positionals: [],
|
|
3575
|
+
flags: [],
|
|
3576
|
+
hasParams: false,
|
|
3577
|
+
paramsAllOptional: true,
|
|
3578
|
+
bodyOpaque: false,
|
|
3579
|
+
bodyVariants: [],
|
|
3580
|
+
acceptsBody: false,
|
|
3581
|
+
requiresAuth: true,
|
|
3582
|
+
},
|
|
3565
3583
|
{
|
|
3566
3584
|
commandPath: ['simulation', 'environment', 'create'],
|
|
3567
3585
|
clientProperty: 'simulationEnvironment',
|
|
@@ -5787,4 +5805,21 @@ exports.COMMANDS = [
|
|
|
5787
5805
|
acceptsBody: false,
|
|
5788
5806
|
requiresAuth: true,
|
|
5789
5807
|
},
|
|
5808
|
+
{
|
|
5809
|
+
commandPath: ['whoami'],
|
|
5810
|
+
clientProperty: 'me',
|
|
5811
|
+
methodName: 'get',
|
|
5812
|
+
httpMethod: 'get',
|
|
5813
|
+
httpPath: '/v1/me',
|
|
5814
|
+
summary: 'Describe the current credential',
|
|
5815
|
+
description: 'Returns the scope of the credential making the request, the organization it acts in, its default project (if any) and the permissions it was granted. Works for both project-scoped API keys and user-scoped credentials from the CLI or an MCP connector.',
|
|
5816
|
+
positionals: [],
|
|
5817
|
+
flags: [],
|
|
5818
|
+
hasParams: false,
|
|
5819
|
+
paramsAllOptional: true,
|
|
5820
|
+
bodyOpaque: false,
|
|
5821
|
+
bodyVariants: [],
|
|
5822
|
+
acceptsBody: false,
|
|
5823
|
+
requiresAuth: true,
|
|
5824
|
+
},
|
|
5790
5825
|
];
|