Skip to content

Environment variables

Edit shared configuration in .har/harness.env. Launch expands resolved values into .env.agent.<id>; do not edit generated slot files manually.

Variable Meaning
HARNESS_PROJECT_NAME Stable project identifier used for processes and infrastructure
HARNESS_USE_WORKTREE Whether launch uses isolated worktrees by default
HARNESS_PRIMARY_APP Primary per-slot application in the web profile
HARNESS_AGENT_SLOT_MIN / MAX Legacy fallback for slot id range — canonical limits are in .har/stages.json (agentSlots)
HAR_SESSION_PURPOSE Optional label stored with a launched session
Variable Meaning
HARNESS_ECOSYSTEM auto, node, python, go, rust, java, ruby, ios, or none
HARNESS_INSTALL_CMD Project-specific install override
HARNESS_PYTHON_VENV_DIR Python virtual environment path relative to the work directory
DEVELOPER_DIR Optional Xcode developer directory
HARNESS_XCODE_SCHEME iOS scheme
HARNESS_XCODE_PROJECT / WORKSPACE Xcode project source
HARNESS_SIMULATOR_NAME Target simulator
HARNESS_BUNDLE_ID Application bundle identifier

Provisioning records resolved values such as NODE_BIN, NPM_BIN, PYTHON_BIN, GO_BIN, CARGO_BIN, RUSTC_BIN, JAVA_HOME, RUBY_BIN, and XCODEBUILD_BIN in the slot environment.

Variable Meaning
HARNESS_FE_BASE_PORT Frontend base; slot default is base plus id × step
HARNESS_API_BASE_PORT API base
HARNESS_PORT_STEP Width of each slot’s port lane
HARNESS_HEALTH_CHECK_PATH Endpoint polled after launch

Resolved FE_PORT, API_PORT, DEBUG_PORT, and preview URLs belong to the slot registry and environment. Consumers should never assume the default remains free.

Variable Meaning
HARNESS_INFRA_SERVICES Space-separated services from docker-compose.agent.yml
HARNESS_TEMPLATE_DB Database cloned for each slot
HARNESS_TEMPLATE_DBS Optional logical-name/template pairs for multiple stores
HARNESS_DB_MIGRATE_CMD Idempotent schema command
HARNESS_DB_SEED_CMD Template seed command
HARNESS_DB_MINIMAL_BOOTSTRAP_CMD Optional small per-slot bootstrap
HARNESS_DB_PORT_DEFAULT Preferred shared Postgres host port
HARNESS_DB_PORT_SCAN_START / END Conflict fallback range

Generated web profiles include the same default/scan pattern for optional MinIO, browser, Mailpit web, and Mailpit SMTP ports.

Variable Meaning
HARNESS_READINESS_CMD Optional usability smoke beyond a process health check
HAR_SKIP_GATE Explicit commit-gate bypass; recorded and not for agent completion
HAR_SKIP_WT_GUARD Explicit Claude worktree-guard bypass
Variable Meaning
HAR_CONTROL_API_URL Override local dashboard API
HAR_CONTROL_IMAGE Override Mission Control image
HAR_CONTROL_IMAGE_TAG Override image version
HAR_CONTROL_BUILD Build Mission Control from source
HAR_CLOUD_API_KEY Hosted synchronization credential

Treat credentials as shell or secret-manager values, never as committed harness.env content.