# Installation

> Install the kavach CLI, the kavach-recorder flight recorder and the five Kavach agent skills on Linux or macOS.

Kavach has two programs:

- **`kavach`**, the CLI. It inspects, replays and compares fixtures, checks feature contracts, draws flow maps, and serves an MCP server for coding agents.
- **`kavach-recorder`**, the flight recorder. Your service starts it as a child process; it keeps the journal on disk and writes a fixture when a step fails, even if the service dies in that step.

Both are single static binaries. Your service does not need Go; only building Kavach from source does.

## One command

On Linux or macOS (`amd64` or `arm64`):

```bash
curl -fsSL https://www.thekavachlabs.com/install.sh | sh
```

This downloads the latest release, checks it against the release's `SHA256SUMS`, installs `kavach` and `kavach-recorder`, and copies the five [agent skills](https://www.thekavachlabs.com/docs/guides/ai-agents) into every coding agent it finds: Claude Code (`~/.claude/skills`), Codex (`~/.codex/skills`), OpenCode (`~/.config/opencode/skills`) and Antigravity (`~/.gemini/config/skills`).

Check it worked:

```bash
kavach version
command -v kavach-recorder
```

### Installer options

Pass flags after `sh -s --`:

```bash
curl -fsSL https://www.thekavachlabs.com/install.sh | sh -s -- --no-skills
```

| Flag | Effect |
| --- | --- |
| `--no-skills` | Install only `kavach` and `kavach-recorder`. |
| `--skills-only` | Install only the agent skills. |

| Environment variable | Effect |
| --- | --- |
| `KAVACH_INSTALL_DIR` | Where binaries go. Default: `/usr/local/bin` if writable, else `~/.local/bin`. |
| `KAVACH_SKILLS_DIR` | Install skills to this one directory instead of every agent's. |
| `KAVACH_SKIP_SKILLS=1` | Same as `--no-skills`. |
| `KAVACH_VERSION` | Release tag to install, for example `v0.1.3`. Default: latest. |
| `KAVACH_FROM_SOURCE=1` | Build with `go install` instead of downloading a release. |
| `KAVACH_ARCHIVE_DIR` | Install from local release tarballs and `SHA256SUMS` (offline or CI). |

## Agent skills only

If you already have the binaries, or want the skills managed by the standard `skills` CLI:

```bash
npx skills add kavachlabs/kavach
```

## From source

With Go 1.24 or later:

```bash
go install github.com/kavachlabs/kavach/cmd/kavach@latest
go install github.com/kavachlabs/kavach/cmd/kavach-recorder@latest
```

## How your service finds the recorder

Every SDK starts the recorder from `$KAVACH_RECORDER` if it is set, and otherwise looks for `kavach-recorder` on `PATH`. If the recorder cannot start, the SDK logs an error and the service keeps running unrecorded. Recording never fails your service.

In containers, copy `kavach-recorder` into the image next to your service, or set `KAVACH_RECORDER` to its path.

## Next

- [Quickstart](https://www.thekavachlabs.com/docs/quickstart): record, replay and verify the demo ledger.
- [Register the MCP server](https://www.thekavachlabs.com/docs/guides/ai-agents#register-the-mcp-server) so your agent gets structured verdicts.

Source: https://www.thekavachlabs.com/docs/installation
