TheDocumentation Index
Fetch the complete documentation index at: https://docs.argalabs.com/llms.txt
Use this file to discover all available pages before exploring further.
arga CLI gives you a local entry point into Arga. You can use it to:
- authenticate your machine with Arga
- start preview and test-runner workflows from the terminal
- manage scenarios, saved tests, live browser runs, PR checks, sandboxes, and twins
- validate and summarize agent-editable TestConfig JSON
Install the CLI
Installarga-cli with uv:
pipx install arga-cli and pip install arga-cli also work.
After installation, verify the command is available:
Authenticate from the terminal
Use device login to authorize the CLI:arga login opens the browser so you can approve the device. arga whoami confirms the saved credential and prints your current GitHub login, email, email verification status, workspace, and billing plan.
To remove the local credential later:
arga login creates a device-scoped key. Arga stores that credential at:
arga login when you’re ready for full access.
Scan your project
Usearga wizard init to detect which third-party integrations your project uses, provision digital twins, and rewrite your .env to point at them:
arga wizard init is available in CLI v0.1.5+. On earlier versions, use npx arga-wizard for the same functionality.package.json, requirements.txt, pyproject.toml, and .env* files for known integration patterns (Stripe, Slack, Discord, Notion, Google Drive, Dropbox, Box, Google Calendar, Unstructured). It backs up your .env, provisions twin instances, and rewrites API keys to route through twins.
When arga.yaml is present, arga test-runner runs url automatically includes the detected twins — no need to specify them manually.
Verify your email
After you log in with GitHub, you can verify an email address on your Arga account. Email verification is optional but may be required for certain features.Request a verification code
From the Arga web app, submit the email address you want to verify. Arga sends a six-digit code to that address. Codes expire after 10 minutes, and you can request a new code once per minute.Confirm the code
Enter the six-digit code you received. You have up to five attempts per code. If you exceed five attempts, request a new code. Once verified,arga whoami includes your confirmed email and shows the verification status.
Start validations from the CLI
The CLI mirrors the web app’s two validation groups:arga previews ...for preview environments: Sandboxes, PR Checks, and standalone Twins.arga test-runner ...for reusable browser testing: Scenarios, Tests, and Runs.
arga test url, arga validate pr, and arga scenarios ... still work as aliases, but new scripts should use the previews and test-runner groups.
Validate a deployed URL
Usearga test-runner runs url for a one-off browser run against a deployed app:
Free plan:
--prompt is required for every run. Team plan users can omit it — Arga will auto-plan tests based on the target app. Free plan runs are also limited to Test Runner Runs and 1 digital twin per run. See Plans and limits.--email and --password together, or leave both out.
Testing with digital twins
Use--twins to provision digital twins before the run starts. The CLI provisions the twins, prints their base URLs and environment variables, and waits for you to deploy your app against them before running the validation.
--twins is used without --url, the CLI prompts you for the staging URL after provisioning — so you can deploy first and provide the URL once you know it:
--url and --twins together — the CLI provisions twins, prints the env vars, and waits for you to press Enter before starting the run.
Custom run duration
Set a custom run duration with--ttl (in minutes):
--ttl is available in CLI v0.1.5+.Flags
| Flag | Default | Description |
|---|---|---|
--url | — | Deployed application URL. Required unless --twins is used (in which case you are prompted after provisioning). |
--prompt | — | Natural-language instructions for what to test. Required on Free plan; optional on Team/Paid. |
--twins | — | Comma-separated list of digital twins to provision before the run (e.g. slack,stripe). The CLI provisions twins, prints their URLs and env vars, and waits for you to deploy before starting. |
--scenario | — | Scenario ID to pre-seed twins with sample data. |
--email | — | Login email for the target app. Must be provided with --password. |
--password | — | Login password for the target app. Must be provided with --email. |
--ttl | 60 (Team/Paid) or 10 (Free) | Run duration in minutes. Free plan is fixed at 10 minutes. Team/Paid plans support 1–480 minutes. |
--test-config | — | Path to a TestConfig JSON file to execute deterministically from launch. |
--repo, --branch, --pr-url | — | Optional repository context for diff-aware planning. |
--json | off | Output result as JSON. |
Validate a pull request
PR validation requires a Team or Paid plan. Run
arga whoami to check your current billing plan.arga previews pr-checks run to start a PR validation run:
--context-notes (v0.1.5+):
Run a sandbox preview
Usearga previews sandboxes run to deploy a branch into an isolated preview environment with selected twins:
Provision standalone twins
Usearga previews twins provision when you only need service twins and do not want to deploy app code:
Manage test-runner runs
List recent live browser runs, inspect events, rerun a saved config, or send a message into an active run:Manage saved tests
Author TestConfig JSON
visible with a selector on the step.
Manage legacy validation runs
arga runs ... remains available for validation/preview run history and worker/runtime logs:
arga test-runner runs ... for live browser test-runner history and events.
If you’re in a project directory that already contains .arga-session.json (for example after using arga wizard init), you can omit the run ID:
--json (v0.1.5+) for a machine-readable response. The payload includes the run summary plus worker_logs, runtime_logs, and any warnings. Large worker logs may be truncated, so use the Get run logs API reference for full field details.
JSON output for CI and automation
--json is available in CLI v0.1.5+.--json to emit structured JSON instead of human-readable text. This is useful in CI pipelines, shell scripts, and agent automation where parsing text output is fragile.
| Command | --json output |
|---|---|
arga test-runner runs url | {"run_id": "...", "status": "..."} |
arga previews pr-checks run | {"run_id": "...", "status": "...", "session_id": "..."} |
arga test-runner tests list | Array of saved tests |
arga test-runner tests run <id> | Demo-runner run object |
arga runs status <id> | Detailed run summary object from the API |
arga runs logs <id> | Run summary plus worker_logs, runtime_logs, and warnings |
arga runs list | Array of run summary objects |
Configure automatic PR validation
Install the GitHub webhook for a repository so Arga validates pull requests automatically:| Flag | Description |
|---|---|
--trigger | Validation trigger mode: pr (run on pull requests) or branch (run on pushes to a branch). |
--branch | Branch to monitor when using branch trigger mode. |
--comments | Whether to post PR comments with results: on or off. |
Git helpers
Use--skip to mark a commit so that Arga’s automatic CI validation skips it.
In v0.1.0, arga commit --skip amends the HEAD commit to append a skip trailer. Create the commit with git commit first, then mark it:
arga push --skip verifies the HEAD commit has the skip trailer before pushing — if it doesn’t, it exits with an error.
In v0.1.5+, Without
arga commit wraps git commit and passes all extra arguments through. You can combine them in a single command:--skip, both arga commit and arga push pass all arguments through to git commit and git push unchanged.Manage digital twins
Usearga previews twins ... for quick standalone provisioning. Use arga wizard ... when you want project scanning and .env rewriting.
Twin lifecycle management is handled through arga wizard subcommands:
.env to .env.arga-backup, provisions twins, and rewrites API keys to route through them. Restore your original environment with cp .env.arga-backup .env.
Use a custom API URL
By default, the CLI targetshttps://api.argalabs.com.
To point it at a different environment, pass --api-url:
ARGA_API_URL:
When to use the CLI vs the app
- Use the web app when you want to browse runs, configure repositories, watch the live browser, or edit blocks visually.
- Use the CLI when you want to kick off validations quickly from a terminal, script workflows, or work with TestConfig JSON.
- Use TestConfig JSON when you want coding agents to create or edit deterministic saved tests.
- Use MCP when you want Cursor, Claude Code, or Codex to query Arga directly from your editor.

