# Quick start

> Install Lanekeeper, set up a repository, and see your first clash in about two minutes.

> **Install with npm for now.** `npm i -g lanekeeper` (version 0.2.0) works today. The single-file binaries, the
> install script and Homebrew below arrive with the first signed GitHub release; see the [changelog](https://lanekeeper.dev/docs/changelog).

Lanekeeper needs git 2.38 or newer, on macOS, Linux or Windows. The npm package needs Node 22.13 or newer; the
single-file binaries need nothing else.

## 1. Install

```sh
npm i -g lanekeeper
```

This installs one program under two names, `lanekeeper` and `lk`.

Without Node, install the binary for your platform instead. The script checks the download against the release's
`SHA256SUMS`, verifies that file's signature too when [cosign](https://docs.sigstore.dev/cosign/system_config/installation/)
is installed (it says which it did), and puts the binary in `~/.local/bin`:

```sh
curl -fsSL https://lanekeeper.dev/install | sh
```

Or use Homebrew (`brew install upwansingh/tap/lanekeeper`), or on Windows download `lk-windows-x64.exe` from the
[GitHub release](https://github.com/UpwanSingh/lanekeeper/releases/latest) and save it as `lanekeeper.exe` in a
folder on your `PATH` (the hooks `lk init` writes call `lanekeeper`). Every release's `SHA256SUMS` is signed
with Sigstore by the release workflow; to check it yourself:

```sh
cosign verify-blob SHA256SUMS --bundle SHA256SUMS.sigstore.json \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate-identity-regexp '^https://github.com/UpwanSingh/lanekeeper/\.github/workflows/release\.yml@'
sha256sum -c SHA256SUMS --ignore-missing
```

## 2. Set up the repository

Run this once in any checkout of the repository:

```sh
lk init
```

`lk init` adds:

- `.lanekeeper/config.yml` with the defaults (warn mode);
- Claude Code hooks in `.claude/settings.json`, so Claude is told about clashes before and after each edit;
- the MCP server in `.mcp.json` and `.cursor/mcp.json`, and Cursor hooks in `.cursor/hooks.json`;
- a short section in `AGENTS.md` and `CLAUDE.md`, a Cursor rule, and Copilot instructions.

It only adds. Files you already have keep their content, and `lk uninstall` puts every file back byte for byte.
Add `--ci` to also add the GitHub Action workflow, or `--plugin` if your team uses the Claude Code plugin instead
of project hooks.

## 3. Work in lanes

Give each agent its own git worktree:

```sh
git worktree add ../moscow -b moscow
git worktree add ../berlin -b berlin
```

Start your agents in those directories as usual. Lanekeeper starts its daemon on first use and stops it after
30 minutes without activity.

## 4. See what's happening

```sh
lk status
```

```text
Lanekeeper  base main (f4436e1)  mode warn

LANES
  lane    branch  agents  last activity  changes
  berlin  berlin  none    0s ago         1 symbol, 1 file
  main    main    none    0s ago         clean
  moscow  moscow  none    0s ago         1 symbol, 1 file

CLASHES  1 high
  HIGH  R2 SIGNATURE_BREAK  login's signature is changing in lane moscow; the new call at src/report.ts:4 in lane berlin uses the old form.  [0e34a1e]
```

(Captured from `lk status` on a demo repository. The agents column fills in when Claude Code or Cursor sessions
start in a lane.)

`lk explain 0e34a1e` shows everything about one clash, including what to do, and `lk plan` suggests the order
to merge the lanes in.

## Next

- [Concepts](https://lanekeeper.dev/docs/concepts): lanes, clashes, claims and the merge plan.
- [Rules](https://lanekeeper.dev/docs/rules): what each rule catches.
- [Claude Code](https://lanekeeper.dev/docs/claude-code): warn mode, block mode and the plugin.
- [How to run multiple AI coding agents](https://lanekeeper.dev/blog/running-multiple-ai-coding-agents): the worktree pattern and coordination strategies.
