@beryl-so/cli 0.2.0 → 0.5.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 +194 -149
- package/dist/adapters/cli.js +39 -11
- package/dist/adapters/mcp.js +6 -0
- package/dist/beryl-test-skill.js +136 -0
- package/dist/commands/account.js +3 -0
- package/dist/commands/auth.js +1 -0
- package/dist/commands/config-vars.js +1 -0
- package/dist/commands/credentials.js +2 -0
- package/dist/commands/environments.js +2 -0
- package/dist/commands/explorations.js +1 -0
- package/dist/commands/init.js +93 -14
- package/dist/commands/projects.js +1 -0
- package/dist/commands/runs.js +104 -2
- package/dist/commands/tests.js +23 -3
- package/dist/commands/workspaces.js +3 -0
- package/dist/local-run.js +168 -0
- package/dist/registry/index.js +3 -0
- package/dist/schema.generated.js +152 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,9 +12,10 @@ that exposes every command to coding agents.
|
|
|
12
12
|
npx @beryl-so/cli@latest init
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Signs you in, pins this repo to a project (creating it if needed —
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
Signs you in, pins this repo to a project (creating it if needed — and asking whether
|
|
16
|
+
you want to author tests locally with your own coding agent, the default, or let Beryl's
|
|
17
|
+
agent explore and author them), and wires the MCP server into Claude Code or Cursor.
|
|
18
|
+
Safe to re-run.
|
|
18
19
|
|
|
19
20
|
## Install
|
|
20
21
|
|
|
@@ -58,223 +59,267 @@ Every non-interactive command below is exposed as an MCP tool with the same name
|
|
|
58
59
|
|
|
59
60
|
### init
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
|
62
|
+
Set up Beryl in this repo — sign in, pin a project, wire up your coding agent
|
|
63
|
+
|
|
64
|
+
| Command | Summary | MCP tool |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| `beryl init` | Set up Beryl in this repo — sign in, pin a project, wire up your coding agent | — |
|
|
64
67
|
|
|
65
68
|
### login
|
|
66
69
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
+
Authenticate the CLI with your Beryl account
|
|
71
|
+
|
|
72
|
+
| Command | Summary | MCP tool |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| `beryl login` | Authenticate the CLI with your Beryl account | — |
|
|
70
75
|
|
|
71
76
|
### logout
|
|
72
77
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
|
78
|
+
Remove the stored token from the CLI config
|
|
79
|
+
|
|
80
|
+
| Command | Summary | MCP tool |
|
|
81
|
+
| --- | --- | --- |
|
|
82
|
+
| `beryl logout` | Remove the stored token from the CLI config | `logout` |
|
|
76
83
|
|
|
77
84
|
### whoami
|
|
78
85
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
|
86
|
+
Show the signed-in account and the CLI's resolved defaults
|
|
87
|
+
|
|
88
|
+
| Command | Summary | MCP tool |
|
|
89
|
+
| --- | --- | --- |
|
|
90
|
+
| `beryl whoami` | Show the signed-in account and the CLI's resolved defaults | `whoami` |
|
|
82
91
|
|
|
83
92
|
### tokens
|
|
84
93
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
| `beryl tokens
|
|
94
|
+
Manage the personal access tokens that authenticate the CLI and CI.
|
|
95
|
+
|
|
96
|
+
| Command | Summary | MCP tool |
|
|
97
|
+
| --- | --- | --- |
|
|
98
|
+
| `beryl tokens list` | List your personal access tokens | `tokens_list` |
|
|
99
|
+
| `beryl tokens create <name>` | Mint a new personal access token (shown once) | `tokens_create` |
|
|
100
|
+
| `beryl tokens revoke <token-id>` | Revoke a personal access token | `tokens_revoke` |
|
|
90
101
|
|
|
91
102
|
### workspaces
|
|
92
103
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
| `beryl workspaces
|
|
98
|
-
| `beryl workspaces
|
|
99
|
-
| `beryl workspaces
|
|
100
|
-
| `beryl workspaces
|
|
101
|
-
| `beryl workspaces
|
|
102
|
-
| `beryl workspaces
|
|
104
|
+
Create and manage workspaces, and pick the one your commands act on by default.
|
|
105
|
+
|
|
106
|
+
| Command | Summary | MCP tool |
|
|
107
|
+
| --- | --- | --- |
|
|
108
|
+
| `beryl workspaces list` | List workspaces you belong to | `workspaces_list` |
|
|
109
|
+
| `beryl workspaces get` | Show one workspace | `workspaces_get` |
|
|
110
|
+
| `beryl workspaces create <name>` | Create a workspace | `workspaces_create` |
|
|
111
|
+
| `beryl workspaces update` | Rename a workspace or change its visibility | `workspaces_update` |
|
|
112
|
+
| `beryl workspaces delete` | Delete a workspace and everything in it | `workspaces_delete` |
|
|
113
|
+
| `beryl workspaces use <workspace>` | Set the default workspace for future commands | `workspaces_use` |
|
|
114
|
+
| `beryl workspaces history` | Show the workspace's action history (who did what, when) | `workspaces_history` |
|
|
115
|
+
| `beryl workspaces leave` | Leave a workspace you are a member of | `workspaces_leave` |
|
|
103
116
|
|
|
104
117
|
### members
|
|
105
118
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
| `beryl members
|
|
119
|
+
Manage who belongs to a workspace and their roles.
|
|
120
|
+
|
|
121
|
+
| Command | Summary | MCP tool |
|
|
122
|
+
| --- | --- | --- |
|
|
123
|
+
| `beryl members list` | List workspace members | `members_list` |
|
|
124
|
+
| `beryl members set-role <user-id> <role>` | Change a member's role | `members_set_role` |
|
|
125
|
+
| `beryl members remove <user-id>` | Remove a member from the workspace | `members_remove` |
|
|
111
126
|
|
|
112
127
|
### invites
|
|
113
128
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
| `beryl invites
|
|
119
|
-
| `beryl invites
|
|
120
|
-
| `beryl invites
|
|
121
|
-
| `beryl invites
|
|
129
|
+
Send, list, and revoke workspace invitations, and accept ones sent to you.
|
|
130
|
+
|
|
131
|
+
| Command | Summary | MCP tool |
|
|
132
|
+
| --- | --- | --- |
|
|
133
|
+
| `beryl invites send <email>` | Invite someone to the workspace by email | `invites_send` |
|
|
134
|
+
| `beryl invites list` | List the workspace's outstanding invitations | `invites_list` |
|
|
135
|
+
| `beryl invites revoke <invitation-id>` | Revoke a pending invitation | `invites_revoke` |
|
|
136
|
+
| `beryl invites mine` | List invitations sent to you | `invites_mine` |
|
|
137
|
+
| `beryl invites accept <invitation>` | Accept an invitation (by id, or by the token from the invite email) | `invites_accept` |
|
|
138
|
+
| `beryl invites decline <invitation-id>` | Decline an invitation | `invites_decline` |
|
|
122
139
|
|
|
123
140
|
### projects
|
|
124
141
|
|
|
142
|
+
Create and manage projects — a site Beryl explores, authors tests for, and runs.
|
|
143
|
+
|
|
125
144
|
`beryl projects` with no subcommand runs `projects list`.
|
|
126
145
|
|
|
127
|
-
| Command | Summary |
|
|
128
|
-
| --- | --- |
|
|
129
|
-
| `beryl projects list` | List projects in the workspace |
|
|
130
|
-
| `beryl projects get` | Show one project, including its current exploration state |
|
|
131
|
-
| `beryl projects create <url>` | Create a project — the agent starts exploring and authoring tests immediately |
|
|
132
|
-
| `beryl projects rename <name>` | Rename a project |
|
|
133
|
-
| `beryl projects delete` | Delete a project and all its tests and runs |
|
|
134
|
-
| `beryl projects re-explore` | Send the agent back in — run/heal existing tests and discover new flows |
|
|
135
|
-
| `beryl projects report` | Aggregate quality report across recent runs (pass rates, flaky tests, trend) |
|
|
136
|
-
| `beryl projects reusable-auth <url>` | Check whether a saved login can be reused for a URL before creating a project |
|
|
137
|
-
| `beryl projects use <project>` | Set the default project for future commands |
|
|
146
|
+
| Command | Summary | MCP tool |
|
|
147
|
+
| --- | --- | --- |
|
|
148
|
+
| `beryl projects list` | List projects in the workspace | `projects_list` |
|
|
149
|
+
| `beryl projects get` | Show one project, including its current exploration state | `projects_get` |
|
|
150
|
+
| `beryl projects create <url>` | Create a project — the agent starts exploring and authoring tests immediately | `projects_create` |
|
|
151
|
+
| `beryl projects rename <name>` | Rename a project | `projects_rename` |
|
|
152
|
+
| `beryl projects delete` | Delete a project and all its tests and runs | `projects_delete` |
|
|
153
|
+
| `beryl projects re-explore` | Send the agent back in — run/heal existing tests and discover new flows | `projects_re_explore` |
|
|
154
|
+
| `beryl projects report` | Aggregate quality report across recent runs (pass rates, flaky tests, trend) | `projects_report` |
|
|
155
|
+
| `beryl projects reusable-auth <url>` | Check whether a saved login can be reused for a URL before creating a project | `projects_reusable_auth` |
|
|
156
|
+
| `beryl projects use <project>` | Set the default project for future commands | `projects_use` |
|
|
138
157
|
|
|
139
158
|
### envs
|
|
140
159
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
| `beryl envs
|
|
146
|
-
| `beryl envs
|
|
147
|
-
| `beryl envs
|
|
160
|
+
Manage a project's environments — the URLs and auth Beryl runs tests against.
|
|
161
|
+
|
|
162
|
+
| Command | Summary | MCP tool |
|
|
163
|
+
| --- | --- | --- |
|
|
164
|
+
| `beryl envs list` | List a project's environments | `envs_list` |
|
|
165
|
+
| `beryl envs get <env-id>` | Show one environment | `envs_get` |
|
|
166
|
+
| `beryl envs create <name> <url>` | Add an environment (e.g. staging) to a project | `envs_create` |
|
|
167
|
+
| `beryl envs update <env-id>` | Update an environment's name, URL, or auth settings | `envs_update` |
|
|
168
|
+
| `beryl envs delete <env-id>` | Delete an environment | `envs_delete` |
|
|
148
169
|
|
|
149
170
|
### schedule
|
|
150
171
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
| `beryl schedule
|
|
172
|
+
View and set the schedule on which Beryl runs a project's tests automatically.
|
|
173
|
+
|
|
174
|
+
| Command | Summary | MCP tool |
|
|
175
|
+
| --- | --- | --- |
|
|
176
|
+
| `beryl schedule get` | Show the project's daily/weekly run schedule | `schedule_get` |
|
|
177
|
+
| `beryl schedule set` | Enable scheduled runs (daily, or weekly on a given day) | `schedule_set` |
|
|
178
|
+
| `beryl schedule disable` | Turn scheduled runs off | `schedule_disable` |
|
|
156
179
|
|
|
157
180
|
### tests
|
|
158
181
|
|
|
182
|
+
Author, inspect, version, and heal a project's tests — the checks Beryl runs on each run.
|
|
183
|
+
|
|
159
184
|
`beryl tests` with no subcommand runs `tests list`.
|
|
160
185
|
|
|
161
|
-
| Command | Summary |
|
|
162
|
-
| --- | --- |
|
|
163
|
-
| `beryl tests lint` | Validate a plan JSON file offline, before sending it to the server |
|
|
164
|
-
| `beryl tests list` | List the project's tests with their latest result |
|
|
165
|
-
| `beryl tests get <test-id>` | Show one test |
|
|
166
|
-
| `beryl tests plan <test-id>` | Print a test's current step plan (JSON) |
|
|
167
|
-
| `beryl tests create` | Create a test case from a JSON action plan — for tests authored locally, e.g. by your coding agent |
|
|
168
|
-
| `beryl tests set-plan <test-id>` | Replace a test's step plan from a JSON file (creates a new version) |
|
|
169
|
-
| `beryl tests rename <test-id> <title>` | Rename a test |
|
|
170
|
-
| `beryl tests quarantine <test-id> <state>` | Mute a flaky test: it keeps running, but its failures stop failing the run |
|
|
171
|
-
| `beryl tests delete <test-id>` | Delete a test, its version history, and its results |
|
|
172
|
-
| `beryl tests recompile <test-id>` | Validate + verify an edited plan against the live site before persisting |
|
|
173
|
-
| `beryl tests versions <test-id>` | List a test's version history |
|
|
174
|
-
| `beryl tests version <test-id> <version-no>` | Show one specific version of a test (including its plan) |
|
|
175
|
-
| `beryl tests diff <test-id> <from> <to>` | Diff two versions of a test's plan |
|
|
176
|
-
| `beryl tests restore <test-id> <version-no>` | Restore a test to an earlier version |
|
|
177
|
-
| `beryl tests reset <test-id>` | Discard user edits and return the test to its latest system-authored version |
|
|
178
|
-
| `beryl tests heal <test-id> <state>` | Turn self-healing on or off for a test |
|
|
179
|
-
| `beryl tests history <test-id>` | Pass/fail history, streak, and stability for a test |
|
|
180
|
-
| `beryl tests script <test-id>` | Print the rendered Playwright spec for a test |
|
|
181
|
-
| `beryl tests export <test-ids...>` | Export tests as Playwright .spec.ts files in a ZIP |
|
|
186
|
+
| Command | Summary | MCP tool |
|
|
187
|
+
| --- | --- | --- |
|
|
188
|
+
| `beryl tests lint` | Validate a plan JSON file offline, before sending it to the server | `tests_lint` |
|
|
189
|
+
| `beryl tests list` | List the project's tests with their latest result | `tests_list` |
|
|
190
|
+
| `beryl tests get <test-id>` | Show one test | `tests_get` |
|
|
191
|
+
| `beryl tests plan <test-id>` | Print a test's current step plan (JSON) | `tests_plan` |
|
|
192
|
+
| `beryl tests create` | Create a test case from a JSON action plan — for tests authored locally, e.g. by your coding agent | `tests_create` |
|
|
193
|
+
| `beryl tests set-plan <test-id>` | Replace a test's step plan from a JSON file (creates a new version) | `tests_set_plan` |
|
|
194
|
+
| `beryl tests rename <test-id> <title>` | Rename a test | `tests_rename` |
|
|
195
|
+
| `beryl tests quarantine <test-id> <state>` | Mute a flaky test: it keeps running, but its failures stop failing the run | `tests_quarantine` |
|
|
196
|
+
| `beryl tests delete <test-id>` | Delete a test, its version history, and its results | `tests_delete` |
|
|
197
|
+
| `beryl tests recompile <test-id>` | Validate + verify an edited plan against the live site before persisting | `tests_recompile` |
|
|
198
|
+
| `beryl tests versions <test-id>` | List a test's version history | `tests_versions` |
|
|
199
|
+
| `beryl tests version <test-id> <version-no>` | Show one specific version of a test (including its plan) | `tests_version` |
|
|
200
|
+
| `beryl tests diff <test-id> <from> <to>` | Diff two versions of a test's plan | `tests_diff` |
|
|
201
|
+
| `beryl tests restore <test-id> <version-no>` | Restore a test to an earlier version | `tests_restore` |
|
|
202
|
+
| `beryl tests reset <test-id>` | Discard user edits and return the test to its latest system-authored version | `tests_reset` |
|
|
203
|
+
| `beryl tests heal <test-id> <state>` | Turn self-healing on or off for a test | `tests_heal` |
|
|
204
|
+
| `beryl tests history <test-id>` | Pass/fail history, streak, and stability for a test | `tests_history` |
|
|
205
|
+
| `beryl tests script <test-id>` | Print the rendered Playwright spec for a test | `tests_script` |
|
|
206
|
+
| `beryl tests export <test-ids...>` | Export tests as Playwright .spec.ts files in a ZIP | `tests_export` |
|
|
182
207
|
|
|
183
208
|
### runs
|
|
184
209
|
|
|
210
|
+
Trigger a run of a project's tests (e.g. in CI), then watch, inspect, and download results.
|
|
211
|
+
|
|
185
212
|
`beryl runs` with no subcommand runs `runs list`.
|
|
186
213
|
|
|
187
|
-
| Command | Summary |
|
|
188
|
-
| --- | --- |
|
|
189
|
-
| `beryl runs trigger` | Trigger a test run (whole suite, a subset, or one environment) |
|
|
190
|
-
| `beryl runs
|
|
191
|
-
| `beryl runs
|
|
192
|
-
| `beryl runs
|
|
193
|
-
| `beryl runs
|
|
194
|
-
| `beryl runs
|
|
195
|
-
| `beryl runs
|
|
196
|
-
| `beryl runs
|
|
214
|
+
| Command | Summary | MCP tool |
|
|
215
|
+
| --- | --- | --- |
|
|
216
|
+
| `beryl runs trigger` | Trigger a test run (whole suite, a subset, or one environment) | `runs_trigger` |
|
|
217
|
+
| `beryl runs local <test-id>` | Run a banked test locally with your own Playwright (public flows) | `runs_local` |
|
|
218
|
+
| `beryl runs list` | List recent runs | `runs_list` |
|
|
219
|
+
| `beryl runs get <run-id>` | Show one run with its per-test results | `runs_get` |
|
|
220
|
+
| `beryl runs watch <run-id>` | Attach to a run and stream progress until it finishes | `runs_watch` |
|
|
221
|
+
| `beryl runs cancel <run-id>` | Cancel an in-flight run | `runs_cancel` |
|
|
222
|
+
| `beryl runs report <run-id>` | Show the generated report for a run | `runs_report` |
|
|
223
|
+
| `beryl runs download <run-id>` | Download a run's results, with its artifacts, to disk | `runs_download` |
|
|
224
|
+
| `beryl runs explain <result-id>` | Explain, with AI, why a test result failed | `runs_explain` |
|
|
197
225
|
|
|
198
226
|
### explorations
|
|
199
227
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
|
203
|
-
|
|
|
204
|
-
| `beryl explorations
|
|
205
|
-
| `beryl explorations
|
|
228
|
+
Inspect the agent's exploration runs — how it crawled a site and authored its tests.
|
|
229
|
+
|
|
230
|
+
| Command | Summary | MCP tool |
|
|
231
|
+
| --- | --- | --- |
|
|
232
|
+
| `beryl explorations list` | List the agent's exploration passes for a project | `explorations_list` |
|
|
233
|
+
| `beryl explorations get <exploration-id>` | Show one exploration: authored tests, abandoned flows, coverage, frontier | `explorations_get` |
|
|
234
|
+
| `beryl explorations steps <exploration-id>` | List every step the agent took in an exploration | `explorations_steps` |
|
|
235
|
+
| `beryl explorations watch <exploration-id>` | Stream an exploration live — watch the agent explore and author tests | `explorations_watch` |
|
|
206
236
|
|
|
207
237
|
### config
|
|
208
238
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
| `beryl config vars
|
|
214
|
-
| `beryl config
|
|
215
|
-
| `beryl config
|
|
216
|
-
| `beryl config secrets
|
|
217
|
-
| `beryl config
|
|
218
|
-
| `beryl config
|
|
219
|
-
| `beryl config files
|
|
220
|
-
| `beryl config files
|
|
239
|
+
Manage the variables, secrets, and files the agent can use while exploring and running.
|
|
240
|
+
|
|
241
|
+
| Command | Summary | MCP tool |
|
|
242
|
+
| --- | --- | --- |
|
|
243
|
+
| `beryl config vars list` | List the project's config variables (visible to the agent during runs) | `config_vars_list` |
|
|
244
|
+
| `beryl config vars set <key> <value>` | Create or update a config variable | `config_vars_set` |
|
|
245
|
+
| `beryl config vars delete <key>` | Delete a config variable | `config_vars_delete` |
|
|
246
|
+
| `beryl config secrets list` | List the project's secrets (values are never returned) | `config_secrets_list` |
|
|
247
|
+
| `beryl config secrets set <key> <value>` | Create a secret (write-only; re-setting a key replaces it) | `config_secrets_set` |
|
|
248
|
+
| `beryl config secrets delete <key>` | Delete a secret | `config_secrets_delete` |
|
|
249
|
+
| `beryl config files list` | List files uploaded for the agent to use (e.g. CSVs, upload fixtures) | `config_files_list` |
|
|
250
|
+
| `beryl config files upload <file>` | Upload a file | `config_files_upload` |
|
|
251
|
+
| `beryl config files download <file-id>` | Get a short-lived download URL for a file | `config_files_download` |
|
|
252
|
+
| `beryl config files delete <file-id>` | Delete an uploaded file | `config_files_delete` |
|
|
221
253
|
|
|
222
254
|
### credentials
|
|
223
255
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
|
227
|
-
|
|
|
228
|
-
| `beryl credentials
|
|
229
|
-
| `beryl credentials
|
|
230
|
-
| `beryl credentials
|
|
231
|
-
| `beryl credentials
|
|
232
|
-
| `beryl credentials
|
|
233
|
-
| `beryl credentials
|
|
256
|
+
Manage saved logins Beryl reuses to test behind authentication, and attach them to projects.
|
|
257
|
+
|
|
258
|
+
| Command | Summary | MCP tool |
|
|
259
|
+
| --- | --- | --- |
|
|
260
|
+
| `beryl credentials list` | List the workspace's saved logins | `credentials_list` |
|
|
261
|
+
| `beryl credentials get <credential-id>` | Show one saved login (status and freshness — never the session itself) | `credentials_get` |
|
|
262
|
+
| `beryl credentials projects <credential-id>` | List the projects using a saved login | `credentials_projects` |
|
|
263
|
+
| `beryl credentials delete <credential-id>` | Delete a saved login | `credentials_delete` |
|
|
264
|
+
| `beryl credentials attach <credential-id>` | Attach a saved login to a project | `credentials_attach` |
|
|
265
|
+
| `beryl credentials detach` | Detach the project's saved login | `credentials_detach` |
|
|
266
|
+
| `beryl credentials recapture <credential-id>` | Start a re-capture for an expiring saved login (returns a live browser URL) | `credentials_recapture` |
|
|
267
|
+
| `beryl credentials capture` | Capture a login for the project interactively: log in once in a real browser | — |
|
|
234
268
|
|
|
235
269
|
### auth-capture
|
|
236
270
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
|
240
|
-
|
|
|
241
|
-
| `beryl auth-capture
|
|
242
|
-
| `beryl auth-capture
|
|
271
|
+
Drive a browser session that captures a target-site login for Beryl to reuse.
|
|
272
|
+
|
|
273
|
+
| Command | Summary | MCP tool |
|
|
274
|
+
| --- | --- | --- |
|
|
275
|
+
| `beryl auth-capture start` | Start a login-capture browser session for the project (non-interactive) | `auth_capture_start` |
|
|
276
|
+
| `beryl auth-capture capture <session-id>` | Capture the session after the user has logged in via the live-view URL | `auth_capture_capture` |
|
|
277
|
+
| `beryl auth-capture refresh <session-id>` | Capture a refreshed session for a project whose login is expiring | `auth_capture_refresh` |
|
|
278
|
+
| `beryl auth-capture release <session-id>` | Release a login-capture browser session without capturing | `auth_capture_release` |
|
|
243
279
|
|
|
244
280
|
### account
|
|
245
281
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
|
249
|
-
|
|
|
250
|
-
| `beryl account
|
|
282
|
+
View and update your personal account profile.
|
|
283
|
+
|
|
284
|
+
| Command | Summary | MCP tool |
|
|
285
|
+
| --- | --- | --- |
|
|
286
|
+
| `beryl account get` | Show your account profile | `account_get` |
|
|
287
|
+
| `beryl account update` | Update your profile | `account_update` |
|
|
288
|
+
| `beryl account deletion-preview` | Preview what deleting your account would remove or leave | `account_deletion_preview` |
|
|
251
289
|
|
|
252
290
|
### feedback
|
|
253
291
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
|
292
|
+
Send product feedback to the Beryl team.
|
|
293
|
+
|
|
294
|
+
| Command | Summary | MCP tool |
|
|
295
|
+
| --- | --- | --- |
|
|
296
|
+
| `beryl feedback send <message>` | Send product feedback to the Beryl team | `feedback_send` |
|
|
257
297
|
|
|
258
298
|
### billing
|
|
259
299
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
|
263
|
-
|
|
|
264
|
-
| `beryl billing
|
|
265
|
-
| `beryl billing
|
|
300
|
+
Review a workspace's plan usage, subscription, and invoices.
|
|
301
|
+
|
|
302
|
+
| Command | Summary | MCP tool |
|
|
303
|
+
| --- | --- | --- |
|
|
304
|
+
| `beryl billing usage` | Show plan usage: services and weekly AI units | `billing_usage` |
|
|
305
|
+
| `beryl billing subscription` | Show the workspace's subscription | `billing_subscription` |
|
|
306
|
+
| `beryl billing invoices` | List recent invoices | `billing_invoices` |
|
|
307
|
+
| `beryl billing portal` | Get a Stripe billing-portal link for the workspace | `billing_portal` |
|
|
266
308
|
|
|
267
309
|
### mcp
|
|
268
310
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
|
311
|
+
Run the Beryl MCP server (stdio) — every CLI command as an agent tool
|
|
312
|
+
|
|
313
|
+
| Command | Summary | MCP tool |
|
|
314
|
+
| --- | --- | --- |
|
|
315
|
+
| `beryl mcp` | Run the Beryl MCP server (stdio) — every CLI command as an agent tool | — |
|
|
272
316
|
|
|
273
317
|
Run `beryl <command> --help` for flags and examples.
|
|
274
318
|
|
|
275
319
|
## Global flags
|
|
276
320
|
|
|
321
|
+
- `-V, --version` — Print the CLI version and exit
|
|
277
322
|
- `--json` — Print machine-readable JSON (NDJSON for streams)
|
|
278
323
|
- `--api-url` — API base URL (default https://api.beryl.so)
|
|
279
324
|
- `--token` — Personal access token (overrides config/BERYL_API_KEY)
|
|
280
|
-
-
|
|
325
|
+
- `-h, --help` — Show help
|
package/dist/adapters/cli.js
CHANGED
|
@@ -4,8 +4,10 @@ import { createContext } from "../context.js";
|
|
|
4
4
|
import { CliError, EXIT_OK, EXIT_USAGE, UsageError } from "../errors.js";
|
|
5
5
|
import { ApiClient } from "../http.js";
|
|
6
6
|
import { autoFormat, bold, cyan, dim } from "../output.js";
|
|
7
|
-
import { commandGroups, findCommand } from "../registry/index.js";
|
|
7
|
+
import { commandGroups, findCommand, groupSummary } from "../registry/index.js";
|
|
8
|
+
import { mcpToolFor } from "./mcp.js";
|
|
8
9
|
export const GLOBAL_FLAGS = [
|
|
10
|
+
{ name: "version", description: "Print the CLI version and exit", alias: "V" },
|
|
9
11
|
{ name: "json", description: "Print machine-readable JSON (NDJSON for streams)" },
|
|
10
12
|
{ name: "api-url", description: "API base URL (default https://api.beryl.so)", value: true },
|
|
11
13
|
{ name: "token", description: "Personal access token (overrides config/BERYL_API_KEY)", value: true },
|
|
@@ -137,10 +139,25 @@ export function usageLine(spec) {
|
|
|
137
139
|
.join(" ");
|
|
138
140
|
return `Usage: beryl ${spec.name}${args ? " " + args : ""} [flags]`;
|
|
139
141
|
}
|
|
142
|
+
function globalFlagLabel(flag) {
|
|
143
|
+
const value = "value" in flag && flag.value ? " <value>" : "";
|
|
144
|
+
const long = `--${flag.name}${value}`;
|
|
145
|
+
return "alias" in flag && flag.alias ? `-${flag.alias}, ${long}` : long;
|
|
146
|
+
}
|
|
147
|
+
function globalFlagLines() {
|
|
148
|
+
const lines = [bold("Global options:")];
|
|
149
|
+
for (const g of GLOBAL_FLAGS) {
|
|
150
|
+
lines.push(` ${cyan(globalFlagLabel(g).padEnd(24))} ${g.description}`);
|
|
151
|
+
}
|
|
152
|
+
return lines;
|
|
153
|
+
}
|
|
140
154
|
export function commandHelp(spec) {
|
|
141
155
|
const lines = [spec.summary, "", usageLine(spec)];
|
|
142
156
|
if (spec.description)
|
|
143
157
|
lines.push("", spec.description);
|
|
158
|
+
const tool = mcpToolFor(spec);
|
|
159
|
+
if (tool)
|
|
160
|
+
lines.push("", `${dim("MCP tool:")} ${cyan(tool)}`);
|
|
144
161
|
if (spec.args?.length) {
|
|
145
162
|
lines.push("", bold("Arguments:"));
|
|
146
163
|
for (const a of spec.args)
|
|
@@ -154,10 +171,7 @@ export function commandHelp(spec) {
|
|
|
154
171
|
lines.push(` ${cyan(label.padEnd(24))} ${f.description}${suffix}`);
|
|
155
172
|
}
|
|
156
173
|
}
|
|
157
|
-
lines.push("",
|
|
158
|
-
for (const g of GLOBAL_FLAGS) {
|
|
159
|
-
lines.push(` ${cyan(("--" + g.name).padEnd(24))} ${g.description}`);
|
|
160
|
-
}
|
|
174
|
+
lines.push("", ...globalFlagLines());
|
|
161
175
|
if (spec.examples?.length) {
|
|
162
176
|
lines.push("", bold("Examples:"));
|
|
163
177
|
for (const e of spec.examples)
|
|
@@ -171,25 +185,39 @@ export function rootHelp() {
|
|
|
171
185
|
"",
|
|
172
186
|
"Usage: beryl <command> [args] [flags]",
|
|
173
187
|
"",
|
|
188
|
+
bold("Commands:"),
|
|
174
189
|
];
|
|
175
190
|
for (const [group, specs] of commandGroups()) {
|
|
176
|
-
|
|
177
|
-
|
|
191
|
+
const single = specs.length === 1 && specs[0].name === group;
|
|
192
|
+
const purpose = single ? specs[0].summary : groupSummary(specs);
|
|
193
|
+
lines.push(` ${cyan(group.padEnd(14))} ${purpose ?? ""}`.trimEnd());
|
|
194
|
+
if (single) {
|
|
195
|
+
const tool = mcpToolFor(specs[0]);
|
|
196
|
+
if (tool)
|
|
197
|
+
lines.push(` ${" ".repeat(14)} ${dim("MCP tool " + tool)}`);
|
|
178
198
|
}
|
|
179
199
|
else {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
200
|
+
const subs = specs.map((s) => s.name.split(" ").slice(1).join(" ")).join(", ");
|
|
201
|
+
const toolPrefix = group.replace(/-/g, "_");
|
|
202
|
+
const tools = specs.some((s) => mcpToolFor(s)) ? ` · ${dim("MCP tools " + toolPrefix + "_*")}` : "";
|
|
203
|
+
lines.push(` ${" ".repeat(14)} ${dim(subs)}`, ` ${" ".repeat(14)} ${dim(`beryl ${group} --help`)}${tools}`);
|
|
183
204
|
}
|
|
184
205
|
}
|
|
206
|
+
lines.push("", ...globalFlagLines());
|
|
185
207
|
lines.push("", `Run ${cyan("beryl <command> --help")} for details, ${cyan("beryl login")} to get started.`, `Docs: ${cyan("https://beryl.so/docs/cli")}`);
|
|
186
208
|
return lines.join("\n");
|
|
187
209
|
}
|
|
188
210
|
function groupHelp(group, specs) {
|
|
189
211
|
const lines = [`${bold("beryl " + group)} — subcommands:`, ""];
|
|
212
|
+
const purpose = groupSummary(specs);
|
|
213
|
+
if (purpose)
|
|
214
|
+
lines.push(purpose, "");
|
|
190
215
|
for (const spec of specs) {
|
|
191
216
|
const suffix = spec.groupDefault ? dim(` (default — \`beryl ${group}\` runs this)`) : "";
|
|
192
217
|
lines.push(` ${cyan(spec.name.padEnd(28))} ${spec.summary}${suffix}`);
|
|
218
|
+
const tool = mcpToolFor(spec);
|
|
219
|
+
if (tool)
|
|
220
|
+
lines.push(` ${" ".repeat(28)} ${dim("MCP tool " + tool)}`);
|
|
193
221
|
}
|
|
194
222
|
lines.push("", `Run ${cyan(`beryl ${group} <subcommand> --help`)} for details.`);
|
|
195
223
|
return lines.join("\n");
|
|
@@ -202,7 +230,7 @@ export async function runCli(argv) {
|
|
|
202
230
|
break;
|
|
203
231
|
words.push(tok);
|
|
204
232
|
}
|
|
205
|
-
if (argv.includes("--version") || argv[0] === "version") {
|
|
233
|
+
if (argv.includes("--version") || argv.includes("-V") || argv[0] === "version") {
|
|
206
234
|
process.stdout.write(cliVersion() + "\n");
|
|
207
235
|
return EXIT_OK;
|
|
208
236
|
}
|
package/dist/adapters/mcp.js
CHANGED
|
@@ -11,6 +11,12 @@ export function toolName(spec) {
|
|
|
11
11
|
export function mcpTools() {
|
|
12
12
|
return commands.filter((c) => !c.interactive && !c.hidden && c.name !== "mcp");
|
|
13
13
|
}
|
|
14
|
+
const mcpToolNames = new Set(mcpTools().map(toolName));
|
|
15
|
+
/** The tool name a command is exposed as under `beryl mcp`, or undefined if it isn't exposed. */
|
|
16
|
+
export function mcpToolFor(spec) {
|
|
17
|
+
const name = toolName(spec);
|
|
18
|
+
return mcpToolNames.has(name) ? name : undefined;
|
|
19
|
+
}
|
|
14
20
|
export function toolInputSchema(spec) {
|
|
15
21
|
const properties = {};
|
|
16
22
|
const required = [];
|