| 1 | # klaus |
| 2 | |
| 3 | klaus is a command-line client that launches and follows coding-agent runs. You talk to an |
| 4 | interactive coordinator (Claude Code, Codex or agy) in a session klaus starts. When work can run in |
| 5 | parallel, you or the coordinator launch autonomous agents, each in its own git worktree and its own |
| 6 | window of a detached tmux session. klaus records every run, formats its output, and finalizes what |
| 7 | it pushed. It follows the result through GitHub's review and CI or a valley's change states, |
| 8 | dispatches fix runs where it can, and reports events a coordinator can wait on. Approval stays with |
| 9 | the operator. |
| 10 | |
| 11 | ## Install |
| 12 | |
| 13 | klaus is the package `packages.x86_64-linux.klaus` of this repository's flake (Linux x86_64 only). |
| 14 | Install it from your own repository URL, for example: |
| 15 | |
| 16 | ```bash |
| 17 | nix profile add 'git+ssh://git@valley-host/~/the-valley#klaus' |
| 18 | ``` |
| 19 | |
| 20 | In a checkout, `nix build .#klaus` builds it. `klaus --version` prints `klaus version <v>`, where |
| 21 | `<v>` is `0.1.0-<short commit>`, `0.1.0-<short commit>-dirty` for a tree with uncommitted changes, |
| 22 | or `0.1.0-unknown` when nix knows no commit. A host can follow a branch with |
| 23 | [`klaus self-update`](./docs/guide.md#keeping-klaus-up-to-date). |
| 24 | |
| 25 | ```bash |
| 26 | klaus # resume the latest coordinator session, or start one |
| 27 | klaus new # start a fresh coordinator session |
| 28 | klaus launch --prompt-file brief.md # launch an agent run |
| 29 | klaus dashboard # follow runs, changes and jobs |
| 30 | ``` |
| 31 | |
| 32 | ## Runtime prerequisites |
| 33 | |
| 34 | The package supplies none of the programs klaus runs; they come from `PATH`: |
| 35 | |
| 36 | - `git` 2.30 or later, `tmux` (sessions run inside tmux) and `bash`; |
| 37 | - at least one authenticated agent CLI: `claude`, `codex` or `agy`; |
| 38 | - `gh` for repositories on GitHub, and `valley` for repositories that deliver to a valley; |
| 39 | - `nix` for `klaus self-update`, the default formatter and nix dev shells; |
| 40 | - `ssh` and `rsync` for runs on a sandbox host. |
| 41 | |
| 42 | ## Documentation |
| 43 | |
| 44 | - [Guide](./docs/guide.md): setup and everyday journeys. |
| 45 | - [Reference](./docs/reference.md): commands, configuration, files, events and constraints. |
| 46 | - [Design](./docs/design.md): how runs, the pipeline and valley delivery work, and the trust |
| 47 | boundaries. |
| 48 | - [Development](./docs/development.md): building and testing klaus. |
| 49 | - The repository's rules: [AGENTS.md](../AGENTS.md). |