Quick start
1. Onboard
Section titled “1. Onboard”From your project root:
har onboardThe 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:
- Welcome to HAR: slots, verify → complete, the commit gate, proofs, and where to see it all (Mission Control here, or the hosted HAR HQ).
- This repository: the harness profile (
default,cliorios), how many agents may run in parallel (--agent-slots), and the verification tools HAR found in the repository (for example aplaywright.config.tsor a.gitleaks.toml): their plugins join the verify pipeline, nothing to pick. - 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. - 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) orusage(tokens, cost) — and where: Mission Control on this machine, or else the hosted HAR HQ (signing in opens your browser). - Commit gate and proofs:
off,warnorblockunverified commits; proofsoff,notesornotes+trailers, and, when on, whether notes are pushed with the repository (har env completerunshar proof sync) or sent to HAR HQ. - Apply: every write happens here, one line each.
- 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:
har onboard --yes --profile cli --no-control --no-pluginsAnswer 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.
2. Check readiness
Section titled “2. Check readiness”har env preflight 1har env statusPreflight checks occupied slots, ports, foreign PM2 processes, and Docker conflicts before a launch changes anything.
3. Launch a fresh session
Section titled “3. Launch a fresh session”har env launch 1Launch 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.
4. Verify
Section titled “4. Verify”har env verify 1har env verify 1 --fullQuick 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.
5. Complete and hand off
Section titled “5. Complete and hand off”Commit the verified changes in the session worktree. Agents should present a session handoff and wait for approval before finishing. Then:
har env complete 1complete 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.
Without a global CLI
Section titled “Without a global CLI”npx @osfactory/har env setup-infranpx @osfactory/har env launch 1npx @osfactory/har env verify 1 --fullnpx @osfactory/har env teardown 1CLI and MCP write the same .har/runs/ records, validations, and telemetry.
