CLI
The `@@CLI@@` binary signs you in, connects your coding agent, and runs a quick test of a URL from a terminal or CI.
The heybug binary signs you in, connects your coding agent, and runs a quick test of a URL from a terminal or CI.
heybug run --url https://your.appIt explores the URL, runs the tests, and prints the results. The exit code tells you if everything passed.
Install
curl -fsSL https://opentest.nagara.cloud/install.sh | shReplace the address with your server. The script picks the release archive for your OS and CPU, checks it against SHA256SUMS, and installs heybug into ~/.local/bin. It needs no sudo. Set HEYBUG_INSTALL_DIR to install somewhere else. Make sure that folder is on your PATH.
Log in
heybug login --server https://opentest.nagara.cloudThe CLI prints a code like ABCD-EFGH and a link to /device on your server, and opens the browser when it can. Sign in, check the code, and approve. The CLI then saves an API token named "CLI on " to your credential profile. It never prints the token. The code expires after 10 minutes.
On a machine with no browser, use heybug auth login --token-stdin and pipe a token created in Settings > API tokens. heybug auth status shows who you are signed in as, plus the key name, scopes and expiry. heybug doctor checks credentials, server and runner.
Connect a coding agent
heybug connect claude
heybug connect cursor
heybug connect vscodeEach command points the agent at your server's remote MCP endpoint, /api/mcp, using the token from heybug login.
| Client | What it does |
|---|---|
claude | Prints the claude mcp add --transport http heybug <server>/api/mcp command for Claude Code. |
cursor | Merges mcpServers.heybug into .cursor/mcp.json. |
vscode | Merges the server into .vscode/mcp.json. |
The token is not shown unless you add --print. Treat that output as a secret and keep it out of git. See the MCP guide for the tools your agent gets. heybug mcp-config <client> prints a local stdio config instead.
To install the skills your agent uses to verify changes, see agent skills. heybug agent install writes them, heybug agent status checks them, and heybug agent list shows the supported agents.
Commands
Run heybug help for the full list. Besides run, these exist:
| Command | Use |
|---|---|
setup | Save a token, update .gitignore, install agent skills, print agent config. |
project, env | List, create and archive projects and environments. |
tests, plan, import, export | Read test cases, edit the plan, move tests in and out. |
runs, results, report | Start, wait for and cancel runs, and read their results. |
api, lists, ci | Run endpoint tests, group cases, and set up CI. |
models, usage, credits | Model providers, local model check (models local), plan and usage. See local models. |
ping, doctor, telemetry, completion, agent | Connectivity, checks, consent, shell completion, agent skills. |
Quick run
Installed, signed in and connected, one command tests an app end to end:
heybug run --url https://your.appIt finds or creates the project, explores the app, plans the tests and runs them. The flags below change what it does, and the exit code tells you if everything passed.
Setup
| Variable | Meaning | Default |
|---|---|---|
HEYBUG_SERVER | Server address. --server overrides it. | http://localhost:8080 |
HEYBUG_TOKEN | Access token. It is never printed. | none |
HEYBUG_PROFILE | Credential profile that login saved. | default |
Flags
| Flag | Meaning |
|---|---|
--url <url> | The app to test. Required. |
--project <id> | Use this project. Default: find one by the URL's origin, or create one. |
--instructions <text> | Extra guidance for the agent, such as "focus on checkout". |
--json | Print the result as JSON on stdout. |
--no-wait | Start the run and return at once. |
--server <url> | Server address. |
Output
Progress goes to stderr, one line per change:
Exploring https://your.app
Running 12 tests
7/12 passed, 1 failedThe final output on stdout is a table of cases. Each row has a status glyph, key and title. Failed cases also show the failing step and the Actual result. The last line is the web URL of the run.
JSON output
With --json, stdout is one QuickRunResponse object:
{
"id": "run_...",
"status": "done",
"project": { "id": "...", "name": "...", "baseUrl": "https://your.app" },
"exploration": { },
"run": {
"id": "run_...", "status": "failed", "targetUrl": "https://your.app",
"total": 12, "passed": 11, "failed": 1, "errored": 0
},
"cases": [
{
"caseKey": "...", "title": "...", "status": "failed",
"failedStepIndex": 3, "expected": "...", "actual": "...",
"errorMessage": "...", "durationMs": 4210, "stepCount": 6
}
],
"url": "https://.../runs/..."
}Fields:
id: an exploration id (exp_...). If a plan already existed and you gave no instructions, it is the run id (run_...).status:exploring,running,doneorfailed.project: the project used.exploration: present unless the id is a run id.run: the run, once it exists.cases: the results, once the run has finished.failedStepIndexis-1when no step failed. Case status is one ofqueued,generating,running,passed,failed,error,skipped.url: web link to the run or exploration.
With --no-wait, status is exploring or running and cases is absent.
Exit codes
| Code | Meaning |
|---|---|
| 0 | All tests passed. |
| 1 | A test failed, or the run had an error. |
| 2 | Usage error: unknown flag or missing argument. |
| 3 | Auth error: missing, invalid or forbidden token. |
| 4 | Not found: no such project or run. |
| 5 | Invalid input. |
| 6 | Server or network error. Try again. |
| 130 | Interrupted with Ctrl-C. The run keeps going on the server. The CLI prints its URL. |
See docs/cli/exit-codes.md for the full list.
CI example
export HEYBUG_SERVER=https://heybug.example.com
export HEYBUG_TOKEN=...
heybug run --url https://staging.your.app --json > result.jsonThe step fails the job if any test fails.