@beryl-so/cli

中文文档
0.117.5发布于 2026/11/07MITES Module近 30 天下载 3809

Beryl on the command line: projects, tests, runs, and everything else the web app manages.

原始使用文档
文档目录34 节
  1. Quickstart: one command
  2. Install
  3. Authenticate
  4. CI in one line
  5. MCP server
  6. Commands
  7. init
  8. guide
  9. login
  10. signup
  11. logout
  12. whoami
  13. tokens
  14. workspaces
  15. members
  16. invites
  17. projects
  18. envs
  19. schedule
  20. tests
  21. groups
  22. runs
  23. health
  24. jobs
  25. explorations
  26. config
  27. mailbox
  28. third-party-integrations
  29. accounts
  30. account
  31. feedback
  32. billing
  33. version
  34. Global flags

beryl CLI

Beryl on the command line: create projects, author tests, trigger runs in CI, and manage everything the web app can. Coding agents reach the same commands through Beryl's hosted MCP server at https://api.beryl.so/mcp.

Quickstart: one command

npx @beryl-so/cli@latest init

Signs you in (browser approval by default, emailed one-time code as fallback; new emails are signed up on the spot), registers the hosted MCP server in the agent you pick with --claude, --cursor, --vscode or --opencode (it asks when you pass none), and installs the beryl-test authoring skill. Safe to re-run.

Install

npm install -g @beryl-so/cli   # `beryl` on your PATH
npx @beryl-so/cli@latest …    # or run one-off without installing

From the monorepo (development): cd cli && npm install && npm run build && npm link.

beryl version reports whether the running CLI is behind the latest npm release (best-effort). Set BERYL_NO_UPDATE_CHECK=1 to skip that check.

The CLI reports which commands run (never their arguments or output) so onboarding can be measured; set BERYL_TELEMETRY=0 or DO_NOT_TRACK=1 to send nothing.

Authenticate

beryl login                  # opens the browser to approve; press Enter for an emailed code instead
beryl login --otp            # skip the browser; emailed one-time code (signs up new emails too)
export BERYL_API_KEY=beryl_pat_…   # CI: use a token from Account → Personal access tokens

Config stores your token + API URL only; nothing else persists. Point a command at a workspace/project with the --workspace / --project flags or the BERYL_WORKSPACE / BERYL_PROJECT env vars; with exactly one, the CLI auto-picks it. Precedence: flags > BERYL_* env > auto-pick-if-one.

CI in one line

beryl runs trigger --url-override "$PREVIEW_URL" --watch --timeout 30

Exit codes: 0 success / all tests passed · 1 failure · 2 usage error · 3 auth error · 4 plan limit reached.

A project CI token (BERYL_TOKEN=beryl_ci_…, from the project's Settings, CI tab) is enough to trigger runs and to turn a brief into tests: beryl jobs create "Cover the brief" --file ./brief.md --ci (pass --workspace and --project ids). A CI job never waits for input; what a login blocks is listed as skipped in beryl jobs get.

MCP server

claude mcp add --transport http -s user beryl https://api.beryl.so/mcp

Your agent signs you in through the server's OAuth the first time it connects (in Claude Code, run /mcp and pick beryl). Clients without OAuth send a personal access token as Authorization: Bearer beryl_pat_…. The server is always current, so there is nothing to update.

Most non-interactive commands below are exposed as an MCP tool with the same name (spaces and dashes become underscores); see the MCP tool column. none marks commands kept CLI-only: account/billing/team admin, feedback, cloud exploration, and the commands that read or write your local disk (logout, config files upload, config signing set).

Commands

init

Set up Beryl in this repo: sign in and wire up your coding agent

CommandSummaryMCP tool
beryl initSet up Beryl in this repo: sign in and wire up your coding agentnone

guide

Print the Beryl test guide, or one of its sections

CommandSummaryMCP tool
beryl guide [topic]Print the Beryl test guide, or one of its sectionsguide

login

Authenticate the CLI with your Beryl account

CommandSummaryMCP tool
beryl loginAuthenticate the CLI with your Beryl accountnone

signup

Register a new Beryl account (emails a 6-digit verification code)

CommandSummaryMCP tool
beryl signupRegister a new Beryl account (emails a 6-digit verification code)signup

logout

Remove the stored token from the CLI config

CommandSummaryMCP tool
beryl logoutRemove the stored token from the CLI confignone

whoami

Show the signed-in account

CommandSummaryMCP tool
beryl whoamiShow the signed-in accountwhoami

tokens

Manage the personal access tokens that authenticate the CLI and CI.

CommandSummaryMCP tool
beryl tokens listList your personal access tokenstokens_list
beryl tokens create <name>Mint a new personal access token (shown once)tokens_create
beryl tokens revoke <token-id>Revoke a personal access tokentokens_revoke
beryl tokens dismiss <token-id>Remove an already-revoked token from your listtokens_dismiss

workspaces

Create and manage workspaces, and pick the one your commands act on by default.

CommandSummaryMCP tool
beryl workspaces listList workspaces you belong toworkspaces_list
beryl workspaces getShow one workspaceworkspaces_get
beryl workspaces create <name>Create a workspaceworkspaces_create
beryl workspaces updateRename a workspace or change its visibilityworkspaces_update
beryl workspaces deleteDelete a workspace and everything in itworkspaces_delete
beryl workspaces historyShow who changed what in the workspace and its projects (schedules, tests, groups, environments, config names, accounts, tokens, members, settings), newest first, with filtersworkspaces_history
beryl workspaces leaveLeave a workspace you are a member ofworkspaces_leave

members

Manage who belongs to a workspace and their roles.

CommandSummaryMCP tool
beryl members listList workspace membersnone
beryl members set-role <user-id> <role>Change a member's rolenone
beryl members remove <user-id>Remove a member from the workspacenone

invites

Send, list, and revoke workspace invitations, and accept ones sent to you.

CommandSummaryMCP tool
beryl invites send <email>Invite someone to the workspace by emailnone
beryl invites listList the workspace's outstanding invitationsnone
beryl invites revoke <invitation-id>Revoke a pending invitationnone
beryl invites mineList invitations sent to younone
beryl invites accept <invitation>Accept an invitation (by id, or by the token from the invite email)none
beryl invites decline <invitation-id>Decline an invitationnone

projects

Create and manage projects: a site you author tests for and run.

beryl projects with no subcommand runs projects list.

CommandSummaryMCP tool
beryl projects listList projects across all your workspaces, or in one with --workspaceprojects_list
beryl projects getShow one project, including its current exploration stateprojects_get
beryl projects create [url]Create a project for a URL, or an empty one with just --nameprojects_create
beryl projects dismiss-capture-promptStop prompting to capture a signed-in session for this projectprojects_dismiss_capture_prompt
beryl projects rename <name>Rename a projectprojects_rename
beryl projects quarantine [state]Turn auto quarantine on or off and tune when it mutes and releases a testprojects_quarantine
beryl projects heal <state>Turn self-heal on or off for a projectprojects_heal
beryl projects surfaces [surfaces...]Turn project surfaces on or offprojects_surfaces
beryl projects findings-gate <mode>Turn the findings gate on each run on or offprojects_findings_gate
beryl projects deleteDelete a project and all its tests and runsprojects_delete
beryl projects re-exploreSend the agent back in to run/heal existing tests and discover new flowsnone
beryl projects reportAggregate quality report across recent runs (pass rates, per-test history, trend)projects_report
beryl projects reusable-auth <url>Check whether a saved login can be reused for a URL before creating a projectprojects_reusable_auth

envs

Manage a project's environments: the URLs and auth Beryl runs tests against.

CommandSummaryMCP tool
beryl envs listList a project's environmentsenvs_list
beryl envs get <env-id>Show one environmentenvs_get
beryl envs create <name> <url>Add an environment (e.g. staging) to a projectenvs_create
beryl envs update <env-id>Update an environment's name, URL, app ids, auth settings, Site Health screen sizes, schedule, CI and pages, or issue tracker settingsenvs_update
beryl envs delete <env-id>Delete an environmentenvs_delete

schedule

Manage the schedules on which Beryl runs a project's tests automatically. A project can hold many independent schedules; each has its own environment, cadence (daily or weekly), local run time, timezone, and target groups (none = every active test).

CommandSummaryMCP tool
beryl schedule listList the project's schedulesschedule_list
beryl schedule addAdd a schedule (daily, or weekly on a given day)schedule_add
beryl schedule update <schedule-id>Change a schedule's cadence, time, timezone, groups, or environmentschedule_update
beryl schedule remove <schedule-id>Remove a schedule (its tests and groups stay)schedule_remove

tests

Author, inspect, version, and heal a project's tests: the checks Beryl runs on each run.

beryl tests with no subcommand runs tests list.

CommandSummaryMCP tool
beryl tests listList the project's tests, each with its platforms and rolled-up statustests_list
beryl tests get <test-id>Show one test and its variantstests_get
beryl tests plan <test-id>Print a test's current step plan (JSON)tests_plan
beryl tests set-plan <test-id>Replace a test's step plan (creates a new version)tests_set_plan
beryl tests rename <test-id> <title>Rename a testtests_rename
beryl tests add-surface <test-id...>Create an existing test on more surfaces, as variants of the same testtests_add_surface
beryl tests skip-surface <test-id>Mark a test as not for a surface, so it is never offered as missing theretests_skip_surface
beryl tests set-intent <test-id> <intent>Edit what a test proves, the target heal judges againsttests_set_intent
beryl tests set-groups <test-id>Replace the groups a test belongs totests_set_groups
beryl tests set-access <test-id> <access>Mark a test read or writetests_set_access
beryl tests add-groups <test-ids...>Add groups to one or more tests, keeping the groups they already havetests_add_groups
beryl tests quarantine <state> <test-ids...>Mute flaky tests: they keep running, but their failures stop failing the runtests_quarantine
beryl tests events <test-id>Who quarantined, grouped or renamed a test, and whytests_events
beryl tests delete <test-ids...>Delete tests, their version history, and their resultstests_delete
beryl tests recompile <test-id>Validate + verify an edited plan against the live site before persistingtests_recompile
beryl tests versions <test-id>List a test's version historytests_versions
beryl tests version <test-id> <version-no>Show one specific version of a test (including its plan)tests_version
beryl tests diff <test-id> <from> <to>Diff two versions of a test's plantests_diff
beryl tests restore <test-id> <version-no>Restore a test to an earlier versiontests_restore
beryl tests reset <test-id>Discard user edits and return the test to its latest system-authored versiontests_reset
beryl tests heal <test-id> <state>Turn self-healing on or off for a testtests_heal
beryl tests history <test-id>Pass/fail history, streak, and stability for a testtests_history
beryl tests script <test-id>Print the rendered Playwright spec for a testtests_script
beryl tests export <test-ids...>Export tests as Playwright .spec.ts files in a ZIPtests_export

groups

Manage a project's test groups: labels a test can carry any number of, used to filter, run, or schedule a slice of the suite. Groups are created only here (or in Settings → Groups); assigning a test to an unknown name is an error.

beryl groups with no subcommand runs groups list.

CommandSummaryMCP tool
beryl groups listList the project's test groups and how many tests each holdsgroups_list
beryl groups create <name>Create a groupgroups_create
beryl groups rename <group> <name>Rename a group (tests keep their membership)groups_rename
beryl groups delete <group>Delete a group: its tests stay; a schedule targeting only this group goes with itgroups_delete

runs

Trigger a run of a project's tests (e.g. in CI), then watch, inspect, and download results.

beryl runs with no subcommand runs runs list.

CommandSummaryMCP tool
beryl runs triggerTrigger a test run (whole suite, a subset, or one environment)runs_trigger
beryl runs queueShow the run in flight and the runs waiting behind itruns_queue
beryl runs listList recent runsruns_list
beryl runs get <run-id>Show one run with its per-test resultsruns_get
beryl runs watch <run-id>Follow a run until it finishesruns_watch
beryl runs cancel <run-id>Cancel an in-flight run, or take a queued one out of the queueruns_cancel
beryl runs report <run-id>Show the generated report for a runruns_report
beryl runs download <run-id>Get a run's results with signed artifact URLs, or download them to diskruns_download
beryl runs explain <result-id>Explain, with AI, why a test result failedruns_explain

health

Site Health, or how your site reads to search engines and visitors: content, speed, links, security, and a visual check of layout at phone, tablet and desktop sizes, graded from a real check of your live pages.

beryl health with no subcommand runs health get.

CommandSummaryMCP tool
beryl health getShow the latest Site Health report, or one report by idhealth_get
beryl health runRun a fresh Site Health check, or a visual check of one pagehealth_run
beryl health intended <key>Mark a finding as intended, so it stops counting against the gradehealth_intended
beryl health tracker statusShow how Site Health files findings as issue tracker tickets for an environmenthealth_tracker_status
beryl health tracker ticketsList the findings Site Health tracks in the issue tracker, with their ticketshealth_tracker_tickets
beryl health tracker connectGet the link that connects an issue tracker to the workspacehealth_tracker_connect
beryl health tracker disconnectRemove the workspace's issue tracker connectionhealth_tracker_disconnect
beryl health tracker teamsList the teams of the connected issue trackerhealth_tracker_teams
beryl health tracker projectsList a tracker team's projectshealth_tracker_projects

jobs

Test-creation jobs: the cloud agent follows a prompt, a document, or both, and authors tests.

CommandSummaryMCP tool
beryl jobs create [prompt]Create tests from a prompt, a document, or both, on Beryl's cloudjobs_create
beryl jobs listList the project's test-creation jobsjobs_list
beryl jobs get <job-id>Show a job's status and the tests it createdjobs_get
beryl jobs clone <job-id>Run a job again: queue a new job with the same prompt, document, environment and accountjobs_clone
beryl jobs retry <job-id>Author only what a partial or failed job left out, optionally with an edited prompt or documentjobs_retry
beryl jobs cancel <job-id>Stop a queued, running or paused job; the tests it already created stayjobs_cancel
beryl jobs delete <job-id>Delete a job; the flows and tests it created stayjobs_delete

explorations

Inspect the agent's exploration runs: how it crawled a site and authored its tests.

CommandSummaryMCP tool
beryl explorations listList the agent's exploration passes for a projectnone
beryl explorations get <exploration-id>Show one exploration: authored tests, abandoned flows, coverage, frontiernone
beryl explorations steps <exploration-id>List every step the agent took in an explorationnone
beryl explorations cancel <exploration-id>Cancel an in-flight explorationnone
beryl explorations watch <exploration-id>Stream an exploration live: watch the agent explore and author testsnone

config

Manage the variables, secrets, and files the agent can use while exploring and running.

CommandSummaryMCP tool
beryl config vars listList the project's config variables (visible to the agent during runs)config_vars_list
beryl config vars set <key> <value>Create or update a config variableconfig_vars_set
beryl config vars get <key>Show one config variableconfig_vars_get
beryl config vars delete <key>Delete a config variableconfig_vars_delete
beryl config secrets listList the project's secrets (values are never returned); a test account's password is managed on the account, not hereconfig_secrets_list
beryl config secrets set <key> <value>Create a secret (write-only; re-setting a key replaces it)config_secrets_set
beryl config secrets get <key>Show one secret's metadata, or reveal its value with --revealconfig_secrets_get
beryl config secrets delete <key>Delete a secretconfig_secrets_delete
beryl config signing getWhich key signs Android builds converted from an .aab, with its fingerprintsconfig_signing_get
beryl config signing setSign converted Android builds with your own keystorenone
beryl config signing clearForget your keystore; converted builds go back to Beryl's keyconfig_signing_clear
beryl config files listList uploaded files: fixtures tests attach and Android and iOS app buildsconfig_files_list
beryl config files get <file>Show one uploaded file's metadataconfig_files_get
beryl config files upload <file>Upload a file: a fixture an upload step attaches, or an Android or iOS app buildnone
beryl config files download <file-id>Get a short-lived download URL for a fileconfig_files_download
beryl config files delete <file-id>Delete an uploaded fileconfig_files_delete

mailbox

The project's standing email addresses, where its tests receive sign-in mail.

beryl mailbox with no subcommand runs mailbox get.

CommandSummaryMCP tool
beryl mailbox getThe project's mailbox addressmailbox_get
beryl mailbox listList the project's mailboxesmailbox_list
beryl mailbox identitiesThe +tag addresses Beryl minted for this project's tests, and how each cleanup endedmailbox_identities
beryl mailbox createAdd a second mailbox to the projectmailbox_create
beryl mailbox delete <mailbox-id>Delete a mailbox and every email it has receivedmailbox_delete
beryl mailbox read <mailbox-id>Read the latest email in a mailbox (waits for one to arrive)mailbox_read
beryl mailbox emails <mailbox-id>List the emails a mailbox has receivedmailbox_emails

third-party-integrations

Test a site's own integrations (Connect Slack) against Beryl's accounts on those providers.

beryl third-party-integrations with no subcommand runs third-party-integrations list.

CommandSummaryMCP tool
beryl third-party-integrations listThe third party providers this project's tests can connect tothird_party_integrations_list
beryl third-party-integrations targetThe channel this project's tests pick when the app asks where to postthird_party_integrations_target

accounts

Durable identities on the site under test: what an authenticated test signs in as.

beryl accounts with no subcommand runs accounts list.

CommandSummaryMCP tool
beryl accounts listList the test accounts an environment's tests sign in asaccounts_list
beryl accounts get <account-id>Show one test account: origin, lifetime, sign-in stateaccounts_get
beryl accounts createAdd a test account: the customer's own, or one Beryl signs upaccounts_create
beryl accounts captureStore a signed-in session as a captured test accountaccounts_capture
beryl accounts signup <account-id>Store the sign-up you just walked live as a test account's signup planaccounts_signup
beryl accounts set-login <account-id>Store the sign-in plan a run replays once, plus the signed-in check that proves itaccounts_set_login
beryl accounts get-login <account-id>Read the stored sign-in plan, its signed-in check, and the hash a safe write must citeaccounts_get_login
beryl accounts check <account-id>Sign in now and prove the session survives into a fresh browseraccounts_check
beryl accounts update <account-id>Change a test account's password, login method, or default flagaccounts_update
beryl accounts delete <account-id>Delete a test accountaccounts_delete

account

View and update your personal account profile.

CommandSummaryMCP tool
beryl account getShow your account profilenone
beryl account updateUpdate your profilenone
beryl account deletion-previewPreview what deleting your account would remove or leavenone

feedback

Send product feedback to the Beryl team.

CommandSummaryMCP tool
beryl feedback send <message>Send product feedback to the Beryl teamnone

billing

Review a workspace's plan usage, subscription, and invoices; upgrade or switch plans.

CommandSummaryMCP tool
beryl billing plansList the plans: price, cloud run minutes, AI-created tests, active tests, parallel slotsnone
beryl billing usageShow plan usage: cloud run minutes (web 1x, Android 2x, iOS 5x), AI-created tests, runnable tests (the newest your plan runs), parallel slots, run history, and pack balancesnone
beryl billing checkoutGet a Stripe Checkout link that moves a Free workspace onto Team or Businessnone
beryl billing planGet a link for a person to approve switching a paid workspace between Team and Business, monthly or annual; nothing changes until they do. Once approved, a higher tier or monthly to annual is charged today and restarts the cycle; anything else takes effect on the next billing daynone
beryl billing subscriptionShow the workspace's subscription, including a downgrade or cancel waiting for the next billing daynone
beryl billing invoicesList recent invoicesnone
beryl billing portalGet a Stripe billing-portal link for the workspacenone
beryl billing packs buyGet a link for a person to approve buying a one-time pack on Team or Business (2,500 cloud run minutes or 25 AI-created tests), used after the monthly allowance and never expiring; nothing is charged until they donone
beryl billing auto-refill getShow auto-refill: which packs it buys, the threshold, the monthly cap and this period's spendnone
beryl billing auto-refill setGet a link for a person to approve turning auto-refill on or off; nothing changes until they do. When on: once the allowance is used up, buy a pack when its balance drops below the threshold, up to an optional monthly cap; flags left out keep their current valuenone
beryl billing addons getShow the workspace's monthly add-ons (extra parallel slots, extra runnable tests by the 100), their prices and any reduction waiting for the billing daynone
beryl billing addons setGet a link for a person to approve monthly add-ons on Team or Business; nothing changes until they do. Once approved, more is charged today, prorated to the billing day; less takes effect on the billing day with no refund. Add-ons bill monthly on their own invoice, also on an annual plan; flags left out keep their current valuenone

version

Show the running CLI version, API URL, and Node version

CommandSummaryMCP tool
beryl versionShow the running CLI version, API URL, and Node versionversion

Run beryl <command> --help for flags and examples.

Global flags

  • -V, --version: Print the CLI version and exit
  • --json: Print machine-readable JSON (NDJSON for streams)
  • --api-url: API base URL (default https://api.beryl.so)
  • --token: Personal access token (overrides config/BERYL_API_KEY)
  • -h, --help: Show help

版本与发布记录

@beryl-so/cli 共发布 77 个版本,首次发布于 2026/07/13;过去 12 个月发布了 77 个版本。

版本发布日期距今
0.117.5latest2026/11/071 天前
0.117.42026/11/062 天前
0.117.32026/11/062 天前
0.116.92026/11/053 天前
0.116.82026/11/053 天前
0.116.42026/11/044 天前

关于 @beryl-so/cli 的常见问题

@beryl-so/cli 是什么?

Beryl on the command line: projects, tests, runs, and everything else the web app manages.

如何安装 @beryl-so/cli?

在项目目录运行 npm install @beryl-so/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 beryl,可以用 npx beryl 直接运行。

@beryl-so/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/beryl-so__cli 是否存在。

@beryl-so/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@beryl-so/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@beryl-so/cli 可以商用吗?

@beryl-so/cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@beryl-so/cli 的下载量有多少?

根据 npm 官方下载统计,@beryl-so/cli 在 2026/10/08 – 2026/11/06 这 30 天内被下载 3,809 次,日均约 127 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@beryl-so/cli 还在维护吗?

最新版本 0.117.5 发布于 2026/11/07(1 天前);至今共发布 77 个版本,其中过去 12 个月发布了 77 个;首次发布于 2026/07/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。