Skip to main content
The 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

Install arga-cli with uv:
If you prefer raw pip: 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:
Each arga login creates a device-scoped key. Arga stores that credential at:
You can also create API keys from Settings → API Keys in the web app without running the device authorization flow. That design lets you revoke one key without rotating every other local integration. If you signed up via email on the get-started page, you receive a quickstart API key limited to 5 twin provisions. This is enough to try the wizard and run a few validations. Run arga login when you’re ready for full access.

Scan your project

Use arga wizard to detect which third-party integrations your project uses, provision digital twins, and rewrite your .env to point at them:
arga wizard is the current CLI entrypoint. arga wizard init still works as a compatibility alias. On older setups without the CLI, use npx arga-wizard for the same flow.
The wizard scans package.json, requirements.txt, pyproject.toml, and .env* files for known integration patterns (Stripe, Slack, Discord, Notion, Google Drive, Dropbox, Box, Google Calendar, Waterfall, 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.
An email address can only be linked to a single Arga account. If the email is already used by another account, the request returns 409 Only one account can use an email address. Sign in to that account or pick a different email.

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.
Legacy commands such as 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

Use arga 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.
If the target requires login, pass credentials together:
Provide both --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.
When --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:
If you already know your staging URL, pass both --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

Validate a pull request

PR validation requires a Team or Paid plan. Run arga whoami to check your current billing plan.
Use arga previews pr-checks run to start a PR validation run:
To provide additional instructions or context for the validation, pass --context-notes (v0.1.5+):

Run a sandbox preview

Use arga previews sandboxes run to deploy a branch into an isolated preview environment with selected twins:

Provision standalone twins

Use arga previews twins provision when you only need service twins and do not want to deploy app code:
Use arga previews twins mcp-config <run_id> to print MCP server config for MCP-capable provisioned twins, or add --install to merge it into detected local agent configs. Use arga previews twins lock <run_id> to disable public access for a provisioned twin session without tearing it down.

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

Saved tests store deterministic TestConfig JSON. They can be attached to repositories for PR Checks or run manually from the CLI.

Author TestConfig JSON

Assertions are intentionally primitive and deterministic:
Use visible with a selector on the step.

Manage legacy validation runs

arga runs ... remains available for validation/preview run history and worker/runtime logs:
Use 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), you can omit the run ID:
Use --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+.
Key commands accept --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.

Configure automatic PR validation

Install the GitHub webhook for a repository so Arga validates pull requests automatically:
View the current validation configuration:
Update the configuration:

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+, arga commit wraps git commit and passes all extra arguments through. You can combine them in a single command:
Without --skip, both arga commit and arga push pass all arguments through to git commit and git push unchanged.

Manage digital twins

Use arga 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:
The wizard backs up your .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 targets https://api.argalabs.com. To point it at a different environment, pass --api-url:
You can also set 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.