qa-army (also qa) is the lightweight command-line control plane for QA.army (built by Perirun): author durable plain-language Web and Mobile Tests, run PR and manual checks, and inspect verifiable JSON Run receipts. Requires Node.js 22+; MIT licensed.
npm install -g https://github.com/QA-army/cli/releases/download/v0.2.12/qa-army-0.2.12.tgz
qa-army auth agent-register --email you@example.com
qa-army status --json
qa-army capabilitiesWorking from Claude Code, Codex, Cursor, or GitHub Copilot? Install the companion skills repository first (gh skill install QA-army/skills or QA-army/skills), then author typed steps with an enabled assertion using the Test example and test-writing skill:
qa-army setup --app-url https://example.com --project-name Example --input "$(cat test.json)"setup creates or reuses the selected Workspace/Project/Test, starts one Run, prints its live URL, and waits for the result. Use --workspace wsp_... when the target is ambiguous. Credentials belong in the native keyring or governed runtime injection, never Test text or command arguments.
QA-army/cli stays a fast, standalone zero-browser package (@napi-rs/keyring only) so CI jobs and coding-agent sandboxes can install it in seconds without pulling worker or browser runtimes:
| Target | Surface | Role of qa-army CLI |
Status |
|---|---|---|---|
| Rung 1–3 — QA.army Cloud | https://api.qa.army (www.qa.army) |
Default target today. $0 Free plan includes 10 saved Tests + 100 one-time Runs (no card); paid tiers ($39/mo Starter, $149/mo Pro, $499/mo Dedicated) add shared monthly Run pools, PR gates, and human-reviewed draft fix PRs (rollout). |
Available |
| Rung 0 — Self-Hosted MIT | QA-army/qa.army (localhost) |
Same canonical OpenAPI Test/Run/Receipt contract against a local MIT qa.army server (Temporal + PGlite/Postgres + e2e/Midscene + odr), without sending cloud WorkOS credentials off canonical HTTPS origins. |
Planned (v0.1 bootstrap) |
Standalone $0 Device Routing |
QA-army/open-device-router (odr) |
Direct $0 iOS Simulator, Android emulator, and free-tier device-cloud sessions (odr.receipt/v1). qa-army manages Tests and Runs; odr routes raw device sessions. |
Available (odr repo) |
| Rung 4 — Sovereign Edge | Perirun (perirun.com) |
Sealed private-VPC or on-prem verification perimeter speaking the canonical QA.army API (0 bytes leave the boundary). |
Talk to us |
npm ci
npm run validatePackaging changes also require npm run verify:public. Keep Linux, macOS, and Windows CI green. Read SOUL.md, AGENTS.md, the capability map, and surface map. Unsupported operations return REQUEST_CAPABILITY, never a fabricated success.
Codex: open this repo folder as the project and select Worktree from main. .codex/environments/environment.toml provides setup, cleanup, and actions; dependency installation is explicit.
Use qa-army runs list --test tst_... --trigger manual for manual Run evidence and --trigger deploy for deployment/PR evidence. Omit --trigger to retain the all-Runs history. Use --before with the returned next_before and preserve --trigger when paging; --limit accepts 1–50 (default 20). The server applies the filter before pagination and retains Workspace authorization. A filtered response with a missing or different Run trigger is rejected, including during a backend rollout. Filtering reads evidence; it never changes Run outcomes or establishes a passing PR check.
qa-army prs approval-links --project prj_... --jsonThis command and MCP prs.approval_links({ project_id }) call the same
authenticated GET /v1/projects/{projectId}/pr-approval-links endpoint.
QA.army's proprietary cloud service owns authorization, GitHub observations and
evidence aggregation; the public CLI remains a thin adapter.
Use an authorized Cognito user session or a governed claimed WorkOS agent.
Profile API keys and setup-only credentials are denied. Preserve 403 as an
error; never switch identities or substitute credentials to bypass it.
The response covers at most 10 QA-observed PRs for the Project, not all PRs
assigned to the user. Show the returned review links and server qa_state,
freshness and evidence reasons; preserve any truncation warning. Selected Run
attempts, evidence finalization and cleanup affect evidence readiness. Observed
checks are not the repository's required branch rules. Preserve missing, stale,
failed and blocked evidence.
Review links navigate to human review; this command does not approve, merge, start Runs or establish merge readiness. API errors remain errors. Availability requires the matching server endpoint, an authorized credential and a released client; this source addition alone does not establish live availability.
Memory management is undergoing release validation. Use a user session or profile API key; claimed WorkOS credentials do not authorize Memory management. Review evidence before approving proposals and keep credentials in Test Accounts. Published memory assists Test creation and individual Run actions; saved assertions still verify current behavior.
builds list --project prj_..., builds reserve --project prj_... --input JSON --request-key KEY, and builds complete --build nbd_... use the canonical Product API. Reserve metadata is { "filename": "Example.app.zip", "platform": "ios", "size": 123, "sha256": "<64 lowercase hex characters>" }. Android uses platform: "android" and .apk; simulator .app.tar.gz and .app.tgz are also accepted. Maximum upload size is 512 MiB.
Use a user session or profile API key; claimed WorkOS credentials cannot register builds. PUT the exact original file to the reservation's short-lived upload URL with its supplied headers, without your Product bearer token. Complete registration to verify its checksum and size. Keep the same request key for an ambiguous reserve retry. Registered files are immutable and do not prove native execution or a passing Run.
QA.army runs dynamic tests and regression tests on qualifying pull requests with a matching Vercel preview when the QA.army GitHub App is installed, the Project's integration is connected, and both suites are configured. Proven live on QA-army/landing-marketing#37 and #38: the App posted a QA.army check against the Vercel preview URL for the PR head revision, reported both suites as PASSED (COMPLETE_EXECUTION), and linked dashboard verification prv_... plus individual Run attempts. Success requires complete passing Runs, finalized evidence, and confirmed cleanup for both suites. No applicable tests is not a passing Run.
Those per-PR Runs are server-owned. They are not started by a repository GitHub Actions workflow calling the CLI. Landing-marketing's validate workflow only runs marketing/package checks; the QA.army check comes from the GitHub App (qa-army).
Use the CLI to configure and read that live path:
# Dynamic PR Tests — owner/user session or profile API key
qa-army prs settings --integration int_...
qa-army prs configure --integration int_... --request-key configure-pr-001 --input '{"enabled":true,"max_tests":3,"test_account_ids":[],"sandbox_confirmed":true}'
qa-army prs usage --workspace wsp_...
# Regression via deployment watch (saved Test Groups on preview deploys)
qa-army prs watch --integration int_...
qa-army prs watch-update --integration int_... --input '{"repository_id":"123456789","test_group_ids":["tgr_00000000000000000000000000000001"],"enabled":true}'
# Read a PR verification after the App posts the check
qa-army prs list --project prj_...
qa-army prs get --verification prv_...
qa-army prs approval-links --project prj_... --json
qa-army runs list --test tst_... --trigger deploy
# Explicit rerun / cancel / promote (reuse --request-key after an uncertain response)
qa-army prs rerun --verification prv_... --request-key rerun-pr-001
qa-army prs cancel --verification prv_... --request-key cancel-pr-001
qa-army prs promote --verification prv_... --test tst_... --group tgr_... --request-key promote-pr-001A governed claimed WorkOS agent can use prs list, prs get, and explicit prs rerun within the claiming user's authorized Workspace. Dynamic settings, configuration, usage, cancellation, and promotion require a supported user session or profile credential. Deployment-watch updates require a claiming user who is a current Workspace OWNER. The server retains preview qualification, current-revision checks, idempotency, and Run limits.
Enable dynamic tests only after configuring the matching Vercel Project and confirming sandbox safety. Planning is included; each completed generated Test consumes one shared Workspace Run. prs rerun may consume up to three new Runs. Do not automatically rerun ambiguous mutations.
There is no qa-army pr run-dynamic or qa-army ci command (REQUEST_CAPABILITY). To run a saved Test yourself from CI or an agent, use the existing cloud path:
qa-army tests run --test tst_... --wait --jsonInject QA_ARMY_API_KEY or a governed access token through your secret mechanism; never put credentials in process arguments. The Free plan is $0 with 10 tests total and 100 Runs total, no card and no renewal. For more capacity, Upgrade or Get started.
Saved ACT steps accept an optional verification object: expectation (text), timeout_ms (1000–120000, default 30000), and checks (up to eight { "query": "Visible value to read", "equals": "Exact value" } entries). equals can be text, a number, or a boolean. The server freezes inferred expectations when omitted; ambiguous outcomes error before mutation. A dispatched action alone cannot pass. Explicit Assert and Screenshot steps keep their independent roles and order; screenshot-only Tests remain valid. Run receipts support context versions 1 through 5, including historical Runs.
Focused generation in the QA.army app can compose one ordinary Test from versioned steps in existing Tests when journey discovery is enabled. Generation itself is not execution evidence. CLI and MCP continue to save supplied steps directly.
Preserve the optional journey object when editing a generated Test. It records source Test/step IDs and versions, inferred transitions, unresolved prerequisites, and observed identity bindings. References such as {{binding.game}} use a value captured from a fresh earlier ACT or Verify observation; the final independent Verify compares the actual identity again. Never replace these with a guessed ID or an instruction to “remember” a game/account. RunContext v5 freezes the composition for that Run. Explicit Verify and Screenshot remain ordinary steps.
A source changing during generation requires generating again. A missing or ambiguous identity produces ERROR; an observed identity mismatch produces FAILED. Graph retrieval and past receipts cannot make a new Run pass. Disabling journey generation leaves existing manual Tests and ACT verification available.
Read the stable Project/UTC-day set with qa-army memories questions --project prj_... or MCP memories.questions. A set has three context-grounded questions with three choices each, or an exhausted empty state. Answer with qa-army memories answer --project prj_... --input JSON or memories.answer. The body contains day, question_id, expected revision (initially 0), zero-based choice (0–2), skipped, and optional elaboration. For a skip use choice: null and skipped: true.
Answers are customer-declared intent and require owner review before publication, even when an owner answers. Corrections append history; stale concurrent answers return a conflict. Never infer customer intent or submit a suggested choice automatically. Published answers may be supplied to future generation; supply does not prove influence or improved results.
To revisit a saved set, select its date in Memory, use CLI memories questions --project prj_... --day YYYY-MM-DD, or pass day to MCP memories.questions. The historical API is GET /v1/projects/{projectId}/memory/clarifications/{day}. Only existing sets are returned; prior answers remain correctable with revision checks.
Group and Test management use the same claimed WorkOS agent identity as setup.
Run qa-army auth agent-register once; the server binds that identity to the
claiming user's current Workspace membership. It can create/read/update Tests,
manage Test Groups, and create/start/cancel Runs and inspect evidence. This does
not grant Test deletion, Test Account secrets, billing, member administration or
other owner-only operations. Never copy browser session credentials or put
secrets in Test instructions.
qa-army status --json reports the selected credential source without printing
its secret. Existing governed QA_ARMY_API_KEY, QA_ARMY_ACCESS_TOKEN /
VENKAT_ACCESS_TOKEN injection and native profile keys remain supported; no
second credential is needed for the claimed agent's Test management workflow.
| Operation | Command |
|---|---|
| List/create Groups | groups list --project prj_... / groups create --project prj_... --input JSON |
| Read/update Group | groups get --group tgr_... / groups update --group tgr_... --version N --input JSON |
| Read/update Test | tests get --test tst_... / tests update --test tst_... --version N --input JSON |
| Run saved Test | tests run --test tst_... --wait |
| Inspect result/events | runs get --run run_... / runs watch --run run_... |
| Inspect finalized evidence | runs evidence --run run_... |
Group create/update input is { "name": "Onboarding", "description": null }.
To move or enable/disable a Test, get its latest version, then submit its full
editable definition with group_id or enabled changed. Preserve all steps,
settings and journey metadata; do not send the entire GET envelope or a partial
patch. The server rejects stale versions. Each Test has one Group, and null
selects the Project's Default group. There is no separate membership collection. groups run dispatches an explicit
selection using the canonical Run API; see the selection contract below.
Evidence output contains stable metadata only. Download an artifact with
qa-army evidence download --evidence evd_... --output new-file.png. The command
creates a private file without overwriting an existing file, verifies SHA-256
and size (up to 128 MiB), and returns a receipt without the signed URL. On failure
the created file is emptied. It never forwards the Product bearer to storage.
A completed Run without the required screenshots is not an accepted journey.
Read Group and Test metadata first, then freeze 1–20 unique enabled Tests as
selection: [{"test_id":"tst_...","version":3}]. CLI accepts this object through
groups run --project prj_... --group tgr_... --request-key unique-batch-001 --input JSON;
MCP takes groups.run({project_id, group_id, request_key, selection}). Each Test
is a separate canonical Run and may consume the normal Run allowance.
All selected Tests are checked for the same Project/Group, enabled state and
current version before any Run is created. Every created Run must expose the
matching immutable test_version from RunContext (schema 2–5) and context hash
before any child is started. Omitted/null versions never authorize dispatch.
Older servers without that proof are blocked. A response is DISPATCHED or
INCOMPLETE, never an aggregate Test pass. Use returned Run IDs to watch results
and inspect evidence. A replayed child already beyond READY is reported without
starting it again. The operation is not atomic: an interruption can leave READY
or started children, identified in the partial receipt. Reconcile those IDs
before retrying; keep the same selection and request key. Preparation failures
attempt to cancel known READY children before any start; inspect cancellation
receipts and explicitly cancel any remaining unused READY Runs. Never replace the selection with a fresh list on retry.
Deployment watch selects the saved Test Groups that feed regression on
preview deployments in the live per-PR path above. Use
qa-army prs watch --integration int_... or MCP
prs.watch({integration_id}) to read an existing connected GitHub deployment
watch. Update its full selection with qa-army prs watch-update --integration int_... --input JSON or prs.watch_update({integration_id, ...body}):
{"repository_id":"123456789","test_group_ids":["tgr_00000000000000000000000000000001"],"enabled":true}Use the repository ID and actual Group IDs returned by the API. Read first and include every Group you intend to keep; this replaces the selection, with no hidden merge. At most 50 unique same-Project Groups are allowed; an enabled watch needs at least one. The same claimed WorkOS identity can manage the watch when its claiming user is a current Workspace OWNER. It cannot create a watch, change its repository, reconnect GitHub, or grant provider consent. Profile API keys and provisional setup credentials do not authorize these watch operations.
The receipt contains deployment_watch, including its new version. PUT has
no If-Match or idempotency-key contract: after an uncertain response, read back
and reconcile rather than retrying blindly. Changes affect subsequent matching
deployments; they do not start a manual Run or establish a passing PR check.
Keep unrelated selected Groups and integration settings intact. Inspect the
canonical exact-head Runs and screenshots after the next qualified deployment.