Install
Karajan v4 attaches to the AI agent you already work with (Claude Code, Codex, Gemini CLI, Cursor). You install it once per machine, activate it once per project, and from then on your agent follows the method and git enforces it.
One installer, complete result: curl -fsSL https://karajancode.com/install.sh | sh installs the full product — it uses your Node (≥ 22.12) if present, and auto-provisions the official Node LTS into ~/.karajan/node (checksum-verified, nothing system-wide) if not. npm install -g @karajan-family/code works too if you prefer it explicit (published as karajan-code before joining the scope; the legacy name still installs the same versions). A CLI-only single binary exists behind --standalone for machines where you deliberately want no Node. Requires git, and at least one AI agent CLI — two enables cross-AI review; three enables arbitration.
The one-liner (recommended)
Section titled “The one-liner (recommended)”In your project directory, tell your agent just this — it routes itself:
I want to use Karajan in this project: read https://karajancode.com/start.mdand do what it says.The router prompt makes your agent check whether kj is installed (and set up the whole machine if not), detect whether this is a new project or an existing codebase, activate the environment accordingly, and stop and WAIT for you whenever a step needs your permission (sudo/administrator), an account, or kj exits with code 3 (PENDING USER ACTION) — a partial install is a failed install. The prompts are versioned with kj itself (docs/prompts/).
Prefer to drive each phase yourself? The three flows below are the same thing, split out.
1. Set up your machine (once)
Section titled “1. Set up your machine (once)”Read https://karajancode.com/install-machine.md and do what it says: installKarajan Code on this machine, FULLY operational. Ask me before each install;if a step needs elevated privileges (sudo/administrator) or kj exitswith code 3, STOP, show me the exact commands and WAIT for my go-ahead.curl -fsSL https://karajancode.com/install.sh | sh # full product; --standalone for CLI-onlykj doctor # explains anything missingkj install-tools # completes the stack; exit 3 = pending user actionFull product always: uses your Node ≥ 22.12 or auto-provisions the official LTS (checksum-verified, in ~/.karajan/node). Equivalent: npm install -g @karajan-family/code.
2. Start a new project
Section titled “2. Start a new project”This machine already has kj. Read https://karajancode.com/project-new.md andactivate Karajan in THIS project (new). Stop and wait for me if anythingneeds my permission, an account, or kj exits with code 3.kj init # config, rules, quality tooling (agent-safe without a TTY)kj env install # method into AGENTS.md + hooks + review gate + RAG index (exit 3 if it cannot index)kj env install runs kj harden and kj review --install-gate itself (skip them with --no-enforce), and commits the contract files it generated (.karajan/review-gate, .karajan/hooks/, AGENTS.md…) on your work branch; on the base branch it commits nothing and prints the commands. Everyone who clones inherits the environment; each clone runs kj harden once to point git at the hooks.
3. Adopt Karajan in an existing project
Section titled “3. Adopt Karajan in an existing project”This machine already has kj. Read https://karajancode.com/project-legacy.mdand adopt Karajan in THIS existing codebase: work on a branch, respect theproject's own configs, run kj onboard first, and stop and wait for me ifanything needs my permission or kj exits with code 3.git switch -c chore/adopt-karajan # never on the default branchkj onboard # brownfield analysis → Architecture Briefkj init && kj env installkj seeds configs only when NO variant exists — your eslint.config.mjs, .prettierrc or biome.json stay untouched (covered). A config also needs its tool installed: eslint.config.js needs eslint, .prettierrc.json needs prettier and commitlint.config.js needs @commitlint/cli and @commitlint/config-conventional; without them the report names the npm i -D command instead. With prettier installed in the repo, kj formats the contract files it generated with it and your config (not .karajan/ nor the files the seal covers, which it judges byte for byte), also on the base branch, where kj does not commit them for you. The RAG index over your existing code is the main prize: your agent queries it instead of guessing. Land the contract files through your repo’s normal flow (branch + PR).
Verify what you installed
Section titled “Verify what you installed”Since 5.0.0 every release is built and published by GitHub Actions from a tagged commit of manufosela/karajan-code, with a signed provenance statement (SLSA): it ties the package you download to the exact commit and workflow that built it.
npm package. In the project (or folder) where kj is installed:
npm audit signatureskj’s packages must appear among those with verified attestations. The npm page of @karajan-family/code shows the same provenance, with a link to the workflow run.
Standalone binaries. With GitHub CLI 2.49 or later, next to the downloaded binary:
gh attestation verify kj-linux-x64 --repo manufosela/karajan-codeEach binary also ships with its .sha256 file: the hash sha256sum kj-linux-x64 prints must match the one in it. A version published before 5.0.0 has no provenance.
Uninstalling / opting out
Section titled “Uninstalling / opting out”Every gate is a file you can see: remove .karajan/review-gate to disable the local review gate (the kj-*.yml workflows in .github/workflows/ keep checking in CI until you remove them), unset core.hooksPath to disable the hooks, and delete the managed block in AGENTS.md to remove the method. Nothing is hidden.
Karajan Code™ · AGPL-3.0