# Set up HRA

Check release admission before installing the CLI, then connect a provider account and start a conversation only when rollout prerequisites are satisfied.

## 1. Install and check the CLI

> **CLI artifact admitted; daemon startup blocked.** The admitted v0.7.1 artifact may be installed with the command below. Its tagged instructions are retained in the [immutable README](https://github.com/hraness/hra/tree/v0.7.1#get-started). Neither artifact admission nor installation authorizes daemon startup.

```text
test "$(unset BUN_OPTIONS NODE_OPTIONS LD_AUDIT LD_LIBRARY_PATH LD_ORIGIN_PATH LD_PRELOAD DYLD_FALLBACK_FRAMEWORK_PATH DYLD_FALLBACK_LIBRARY_PATH DYLD_FRAMEWORK_PATH DYLD_IMAGE_SUFFIX DYLD_INSERT_LIBRARIES DYLD_LIBRARY_PATH DYLD_ROOT_PATH DYLD_VERSIONED_FRAMEWORK_PATH DYLD_VERSIONED_LIBRARY_PATH && curl -fsSL --connect-timeout 10 --max-time 60 --max-filesize 524288 --retry 3 --retry-delay 1 --retry-max-time 60 --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/hraness/hra/v0.7.1/src/install-preflight-runtime.ts | command bun --no-env-file --config=/dev/null -e 'const n=["BUN_OPTIONS","NODE_OPTIONS","LD_AUDIT","LD_LIBRARY_PATH","LD_ORIGIN_PATH","LD_PRELOAD","DYLD_FALLBACK_FRAMEWORK_PATH","DYLD_FALLBACK_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","DYLD_IMAGE_SUFFIX","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_ROOT_PATH","DYLD_VERSIONED_FRAMEWORK_PATH","DYLD_VERSIONED_LIBRARY_PATH"],x=process.execArgv;const c=x.filter(v=>v==="-c"||v.startsWith("--config"));if(n.some(k=>process.env[k]!==undefined)||x.filter(v=>v==="--no-env-file").length!==1||c.length!==1||c[0]!=="--config=/dev/null"||x.some(v=>v.startsWith("-r")||v==="--preload"||v.startsWith("--preload=")||v==="--require"||v.startsWith("--require=")||v==="--import"||v.startsWith("--import=")||v==="--env-file"||v.startsWith("--env-file=")))throw new Error("The tagged HRA preflight requires a neutral Bun stage zero.");const[a,h]=process.argv.slice(1);const r=Bun.stdin.stream().getReader(),q=[];let z=0;try{for(;;){const o=await r.read();if(o.done)break;z+=o.value.byteLength;if(z>524288)throw new Error("The tagged HRA preflight exceeds its byte limit.");q.push(o.value)}}finally{r.releaseLock()}const b=new Uint8Array(z);let p=0;for(const v of q){b.set(v,p);p+=v.byteLength}const d=new Bun.CryptoHasher("sha256").update(b).digest("hex");if(d!==h)throw new Error("The tagged HRA preflight digest is invalid.");const j=new Bun.Transpiler({loader:"ts",target:"bun"}).transformSync(b);const u=URL.createObjectURL(new Blob([j],{type:"text/javascript"}));try{const m=await import(u);await m.installHraRelease(a);process.stdout.write(`${m.HRA_INSTALL_SUCCESS}\n`);}finally{URL.revokeObjectURL(u)}' -- https://github.com/hraness/hra/releases/download/v0.7.1/hraness-hra-0.7.1.tgz ed407bd0f0cb04fbca6c4f8ff90aab6643f1c43c16073de1193585dd54fb24f6)" = hra-install-safe
```

Use macOS or Linux with Bun 1.3.14 and curl. The installer verifies the immutable v0.7.1 release before replacing the HRA command. It does not start the daemon.

```text
hra --version
hra doctor --offline
```

Already using HRA? Follow the [update runbook](/docs/status/#install-and-update) before changing a daemon or restoring local state. Do not apply first-run instructions to an existing installation.

## 2. Connect a provider account

> **Before you start a daemon.** The v0.7.1 CLI artifact is admitted for installation. Initialization, daemon startup, and hosted command writers remain blocked on capacity. Complete the [rollout and update prerequisites](/docs/status/#install-and-update) before the steps below. Installing the CLI or opening the app does not clear that gate.

After the rollout prerequisites are satisfied, run these as separate commands in a foreground terminal. Initialization sets up the local state and a default project. Name your profile, then let Codex complete its own device-code sign-in.

```text
hra init --yes
hra account add personal
hra account login personal --provider codex --device-code
```

For Claude Code on Linux, use `hra account login personal --provider claude` instead. Claude owns its terminal prompts and browser handoff. Managed Claude login and execution are not available on macOS, and Claude has no HRA browser-linking flow.

Provider login is a one-shot command, not a command inside HRA's persistent shell. HRA never asks you to paste a provider credential. [Account status and login recovery](/docs/sessions/#accounts) cover an interrupted sign-in.

## 3. Start a conversation

With setup complete and your provider signed in, start a session. Keep the session ID returned by the first command. Open HRA's shell and select that exact session before writing your request.

If you signed in to Claude Code, replace the first command below with `hra session start personal --provider claude --preset fable-max`. The remaining shell steps are the same.

```text
hra session start personal --provider codex
hra
/account personal
/session <session-id>
Review this project and summarize its current state.
```

Type `/exit` to leave the shell. The daemon keeps the session running. Return later, select the same account and session, and continue.

To use a specific repository, register it with `hra project add --path <directory> --name <name>` and select it with `hra project use <project>` before starting the session.

## 4. Add the web app when you want it

You can stay local, or connect your HRA identity and approve a browser to see sessions away from the terminal. The [web app guide](/docs/web/) walks through email sign-in, device approval, and the session grid.

## Next

- [Pair a browser](/docs/web/)
- [Release and setup status](/docs/status/)
