Docs/Command reference
#

Command reference

Every CLI command and what it does.

A map of the CLI, grouped by what you're trying to do. Run any command with --help (or bare) for its full sub-commands and flags.

01Conventions

  • --json — most read commands emit raw JSON for scripting and agents.
  • --env <prod|dev|local> — target environment for commands that support it.
  • Flags over prompts — every interactive prompt has a flag equivalent, so agents and scripts can drive any command non-interactively.
  • cofactor and canary are the same CLI — one binary per brand name; commands and flags are identical.

02Author tests

CommandWhat it does
cofactor specValidate and compile .cofactor.md test specs into flows
cofactor workflowInspect, create, sync, run, approve, promote, and pause flow definitions
cofactor recordRecord browser interactions to author from a real session

Start with the CLI Quickstart and the Cofactor spec format.

After a flow passes validation, use cofactor workflow approve <workflowId> to record human sign-off and cofactor workflow promote <workflowId> to include it in suites. Use cofactor workflow pause <workflowId> to keep an approved flow out of suites. cofactor workflow publish remains a deprecated alias for promotion and requires approval first. cofactor spec --publish has been removed; compile or sync first, then approve and promote deliberately.

03Run tests

CommandWhat it does
cofactor test-suiteRun suites and query executions (run, list, get, steps)
cofactor debug <workflowId>Replay a flow in a local headed browser, step by step

See Running your tests and Using the CLI in CI.

04Schedule & alert

CommandWhat it does
cofactor schedule suiteSchedule recurring test-suite runs (create, edit, pause, resume, delete, run, runs)
cofactor alertNotify-only rules that Slack/email on suite results (create, edit, pause, resume, delete, run)

A schedule targets a named suite (--suite-id), a tag (--tag), or every published flow (--all-published), on a cadence set with --schedule "every weekday at 9am", --cron, --at HH:mm, or --every 30m. An alert fires after a suite completes (or on the same cadence flags) and routes to --slack <channelId> and/or --email <addr>, narrowed with --when failure|success and optional --filter "field:op:value". Both manage the same automation rules as Settings → Automations; use pause/resume to toggle one without deleting it.

05Drive a browser

CommandWhat it does
cofactor sessionStart and control local browser sessions — snapshot, click, type, multiple named sessions, --attach-real-chrome
cofactor localSet up and manage local-environment testing (init, start, login)

See Testing locally.

06Environments, data & access

CommandWhat it does
cofactor propertyList and create applications; link GitHub repos
cofactor sandboxAuthor, verify, and provision sandbox templates and instances
cofactor credentialList, create, update, and test login credentials
cofactor personaManage named roles and their credential bindings per application
cofactor attachmentUpload and manage file fixtures
cofactor tagCreate and assign tags (suites run by tag)
cofactor api-catalogManage API catalog sources and endpoints

See Setting up a sandbox and Credentials & login.

07Investigate results

CommandWhat it does
cofactor issuesSearch, read, close, and reopen issues
cofactor triageRead AI triage clusters for a suite execution (get, failures, wait)
cofactor workflow debug <runId>Inspect a run's recorded evidence — steps, thoughts, cache, traces

See Triaging a failure.

08Agent tooling

CommandWhat it does
cofactor skillInstall and update agent skills (browser-testing, debug-run, test-cases, …)
cofactor mcpStart the MCP server (stdio) for MCP-capable agents
cofactor installInstall the MCP server into Claude, Cursor, and other agents

See Driving Cofactor from your coding agent.

09Account

CommandWhat it does
cofactor loginBrowser-approved authentication (details)
cofactor orgsList organizations; pick with login --org
cofactor auth doctorDiagnose auth and proxy issues