Quick start
1. Initialize the repository
Section titled “1. Initialize the repository”From your project root:
har env initThe default profile targets web applications. Use --profile cli for libraries
and command-line tools or --profile ios for an Xcode project.
HAR copies an editable .har/ scaffold, validates it, and writes an adaptation
prompt to .har/ADAPT-PROMPT.md. Give that prompt to your coding agent so it can
replace placeholders with your actual install, launch, database, and test commands.
To let HAR perform the Claude-based adaptation:
export ANTHROPIC_API_KEY=...har env init --auto --yesReview and commit .har/, AGENT.md, and any generated agent workflows.
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. Replacing an occupied
slot requires explicit confirmation; discarding a dirty session additionally
requires --force.
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, then:
har env complete 1complete runs full verification, records the exact validated tree hash, removes
the runtime and worktree, and keeps the session branch for a pull request.
If you only need cleanup, use har env teardown 1. It also keeps the branch unless
you explicitly pass --delete-branch.
Shell fallback
Section titled “Shell fallback”The generated scripts remain directly usable without a global CLI:
./.har/setup-infra.sh./.har/launch.sh 1./.har/verify.sh 1 --full./.har/teardown.sh 1Direct scripts do not create persisted .har/runs/ records; CLI and MCP execution do.
