Getting started

Requirements

Node 22.6 or newer. The project uses Node's native TypeScript type stripping, so there is no build step for development.

Install

npm install

An API key

Any one of these works; the first that resolves wins.

export ANTHROPIC_API_KEY=sk-ant-...

Or sign in, which stores the credential in ~/.oharness/auth.json (mode 0600, written through a temp file and a rename):

oharness auth login anthropic

Or from the browser frontend: Models in the sidebar, pick a provider, paste the key. It goes through the same code path as the CLI, so there is one place credentials live rather than two.

Run it

npm run dev                       # terminal UI
npm run dev -- -p "one question"  # single shot
npm run --silent dev:headless -- "a task"
npm run dev:web                   # browser

Developing on the harness itself

Working on this project must not write into the home directory of the person working on it. The npm scripts point OHARNESS_HOME at .dev-home/, which is gitignored, and the test helper sets it again at import time so a direct node --test cannot leak either.

npm test
npm run typecheck
npm run build

What is not verified

No test makes a real API request. The wire formats belong to pi-ai and are exercised against a local fake endpoint (test/piai.test.ts), which covers the translation in both directions — streamed text, tool calls, usage, and a resolved subscription token reaching the socket — but not any vendor's actual behaviour. npm run smoke sends one streaming tool-calling request per protocol against the real APIs and checks the tool-call shape, the usage fields and the reasoning config — it needs a key, so only you can run it.