Skip to content
HAR 2.0.0 is here: standard OpenTelemetry and Factory Commits proofs in git. Read the announcement · Upgrade from 1.x

Quick start

From your project root:

Terminal window
har onboard

The wizard starts with a Docker check — Docker is required for Mission Control and containerized harness infrastructure, so a missing CLI or stopped daemon is reported before anything else (see Installation).

Onboarding is seven steps, one screen each. Each step says why in a few lines, shows the default and the current state with each question, and links the docs:

  1. Welcome to HAR: slots, verify → complete, the commit gate, proofs, and where to see it all (Mission Control here, or the hosted HAR HQ).
  2. This repository: the harness profile (default, cli or ios), how many agents may run in parallel (--agent-slots), and the verification tools HAR found in the repository (for example a playwright.config.ts or a .gitleaks.toml): their plugins join the verify pipeline, nothing to pick.
  3. Your agents: the agents to set up (those installed on this machine are preselected). No skills question: the HAR workflow goes into AGENTS.md, which every agent reads.
  4. Telemetry, a feature for you: see what your agents did, step by step, and what it cost. Record agent sessions (HAR’s hooks go into the global settings of the agents you chose; nothing is written there until you agree), how much — full (prompts, replies, tool I/O), outline (every step, no text; the default) or usage (tokens, cost) — and where: Mission Control on this machine, or else the hosted HAR HQ (signing in opens your browser).
  5. Commit gate and proofs: off, warn or block unverified commits; proofs off, notes or notes+trailers, and, when on, whether notes are pushed with the repository (har env complete runs har proof sync) or sent to HAR HQ.
  6. Apply: every write happens here, one line each.
  7. Help us improve HAR: crash reports to the HAR maintainers (on by default).

The answers are recorded (the gate in .har/stages.json, proofs in .har/harness.env, telemetry and crash reports in ~/.har/), so har env maintain never asks again or overrides them. One exception: while telemetry is on and nothing receives it (no Mission Control and no destination), har env maintain asks where it should go, with the HAR HQ offer. The last screen lists each choice with the command that changes it, then the next steps. The adaptation prompt for your coding agent is written to .har/ADAPT-PROMPT.md, and onboarding offers to copy it to the clipboard (never with --yes).

Non-interactive defaults (telemetry on at outline, no HAR skills, proofs off, commit gate warn, crash reports on), printed one line per feature with how to change it:

Terminal window
har onboard --yes --profile cli --no-control --no-plugins

Answer any of them explicitly instead: --telemetry off|on|full|outline|usage, --commit-gate off|warn|block, --proofs off|notes|notes+trailers, --proofs-push / --no-proofs-push, --error-reporting on|off.

The default profile targets web applications. Use --profile cli for libraries and command-line tools or --profile ios for an Xcode project.

Adapt the scaffold with your coding agent using the prompt in .har/ADAPT-PROMPT.md. Review and commit .har/, AGENTS.md, and any generated agent workflows.

User-level defaults (Cursor rules, agent skills, commit gate) live in ~/.har/preferences.json (har preferences configure). Explicit flags still win.

Terminal window
har env preflight 1
har env status

Preflight checks occupied slots, ports, foreign PM2 processes, and Docker conflicts before a launch changes anything.

Terminal window
har env launch 1

Launch prints a workDir. Make every application edit under that directory. The main checkout is not the session workspace.

Each launch creates a fresh branch and worktree by default. An occupied slot always blocks a new launch — free it with har env complete <id> or teardown <id>, then launch again. Commit or discard uncommitted work in the worktree first. See Agent workflow for occupied and failed slots.

Terminal window
har env verify 1
har env verify 1 --full

Quick verification is the fast feedback loop. Full verification is the completion gate and may include unit tests, lint, readiness checks, browser E2E, and any project-defined validation stages.

Commit the verified changes in the session worktree. Agents should present a session handoff and wait for approval before finishing. Then:

Terminal window
har env complete 1

complete reuses the last passing full validation for the current tree, removes the runtime and worktree, and keeps the session branch for a pull request. Pass --verify if the tree may have changed since that verify.

If you only need cleanup, use har env teardown 1. It also keeps the branch unless you explicitly pass --delete-branch.

Terminal window
npx @osfactory/har env setup-infra
npx @osfactory/har env launch 1
npx @osfactory/har env verify 1 --full
npx @osfactory/har env teardown 1

CLI and MCP write the same .har/runs/ records, validations, and telemetry.