H (:harness)

H is a local Elixir/OTP daemon for coding-agent sessions. A session can branch without copying its transcript. The Phoenix LiveView app and native terminal client can work on the same conversation; disconnecting one does not stop a run.

Install a release

Prebuilt signed releases are published for macOS (darwin-arm64) and Linux (linux-arm64, linux-x86_64) on GitHub Releases and GitLab Releases, with full documentation on hiness.dev and the macOS H.app bundle showcase on hiness.app. Every release embeds a BUILD_MANIFEST.json tied to its exact Git commit and is signed with OpenSSH (packaging/keys/release-signers).

Shell installer (macOS and Linux)

Review scripts/install.sh (also served at https://hiness.dev/install.sh), then run:

curl -fsSL https://hiness.dev/install.sh | sh -s -- --service

The script verifies SHA256SUMS.sig with ssh-keygen -Y verify (bingboombam@parlant.xyz in packaging/keys/release-signers), checks the archive SHA-256, installs the bundle under ~/.local/opt/harness/current, cascades writable PATH locations (preferring /usr/local/bin, /opt/local/bin, /opt/homebrew/bin, ~/.local/bin, or other writable PATH directories, falling back to ~/.bin last; override with --bin-dir), and optionally registers a per-user macOS LaunchAgent or Linux systemd --user service (--service).

Elixir / Mix archive (mix h.setup)

If Elixir and Mix are already installed, install the zero-dependency h_setup archive from the signed release and run mix h.setup:

mix archive.install https://gitlab.com/parlant-co/harness/-/releases/permalink/latest/downloads/h_setup.ez
mix h.setup --service

Embed H in an Elixir project

With Elixir 1.20 / OTP 29, add the core daemon from Hex to your mix.exs dependencies and run mix deps.get:

{:harness, "~> 0.4.0", hex: :hiness}

hiness is the package name; :harness is the OTP application and configuration key. Follow the embedding guide or browse the Elixir API on HexDocs. Use the signed bundles above for hi, hiweb, and H.app.

macOS application bundle (H.app)

On macOS (arm64), visit hiness.app or download H-v<version>-darwin-arm64.dmg from GitHub Releases / GitLab Releases, drag H.app to /Applications, and open it. H.app starts its embedded daemon on ~/.local/share/h, opens the web workbench at http://127.0.0.1:4200/inbox, and provides [H] menu-bar actions to copy your owner sign-in token, link hi into the first writable standard PATH bin directory (falling back to ~/.bin last), or cooperatively drain and restart the daemon.

Build from source

Development target: Elixir 1.20 / OTP 29, plus Rust for clients/tui and Node/npm to build the Monaco editor assets.

# Web UI: build the optional Monaco assets, then start Phoenix and the daemon
(cd clients/web/assets && npm ci && npm run build)
(cd clients/web && mix deps.get && PHX_SERVER=true mix run --no-halt)

# Alternatively, for API and terminal clients only (no browser UI):
mix deps.get
mix compile
bin/h-daemon

Run only one server per data directory. For Phoenix, open http://127.0.0.1:4000 and sign in with the owner token in ${H_DATA_DIR:-$HOME/.local/share/h}/auth.token.

For file review, live reloading, pane composition, and the visual feedback inspector, see Working on the web UI.

Build the terminal client from the repository, then run it from your project directory. It attaches to either server; it does not start one:

cargo install --locked --path clients/tui
cd /path/to/project
hi                         # fullscreen editor; Enter steers, Alt-Enter follows up
hi inbox                   # live multi-session inbox across workspaces (/inbox or Alt-I in session)
hi --tui-mode regular      # terminal-owned scrollback
hi -r                      # workspace session picker
hi -s SESSION_ID           # attach by ID, including when using a symlink to the workspace

The standalone daemon prints its API address. Its default data directory is ~/.local/share/h; override it with --data-dir DIR or H_DATA_DIR. Phoenix and hi also honor H_DATA_DIR. Use h-daemon -ne (or --no-extensions) to bypass configured extensions. Managed Codex device login is built in and opt-in; it needs no Codex executable. MultiCodex is a separate path-loaded extension. Host tools run with your user's filesystem and shell access, not in a sandbox.

Manage H with hi

hi login sets up the first Codex alias without creating a session or editing JSON. It is also available as /login during a session and in Phoenix under Account settings. Use hi account list, hi account add <alias>, hi account use <alias>, hi account remove <alias>, hi logout [alias], or hi key remove <provider> <alias> to manage or remove stored credentials.

hi daemon status
hi daemon start --launcher "$PWD/bin/h-daemon"    # foreground, from a built checkout

For a standalone bundle with the runtime included:

mix h.build --release          # refreshes the tested bundle at dist/harness
dist/harness/bin/hi daemon start

The bundled daemon also serves the owner-authenticated web inbox at http://127.0.0.1:4200/inbox. Sign in with your store's auth.token.

For daily use from any project, run mix h.local --service for first-time service setup after stopping any manually started daemon. For later updates, run mix h.local to build, smoke-test, and install. If the bundle is already built, run mix h.install alone. mix h.bundle is equivalent to mix h.build --release. By default the installer cascades writable PATH directories (preferring /usr/local/bin, /opt/local/bin, /opt/homebrew/bin, ~/.local/bin, and other user-writable PATH directories before falling back to ~/.bin last); pass --bin-dir to pin a specific directory. This installs a versioned bundle and a per-user macOS service. hi resolves its sibling h-daemon; H_DAEMON_BIN or --launcher can override it. On macOS, hi daemon install-service registers a per-user LaunchAgent. Use mix h.build for a development build of all three applications. On shutdown (hi daemon stop, restart, restart-service, mix h.install, or SIGTERM), the daemon cooperatively drains open tools and provider streams without starting new tools or turns (automatically extending the 300s default drain timeout to cover active tool deadlines plus a 30s commit grace), then resumes active sessions on next boot. See local daemon management for cooperative restarts, --idle-only guards, and resuming the same conversation with /restart-ui.

Import pi transcripts as read-only sessions with hi import --harness pi. See archive import for overrides and repeat imports.

See model provider setup for /key set and named API-key profiles, Codex device login, and Gemini on Vertex AI.

Test

Run mix test at the root and in clients/web/; both projects default to --no-start. Run cargo test --locked in clients/tui/. The root suite excludes live LLM calls. To include the Phoenix/Rust sync test, build hi first and run HI_BIN=/absolute/path/to/hi mix test --include native_client in clients/web/.

Documentation

The project websites (websites/hiness.dev and websites/hiness.app) build separately with Jekyll and share synchronized release and legal records under websites/shared/. Their demos are static walkthroughs; no running daemon or provider account is required.