# Get started with dira

> Your first billable hour, tracked in five minutes.

Install the daemon, link your device, point it at your harness — and dira
starts counting the minutes you're actually engaged. Nothing leaves your
machine. The other three books of [letopis](https://dirahq.sh/letopis) read
the same records later, and every one of them is optional.

Canonical page: https://dirahq.sh/getting-started

Core path: Install → Link → Harness → Track → Invoice. Then, optionally:
zavet, proba, miara.

## The short version — two commands

```
curl -fsSL https://dirahq.sh/install | sh
dira onboard
```

`dira onboard` is the guided path through steps 01, 02, 03 and 06 below. It
detects which agent harnesses this machine has and wires all of them in one
pass, registers the daemon as a login service so it survives reboots, offers
to link the device, installs zavet and scaffolds this repo's `.zavet/`, and
sets the knowledge sync tier.

Every step is skippable, and the command is safe to re-run — it reports what
is already done and picks up the rest. There is no state file; each step
re-derives its status from the machine.

```
dira onboard --yes        # accept every default, no prompts (CI)
dira onboard --print      # show the plan, change nothing
dira onboard --no-service # don't register a login service
dira onboard --no-zavet   # skip the knowledge layer
dira onboard --harness claude --harness codex   # wire exactly these
dira onboard --knowledge metadata                # never send record bodies
```

Without a terminal and without `--yes` (a pipe, a CI job), `dira onboard`
prints the plan and exits 0 rather than hanging on a prompt.

Windows: `irm https://dirahq.sh/install.ps1 | iex`, then the same
`dira onboard`. The `.zavet/` scaffolding step needs a POSIX shell, so on
Windows it is skipped in favour of `/zavet:init` inside Claude Code.

The numbered steps below are the same work done by hand — read them if you
want to wire a single repo, self-host, or know exactly what lands where.

## 01 · Install the daemon

~30 seconds. A single binary. It runs quietly in the background and writes
to a local SQLite file — nothing else.

macOS / Linux:

```
curl -fsSL https://dirahq.sh/install | sh
```

Windows (PowerShell 5.1+, native x64 and arm64):

```
irm https://dirahq.sh/install.ps1 | iex
```

Verify:

```
dira --version
```

There is no package-manager distribution. Rather not pipe a script to a
shell? Download the `.tar.gz` (or `.zip` on Windows) from GitHub Releases and
put `dira` and `dirad` on your PATH yourself.

On Windows, `irm | iex` cannot forward flags — use
`& ([scriptblock]::Create((irm https://dirahq.sh/install.ps1))) -Channel prerelease`.

## 02 · Link your device

One command. Linking mints an Ed25519 keypair on your machine. Every
interval dira records is signed by it — that is what makes an hour provable
later, and what lifts a proba hallmark from 585 to 750.

```
dira device link
```

Prompts for the one-time code from the dashboard's Connections page (or pass
`--code`), generates a device key and links. Self-hosting: `dira config set
cloud_url http://localhost:3000` first — the cloud URL is config, not an
argument to `link`. No API keys: the one-time code is the credential.

## 03 · Connect your harness

One `dira init` per harness drops a capture shim into that agent. dira reads
metadata only — session start/stop, tokens, commit SHAs. Never your prompts.

```
dira init            # Claude Code, the default
dira init codex      # also: gemini, cursor, opencode, grok
```

Six harnesses are supported — Claude Code, Codex CLI, Gemini CLI, Cursor,
OpenCode and Grok Build — plus a manual timer for calls, meetings and
testing. There is no flag that wires them all at once; run it once per
harness you actually use. `dira init` also installs `git post-commit` /
`post-merge` hooks, which anchor sessions to commits.

## 04 · Run your first session

Just work. Open an agent and start building. dira counts your engaged
minutes, dedupes parallel sessions, and anchors each interval to the commits
it produced. Hours it cannot anchor are quarantined, never billed.

```
dira status
```

Reports three separate numbers per session: engaged minutes (the billable
base), agent wall-clock time, and compute (tokens and an estimated cost) —
plus how many commits were anchored and how many intervals are quarantined
pending a commit.

## 05 · Bill it with proof

When you're ready. Set a rate, pick a date range, and dira rolls engaged
hours into an invoice — then hands the client a link that opens every
commit behind every hour.

Invoicing lives in the dashboard, not the CLI: set a rate per client, pick a
date range, and engaged hours roll into a draft with the anchored commits
attached. Sending it mints a proof link the client opens without an account.

Locally, `dira report` gives the same numbers offline:

```
dira report --week
dira report --project github.com/acme/api
```

The client needs no account to open the proof link. See a client proof page:
https://dirahq.sh/letopis#proof

## 06 · Add zavet — record the why (optional)

Hours say how long. zavet says what was decided. Decision records live in
the repo, travel with the code, and are reviewable in a PR. Backfilled ones
stay marked unverified until a human confirms — zavet never invents a
rationale.

```
dira zavet install
```

Installs the zavet Claude Code plugin by shelling out to the `claude` CLI;
the plugin owns the `.zavet/` repo layer and works with no dira installed —
it just loses the time correlation. (`dira onboard` does this step, and also
scaffolds `.zavet/` in the current repo.)

The scaffold is structurally complete but semantically empty — `RULES.md`
ships with a placeholder. Restart Claude Code and run `/zavet:init` to write
the repo's actual standing rules.

Git hooks are written to `.zavet/githooks/` but never activated: dira does
not set `core.hooksPath`, because that setting is exclusive and shared with
Husky, lefthook and pre-commit. Point git at them yourself if you want them:

```
git config core.hooksPath .zavet/githooks
```

Knowledge sync is a separate channel with its own consent, never implied by
linking a device. `metadata` sends ids, titles, status, guard globs and
record hashes; `full` adds the record bodies, commit trailer values and guard
check commands. `dira onboard` asks, defaulting to `full`; change it anytime
with `dira config set sync.knowledge metadata` followed by a daemon restart.
The workspace has its own tier, and bodies are stored only when both ends say
`full`.

A commit footer is enough to become a decision record:

```
feat(import): map columns before validation

Why: client CSVs arrive with renamed headers
Rejected: strict schema — breaks 3 of 4 clients
Refs: D-0042
```

That footer becomes a decision record, a lineage chip on the session, and
the intent element on the hallmark. More: https://dirahq.sh/zavet

## 07 · Add proba — certify the process (optional)

A GitHub App, not a CLI step: five minutes, no code changes. It mints a
signed hallmark per merged PR, and a cron derives them from evidence already
in your workspace, so the overview is not empty on day one. Observe mode is
the default and never blocks a merge; Enforce is opt-in.

Install the GitHub App on all repositories or a subset (read-only
everywhere except the check run it publishes):
https://dirahq.sh/proba

The assay policy is a workspace record set in the dashboard, not a file in
your repo — there is no `.proba.yml`:

- mode: `observe` | `signal` | `enforce` (observe by default)
- minimum fineness: 585 | 750 | 999 (585 by default)
- rules: non-author review, CI green, count backfilled (all off by default)
- per repo: publish the `proba / assay` check, exclude paths

## 08 · Add miara — price the next one (optional)

Nothing to install. Name the deliverable up front in miara's Offers screen —
it binds to the repo, branch and PR that follow. miara then proposes
comparables from your own history and shows why each matched; you confirm or
reject each, and nothing is auto-confirmed. Three or more confirmed gives a
range with `n` and spread; fewer gives no number at all, and names what is
missing.

Calibration grades every delivered quote against what actually happened.
More: https://dirahq.sh/miara

## Fineness — core done, the rest is optional

Finishing step 05 puts you at fineness 750. Fineness is how deep the
evidence goes behind a shipped change; dira on the workstation is the rung a
code host structurally cannot see. Nothing below is required — each rung
only adds evidence you already produced.

| Grade | Requires | Adds |
| --- | --- | --- |
| 585 | proba App only | CI state, non-author review, authorship inferred. Weak provenance — and labelled as such. |
| 750 | + dira, steps 01–05 | Signed sessions, which harness wrote it, engaged supervision minutes per change. |
| 999 | + zavet in the repo | The decisions the change was made under — guards respected, not bypassed. |

## Manual download

Skip the script entirely. Grab the `.tar.gz` (or `.zip` on Windows) for your
target from GitHub Releases, extract it, and put `dira` and `dirad` anywhere
on your PATH yourself — https://github.com/dodi-smart/dirahq-cli/releases/latest

## Uninstall

Stops the daemon, unloads its launchd/systemd unit (or Windows scheduled
task), and removes both binaries. Your config and local events are never
touched:

```bash
curl -fsSL https://dirahq.sh/install | sh -s -- --uninstall
```

```powershell
& ([scriptblock]::Create((irm https://dirahq.sh/install.ps1))) -Uninstall
```

To also clear locally stored events and token usage (your device link is
kept), run `dira nuke` as well.

## Where to next

- Self-host: run the whole cloud locally — free and open on the Personal
  tier, or inside your own VPC on Enterprise — https://dirahq.sh/#pricing
- Concepts: engaged vs. agent vs. compute, and why only one of them is
  billed — https://dirahq.sh/#how
- Compliance: AI Act & CRA in plain words — https://dirahq.sh/letopis/ai-act

---

See also [/index.md](https://dirahq.sh/index.md),
[/letopis.md](https://dirahq.sh/letopis.md),
[/zavet.md](https://dirahq.sh/zavet.md).
