Skip to content
ngvoicuPublic

About

Kluris gives AI coding agents shared, human-curated team knowledge: git-backed brains of markdown that agents search and update through per-brain skills and a native CLI.

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Repository files navigation

Kluris

Kluris turns your AI agents into a subject matter expert that never sleeps and never quits.

When your best engineer sleeps, Kluris doesn't. When they leave, Kluris stays.

🎥 New here? Take the guided tour at kluris.ngvoicu.dev.

curl -fsSL https://kluris.ngvoicu.dev/install.sh | sh     # macOS, Linux
irm https://kluris.ngvoicu.dev/install.ps1 | iex          # Windows PowerShell

What is Kluris?

Kluris gives every AI coding agent on your team the same shared knowledge: architecture, decisions, conventions, learnings. Your agents work like a colleague who knows every project, not a generic assistant starting from scratch in each chat.

The knowledge lives in a brain: a git repository of plain markdown that agents read, search and write. Agent and human curate it together. The agent proposes what to write down; a human reviews and approves every piece.

Kluris itself is one small binary. It creates and maintains brains, searches them, and installs each brain into your agents as a skill named kluris-<brain>.

Why it saves tokens

A brain is a summary your agent reads instead of the raw files. Without one, the agent crawls the repository (and every sibling repository it needs) at the start of every chat. With one, it loads a compact snapshot and goes straight to the note it needs.

Without Kluris, an illustrative cold start on a medium repository:

tree + README + CLAUDE.md         ~3,000 tokens
grep for related symbols          ~2,000 tokens
read 4-8 relevant files           ~15,000 tokens
read 2-3 sibling-project files    ~8,000 tokens
                                  ─────────────
                                  ~28,000 tokens just to orient

With Kluris, the same task:

kluris wake-up --json snapshot    ~1,200 tokens (brain.md + lobes + recent + glossary)
kluris search "<query>" --json    ~400 tokens   (ranked hits with snippets)
read 1-2 matching neurons         ~1,500 tokens
                                  ─────────────
                                  ~3,100 tokens, about 9x less spent on orientation

These are rough estimates, not a benchmark; the numbers depend on the repository, the agent and the prompt. The shape holds: a targeted lookup replaces a wide crawl, and the saving grows with every project you touch.

Why not a wiki, Notion or CLAUDE.md?

  • Wikis and Notion are written for people. Agents can't search across them or write back. A brain is markdown in git, made for agents and readable by people.
  • CLAUDE.md belongs to one project and one tool. A brain sits above all your projects and works with every agent on the team.
  • Agent memory is controlled by the agent. A brain is curated by people: you decide what goes in, review every entry and correct what is wrong.

Install

Kluris is a single binary. It needs no administrator rights and nothing else installed; git is the only other tool it uses.

macOS and Linux:

curl -fsSL https://kluris.ngvoicu.dev/install.sh | sh

Windows (PowerShell):

irm https://kluris.ngvoicu.dev/install.ps1 | iex

The installer puts kluris in ~/.kluris/bin (%USERPROFILE%\.kluris\bin on Windows) and adds that folder to your PATH: your shell's startup files on macOS and Linux, your user PATH on Windows. Open a new terminal, then run:

kluris doctor

To install a particular release, set KLURIS_VERSION:

curl -fsSL https://kluris.ngvoicu.dev/install.sh | KLURIS_VERSION=3.2.3 sh
$env:KLURIS_VERSION = '3.2.3'; irm https://kluris.ngvoicu.dev/install.ps1 | iex

Set KLURIS_NO_MODIFY_PATH=1 the same way to leave your PATH and shell files alone.

Platforms: macOS (Apple Silicon and Intel), Linux x86_64 and arm64 (with static musl builds, which the installer picks when the system's glibc is too old), Windows x86_64 and arm64.

Update

kluris self-update            # install the newest release, then run kluris doctor
kluris self-update --check    # only show the installed and the newest version
kluris self-update --version 3.2.3

self-update checks the download's SHA-256 before it replaces the binary. Behind GitHub's rate limit for anonymous requests, set KLURIS_GITHUB_TOKEN to a GitHub token.

Uninstall

kluris self-uninstall

This takes out the binary, the PATH setup and the installer's receipt. Your config, the companion playbooks, the agent skills and every brain stay. kluris self-uninstall --purge also deletes ~/.kluris and every agent skill Kluris wrote, after asking (--yes skips the question). Brains are never touched.

Verify a download

Every archive on the releases page has a .sha256 file beside it, the release has one sha256.sum, and every artifact carries a GitHub attestation:

shasum -a 256 -c kluris-aarch64-apple-darwin.tar.gz.sha256   # or sha256sum -c
gh attestation verify kluris-aarch64-apple-darwin.tar.gz --repo ngvoicu/kluris

The install commands above check the archive's SHA-256 for you, on every OS.

Quick start

Kluris lives in two places:

Where What you type What it is
Your terminal kluris … The CLI: create, register, maintain and inspect brains
Your AI agent /kluris-<brain> … The brain's skill: the agent searches, learns and remembers through the CLI

1. Create a brain, in your terminal:

kluris create            # a short wizard: name, description, location, type, git, companions

or non-interactively:

mkdir -p ~/brains
kluris create acme --description "Acme platform knowledge" --path ~/brains
Brain created: acme (product-group)
  Path: /Users/you/brains/acme
  Lobes: 3

Agent skill installed: kluris-acme
  Claude/Codex/Antigravity/etc: /kluris-acme
  Hermes: /skill kluris-acme  (or start with `hermes -s kluris-acme`)
  Created a new Hermes profile later? Run `kluris doctor` to refresh Kluris skills.

Or join your team's brain. A brain is a plain git repository: clone it and register the folder (Kluris uses it in place, it copies nothing):

git clone git@github.com:acme/acme-brain.git ~/brains/acme
kluris register ~/brains/acme

2. Use it, inside your AI agent, with any project open:

> /kluris-acme learn everything about this service

The agent studies the code and walks you through each finding. You see every note before it is written, and you approve, edit or skip it.

After an update, kluris doctor checks your setup and rewrites every brain's skill (self-update runs it for you).

Agents

Every brain is installed as one skill, kluris-<brain>, a SKILL.md with instructions and the kluris commands to run. Kluris writes it to:

Folder Read by
~/.agents/skills/ Cursor, Codex, Devin, OpenCode, Kilo Code, Junie and every other agent that reads this shared folder
~/.claude/skills/ Claude Code
~/.hermes/skills/ and every ~/.hermes/profiles/*/skills/ Hermes Agent
~/.gemini/config/skills/ Antigravity CLI (agy)
$COPILOT_HOME/skills/ (when COPILOT_HOME is set) GitHub Copilot

How to call it:

  • Most agents: /kluris-acme, then what you want (/kluris-acme search auth flow).
  • Hermes: /skill kluris-acme inside a session, or start with hermes -s kluris-acme.

The skill is plain instructions plus shell commands, so any agent that loads SKILL.md skills and can run a shell can use it. Created a new Hermes profile, or set COPILOT_HOME, after adding a brain? Run kluris doctor to install the skills there too.

Working with a brain

Everything in this section happens inside your AI agent. The patterns are free-form: say it naturally.

Onboard a project

Point the project at the brain, so every agent that opens the repository finds it:

> /kluris-acme setup this project

The agent adds a short ## Knowledge base section to the project's CLAUDE.md and AGENTS.md (creating them if needed), each change approved by you:

## Knowledge base

Read and write to the **acme** brain through kluris (never edit
brain files by hand). Use the `/kluris-acme` skill — search,
learn, remember, create.

Then have it learn the project:

> /kluris-acme learn the API endpoints and data model
> /kluris-acme learn the Docker and deployment setup

Remember decisions and knowledge

> /kluris-acme remember we chose raw SQL over an ORM for the reporting queries
> /kluris-acme remember all timestamps must be TIMESTAMPTZ
> /kluris-acme create a decision record about the auth architecture
> /kluris-acme create an incident report for the January outage
> /kluris-acme remember from this session

remember from this session goes back over the whole chat and proposes a note for everything worth keeping, one at a time. Use it at the end of a working session.

The commands the agent runs keep the brain in step with your team, so it never syncs by hand; after you approve, it commits exactly the files it wrote with kluris commit, which brings your teammates' commits in and pushes. If a teammate changed the same thing, it shows you both versions, asks which to keep (or proposes a merge), writes the file you chose and finishes the merge with kluris commit --merge.

Use the brain while coding

> /kluris-acme search token refresh
> /kluris-acme what do we know about the auth flow?
> /kluris-acme implement the new endpoint following our conventions
> /kluris-acme use brain knowledge and codebase and let's write a spec for OAuth sign-in

The agent checks the brain before it answers or writes code, and flags code that contradicts a recorded decision. "Use brain knowledge and codebase" asks it to ground the work in both: the team's decisions and the code as it is.

Review the brain

> /kluris-acme review this brain for gaps and stale neurons
> /kluris-acme review this brain and create more synapses
> /kluris-acme fix the broken synapses

Maintain it, in your terminal

kluris dream     # regenerate the maps, fix what is safe to fix, validate links
kluris status    # lobes, neuron counts and recent commits
kluris mri       # write the brain's visual map and print its link

Commit with kluris commit --brain <name> --paths a.md,b.md: it brings your teammates' commits in, commits just those files, the map.md/brain.md files they change and the reverse related links they call for in neurons with no change of their own, under your git identity, pulls what came in meanwhile and pushes, and leaves every other change in the brain as it is. Its exit code is the commit's: offline, refused or in conflict, a commit that landed exits 0, and its sync object says what the sync did. While a merge waits for you, kluris commit --merge <id> --paths <every conflicted file> finishes it from the files as you settled them (a file you deleted is a deletion). A brain is a plain git repository too: branches, history and your own commits work with git as in any other, and Kluris pulls and pushes the branch you have checked out.

Keep it in sync with your team

Every command that opens a brain keeps it in step with its remote, so nobody has to remember to sync:

  • kluris wake-up, kluris search, kluris status and kluris register bring your teammates' commits in before they read. They fetch at most once a minute, within 3 seconds, and the git steps they run before they read stop within 10 seconds in all, so a slow network or a stalled hook never holds them: the brain is then read as it is. A fetch cut off at 3 seconds pauses these fetches for that brain for five minutes, doubling up to an hour, until a fetch succeeds. A read's exit code is never its sync's.
  • kluris doctor brings them in the same way, within the same 3 and 10 seconds, but asks every brain's remote each time, paused or not: it is how you find out whether syncing works. Its fetch counts for the reads: one cut off at 3 seconds starts or doubles their pause, and its brain's line says for how long (left as is (offline): no answer within 3 s; reads skip it for 10 min); one that succeeds ends it. Each brain's line says what its sync did (pulled 2 commits, pushed), once.
  • kluris dream and kluris mri pull, then commit the brain's own housekeeping, built from what is already committed: dates, a missing parent, reverse related links, the maps and brain.md (see Neurons). Nothing is committed while a merge waits, and the fixes your uncommitted files cause stay in the work tree.
  • kluris commit commits the files you name, the maps they change and the reverse links they cause in neurons with no other change, brings your teammates' commits in, then pushes (see Maintain it).
  • kluris sync and kluris resolve are for syncing and settling by hand (below).

The commits a read, dream or mri leaves waiting (a housekeeping commit, or one whose push failed) go out in one background push: a detached kluris process that outlives the command and never touches the work tree. It writes its output to .git/kluris-sync/background.log and its result to .git/kluris-sync/last-push.json, which the next command reports as sync.last_push: at, result (pushed, offline, refused, failed, or needs_pull when the remote has commits the brain lacks, which the next read brings in so the push can follow), detail and commits. A failure is reported by every command until a push succeeds; a success, by the one command that reads it. For ten minutes after a failure no background push starts; kluris commit and kluris sync push at once.

One Kluris command at a time changes a brain. A read never waits for another command that is fetching, pushing or changing it: it reads the brain as it is, and its sync says busy. kluris commit, kluris sync and kluris resolve wait up to 30 seconds for it, then stop with busy too, as does any command that finds a git lock (such as index.lock) held.

There is no switch that turns syncing off: every command that opens a git brain with an upstream syncs it. Kluris has no watch mode and no service: nothing runs between your commands but a background push. A brain that is not in git, sits inside a larger repository, is a shallow clone or has no upstream is left alone (kluris commit, kluris sync and kluris resolve say why).

With --json, what a sync did is the same sync object (described below with kluris sync): at the top level for kluris wake-up, kluris search, kluris register, kluris create and kluris commit, in each brain's entry for kluris status and kluris mri, one entry per brain (with brain) for kluris dream, and a sync key on each brain:<name> check for kluris doctor. Reads, dream and mri add it only when there is something to say; the commands you run to sync carry it for every git brain with a remote: kluris commit, kluris sync, kluris resolve, and kluris create with --remote. Without --json, the same news is one line on stderr (for kluris doctor, on each brain's check line).

A teammate clones the brain and runs kluris register on the clone; from then on every command keeps it in step. A brain made with kluris create --remote <url> is shared from the start: its branch gets its upstream (branch.main.remote and branch.main.merge, as git push -u writes them), and the first push sends it when the remote is empty. A remote that already has a branch is left alone, nothing merged or pushed (refused: clone it and run kluris register on the clone, or point --remote at an empty repository), and the brain keeps origin but gets no upstream; offline or turned away, the brain is kept with its upstream set, and the next command that opens it pushes it. Every push guards that first publication, at every URL it goes to (a pushurl, a pushInsteadOf rewrite, or the remote's own URL): when one has no branch of the brain's name but has another, the push is refused the same way, with nothing pushed to any of them. kluris create --json adds the sync object after its own keys; the exit code is 0 whenever the brain was created.

kluris sync does all of it at once, right now, for people who want to sync by hand:

kluris sync --brain acme          # fetch, merge and push one brain
kluris sync --brain all --json    # every brain, for scripts

For each brain, kluris sync fetches its branch's upstream (it never asks for credentials), fast-forwards when the brain is behind, pushes when it is ahead, and merges when both sides have new commits. It works on the branch checked out when it starts, from start to end: what it brings in is only the commit the remote itself named in this sync, never what another git left in origin/main, and what it pushes is that branch's commit. A remote that has no such branch gets it back from the push. When both sides have new commits:

  • Merged on their own: changes to different files; the generated map.md and brain.md files, rebuilt from the merged brain rather than merged line by line; created (the earlier date) and updated (the later one); related and tags, both lists joined; edits to different parts of the same neuron; a file one side adds in a folder the other side renamed, which moves into the renamed folder (renaming a folder never drops a teammate's file).
  • Left for a person: overlapping edits, a file deleted on one side and edited on the other, different parent values, any other frontmatter field changed differently on both sides, a file on one side where the other has a directory (or a rename git cannot settle), and, when the history has several merge bases (both sides merged each other), any file changed on both sides. Nothing changes then (no file, no commit, no push) but the conflict, kept until it is settled with kluris resolve. A later sync reports it again, counting the teammates' newer commits that wait behind it; drops it when the remote now merges cleanly; and finds it afresh after a commit of yours.

A file with uncommitted changes is never overwritten, nor is an untracked or ignored file where an incoming file lands: that brain is left as it is (uncommitted) until you commit, stash or move it. The repository's pre-merge-commit, prepare-commit-msg, commit-msg, post-merge and pre-push hooks run as git runs them, and git's reference-transaction and post-index-change hooks run on every ref and index update (--no-verify skips pre-merge-commit and commit-msg); a merge hook may change the message, but one that stages files into the merge stops it, with nothing merged. Kluris pushes with git push <remote> <branch> (git push origin refs/heads/main:refs/heads/main, the branch it synced named by its ref, never HEAD), so pre-push runs exactly as for your own push, and git moves origin/main once the remote took it. A pre-push hook that refuses stops the transfer to the push URL it ran for (hook, with what the hook printed); it undoes nothing the sync already pulled or merged, nor a push another URL already took. Kluris learns which hook refused from git's trace2 event stream, never from what a hook prints: it points GIT_TRACE2_EVENT at a temporary file for the push, so the hooks see that variable and a trace2.eventTarget of yours gets no events from the push. A remote that turns the push away is refused, with git's message, and so is a failure Kluris cannot attribute for certain; the sync pulls and pushes again only when git's own report says the remote moved and no pre-push run refused. The commits to push are counted against the remote's fetch URL, so a push URL of its own is pushed to only when that count is not zero; once the push ends, to_push counts what the branch still has that origin/main does not, a commit made while the push ran included. The brain must be the root of its own git repository, and git must be 2.38 or newer.

With --json, each brain's entry is name and sync, which has eight keys: pulled (the commits brought in), auto_merged (neurons merged on their own), left_as_is (why the brain was left as it is: reason, paths and detail, the reason null when nothing was), conflicts (each with path, kind (content, delete_edit, parent, frontmatter, structure or ambiguous_base), merge (the waiting merge's id, which kluris resolve --merge names), the ours, theirs and base texts, null where a side has no file there or is binary, and binary), behind_conflict (the newer commits waiting behind an open conflict), to_push (the commits the remote does not have yet), pushed and last_push (what the last background push did, as its record says: a failure until a push succeeds, which removes it; null when there is nothing to report). The reason is one of uncommitted (the files in the way are in paths), offline (the host does not resolve, the connection is refused or times out, or the fetch or push runs past its minute), refused (a locked ref, a remote-tracking ref Kluris will not move, a remote that turned the brain away or kept moving, histories with no commit in common, or under --brain all a brain that cannot be synced: not a git repository, inside a larger one, or a shallow clone), busy (another Kluris command is changing the brain or using its remote for a fetch or a push, a git lock is held, or the branch changed while Kluris synced it: a switch, a commit, a rebase started), in_progress (a git merge, rebase, cherry-pick or revert), hook (a hook stopped the merge or the push), failed (git stopped partway) or no_upstream (the branch has no upstream: set one with git push -u origin main; a brain with no remote at all says add one with git remote add origin <url>, then git push -u origin main); detail gives git's message and the fix. An offline brain's detail says which kind: no answer within 60 s (the time the fetch or push had: 3 s for a read and kluris doctor), or the line git, ssh or curl printed for the network trouble, such as ssh: Could not resolve hostname example.com: Name or service not known. Without --json, every brain that has something to say also gets one line on stderr, such as kluris: acme: pulled 2 commits; 1 conflict (notes/c.md) in merge 88e6700161ad, which names the waiting merge's id for kluris resolve --merge. The exit code is 1 when a brain has a conflict or was left as it is for any reason but offline and no_upstream. The other commands keep their own exit codes: a read's is never its sync's, kluris commit exits 0 whenever its commit landed, and kluris create whenever the brain was created.

The fetch has a one-minute limit. Sync learns the upstream's commit from its own git ls-remote origin main, then fetches that branch alone (no tags, other branches or pruning) for its objects, writing no ref and no FETCH_HEAD, so a fetch stopped at the limit leaves no lock behind; then it checks the commit is here, locally (a partial clone never fetches it for that) and within the same minute. It reads nothing another git in the brain can rewrite (an editor's fetch, or one of yours), so what sync merges and pushes is always the commit origin listed. Kluris then moves the remote-tracking ref (origin/main) to that commit, unless another git fetch moved it meanwhile, in which case Kluris keeps that and fetches once more. When origin moves its branch away from the listed commit before the fetch brings it, Kluris fetches again; if that happens on the second try too, kluris sync changes nothing and its refused detail says so: run it again. A push has the same limit: then the push is stopped, with every process it started that stays in its process group (Unix) or job (Windows), its pre-push hooks among them, and the brain is offline.

When the fetch cannot update the remote-tracking ref because a lock file is in the way (such as .git/refs/remotes/origin/main.lock, left by a git that was stopped), kluris sync changes nothing and its refused detail names that file. If no git is running in the brain, remove the file and run kluris sync again; Kluris never removes it.

Kluris moves only a remote-tracking ref of its own: one under refs/remotes/ that is not a symbolic ref, checked before the fetch, after it and right before each push. When the branch's upstream maps somewhere else (a remote.origin.fetch such as +refs/heads/main:refs/heads/main, which makes refs/heads/main its own tracking ref) or origin/main is a symbolic ref (to refs/heads/main, say), moving it would move a branch while its files stayed behind, so kluris sync changes nothing and its refused detail names the ref and the fix: map the branch into refs/remotes/origin/ with git config --replace-all remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*', or remove the symbolic ref with git symbolic-ref --delete refs/remotes/origin/main; the next sync makes it a plain ref.

When the remote answers but turns the brain away (an ssh key or a token it rejects, a repository you cannot access or that does not exist), kluris sync stops and its refused detail gives git's message on one line, then the fix: check that this machine can run git fetch origin in this brain without a prompt (git push origin when only the push is turned away). A refused fetch changes nothing. A refused push keeps what the sync brought in or merged locally (pulled counts it, pushed is false), and the next sync that can push sends it. Kluris never asks for credentials, so whatever needs a prompt there fails here too. Unless you set GIT_SSH_COMMAND, GIT_SSH or core.sshCommand, git runs ssh -o BatchMode=yes -o ControlMaster=no: it uses a shared connection your own ssh keeps open (ControlMaster, ControlPath), and never starts one. Anything git says that is not known network trouble is shown this way, never taken for offline: Kluris reads network trouble only in the lines git, ssh and curl print for it, never in a quoted URL or path or in what the remote sent, so a missing repository named timed out.git is still refused.

Settle a conflict

Every command that opens the brain reports a waiting merge: its conflicted paths with both texts, and the id of the merge (--merge). Its stderr line names them, kluris: acme: 1 conflict (knowledge/auth.md) in merge 4ba0581dd58e, and --json gives the id as sync.conflicts[].merge; kluris sync also prints the commands to run, each choice its own line, complete, to run as printed. For a text conflict, write the version you want to the file (delete the file to keep a deletion) and finish the merge with kluris commit --brain acme --merge <id> --paths <every conflicted path of that merge>; while the merge waits, kluris commit refuses any other path, and kluris dream in between is fine. A conflict between a file and a folder (structure), or in a binary file, is settled with kluris resolve. In a merge that has both, settle its structure paths with kluris resolve first, then write the text files: kluris commit --merge keeps every choice kluris resolve recorded for that merge, and its --paths names the conflicted paths still without one; with a choice for every path, kluris commit --brain acme --merge <id> alone finishes it. A path you give replaces the choice recorded for it with its file; a structure path is never given, and kluris commit --merge refuses the merge while one has no choice. --paths splits at commas and trims each name, so a file with a comma in its name, or spaces at either end, is settled with kluris resolve; so is a conflicted path your work tree cannot hold because a folder on its way is a file there (a teammate moved that file under its own name), which kluris commit --merge refuses rather than take its absence for a deletion. kluris resolve alone also settles a merge, path by path; for a text or binary path, write the version to keep outside the brain and pass it with --file:

kluris resolve --brain acme knowledge/auth.md --ours --merge 4ba0581dd58e             # keep this brain's version
kluris resolve --brain acme knowledge/oauth.md --theirs --merge 4ba0581dd58e          # keep the remote's
kluris resolve --brain acme knowledge/jwt.md --file merged.md --merge 4ba0581dd58e    # keep what you merged by hand

--merge says which conflict the choice answers. When the brain has moved on since you saw it (you committed, and the teammate changed the file again), the conflict is found afresh under a new id with no choices recorded; a choice that names the old id is refused, nothing is recorded, and the message gives the new id, the file's sides as they are now and the command to run.

--ours and --theirs keep that side's version, a deletion included; for a structure conflict, that side's whole structure (its file, or its directory and everything in it), and --file is refused there when a side has a directory. --file content is checked first: its frontmatter must read, and a YAML neuron needs its #--- block. Each call first brings in what teammates pushed, then records one choice; with the last one the merge is committed under your git identity, the brain moves to it (uncommitted changes in the way stop it, the choices are kept, and kluris commit --brain acme --merge <id> finishes it once they are out of the way), anything newer is pulled and the result is pushed. If you committed after the conflict was found, that pull finds the conflict afresh under a new id.

With --json, a call prints path, choice, remaining (the paths still to settle; once the merge landed, those of a new conflict), committed, commit and pushed, then the sync object. A refusal prints the error and the sync object; a refused --merge adds merge (the current id) and conflict (the current conflict at that path, as kluris sync reports it). The exit code is 1 for a refusal, and, as for kluris sync, when the sync was refused or blocked or met a new conflict; 0 offline.

How the agent starts a session

The first time the skill is used in a session, the agent runs kluris wake-up --brain acme --json and keeps the result: the brain.md text, the lobes with their neuron counts, the most recently updated neurons, the glossary and any deprecation warnings. It refreshes the snapshot only after the brain changes. To see what the agent sees:

kluris wake-up --brain acme

Before it reads, kluris wake-up brings your teammates' commits in, as every read does (see Keep it in sync with your team). The agent never runs kluris sync: the commands it runs keep the brain in step, and it shares what you approved with kluris commit. A brain inside another project's repository is never fetched.

Several brains

Each brain has its own skill (/kluris-acme, /kluris-personal), so the agent always knows which brain you mean. In the terminal:

  • With one brain registered, commands use it.
  • With several, pass --brain NAME. dream, status, mri, sync and the companion commands also take --brain all.
  • Without --brain, an interactive terminal shows a numbered list of the brains to pick from, plus all where the command takes it.
  • With --json, without a terminal, or with KLURIS_NO_PROMPT=1, there is no picker: the command stops and lists the brains to choose from.
$ KLURIS_NO_PROMPT=1 kluris status
Error: Multiple brains registered. Pass --brain NAME or 'all'. Available: acme, personal

What a brain looks like

acme/
├── brain.md                # the root lobes (generated)
├── glossary.md             # domain terms (you write it)
├── README.md               # how to use the brain
├── kluris.yml              # your local settings (git-ignored)
├── .gitignore              # secrets, kluris.yml, brain-mri.html
├── projects/
│   ├── map.md              # the lobe's index (generated)
│   └── billing/
│       ├── map.md
│       ├── auth-flow.md    # a neuron
│       └── payments-api.yml  # a YAML neuron
├── infrastructure/
│   └── map.md
└── knowledge/
    ├── map.md
    ├── use-clerk.md        # a decision
    └── use-auth0.md        # a deprecated decision

kluris create writes the brain's README.md from Kluris's template; while nobody edits it, the housekeeping commit of kluris dream and kluris mri keeps it the text of the Kluris you run, and a README anyone changed is left as it is.

Term Meaning
Brain A git repository of shared team knowledge
Lobe A folder: one area of knowledge
Neuron One markdown note
Synapse A link between two neurons, kept in both directions
Map A lobe's map.md, generated by kluris dream
Dream Maintenance: regenerate maps, fix what is safe, validate links
MRI The brain's interactive visual map

Neurons

A neuron is markdown with YAML frontmatter. parent, created and updated are required; related holds the synapses, as paths relative to the neuron:

---
parent: ./map.md
related:
  - ../../knowledge/use-clerk.md
tags: [auth, jwt]
created: 2026-09-01
updated: 2026-10-26
---

# Auth flow

Billing trusts the session [JWT](../../glossary.md#jwt) issued by Clerk.

## Token refresh

The web app refreshes the access token five minutes before it expires.

kluris dream keeps the brain consistent. It regenerates every map.md and brain.md, refreshes updated dates from git history, fills in a missing parent, adds the missing half of a one-way synapse, lists unlisted neurons in their lobe's map, then reports what it could not fix: broken synapses, orphans, frontmatter problems. A neuron's dates come from the commits that changed it, never from Kluris's own kluris: dream commits, so tidying a note does not make it look newer.

In a brain with a remote, kluris dream and kluris mri first bring your teammates' commits in, then commit the brain's own housekeeping: what those fixes change in the files already committed, as one kluris: dream commit under your git identity, through your commit hooks, pushed in the background. A file you have not committed never reaches it, not even its title in a map: the fixes it causes (its line in a map, a link back to it) stay in the work tree for your next kluris commit. dream --json lists the committed files in committed (mri --json in each brain's entry), and text says Committed 4 housekeeping files in acme. A hook that stops the commit, or another command holding the brain, leaves the fixes in the work tree and says so in the brain's sync; dream's exit code stays its own. While a merge waits for you, nothing is committed, so the merge id dream reports is the one kluris commit --merge takes; the housekeeping waits in the work tree and the next dream after the merge commits it. A brain without git or without a remote gets no commit: its fixes are left for you to commit.

YAML neurons

OpenAPI files, JSON Schemas and other machine-readable specs can be neurons too. A .yml or .yaml file counts as a neuron only when it starts with a #--- comment block; any other YAML file in the brain is left alone. Only updated is required:

#---
# parent: ./map.md
# tags: [api, openapi]
# title: Payments API
# updated: 2026-10-01
#---
openapi: 3.1.0

Deprecating a decision

When a decision is superseded, mark the old neuron instead of deleting it; the history is worth keeping:

---
status: deprecated
deprecated_at: 2026-09-01
replaced_by: ./use-clerk.md
---

Search still finds it, labelled deprecated and ranked lower, with its replacement. kluris dream warns (without failing) about four problems:

  • active_links_to_deprecated: an active neuron links to a deprecated one.
  • deprecated_without_replacement: a deprecated neuron has no replaced_by.
  • replaced_by_missing: replaced_by points at a file that doesn't exist.
  • replaced_by_not_active: replaced_by points at something that is not an active neuron.

kluris wake-up gives agents the count, kluris dream --json the full list.

Brain types

The type only decides the starting lobes. Every brain works the same afterwards, and you can add or rename lobes at any time.

Type Starting lobes For
product-group (default) projects/, infrastructure/, knowledge/ A group of services that share knowledge
personal projects/, tasks/, notes/ One developer's projects, tasks and notes
product prd/, features/, ux/, analytics/, competitors/, decisions/ Product management
research literature/, experiments/, findings/, datasets/, tools/, questions/ Research projects
blank none Your own structure

Search

kluris search ranks neurons, glossary entries and brain.md by relevance:

  • Ranked, not filtered: titles, tags, paths, headings and body text all count, and a match in a title or heading weighs more than one in the body.
  • Section-aware: each ## section is scored on its own, so a hit points at the heading and line where it is.
  • Forgiving: accents don't matter (pretul finds prețul), word forms don't matter (refreshing tokens finds "refreshes the access token"), and a word of three or more letters also matches longer words it starts (pay finds payments).
  • English and Romanian. A brain is searched in its language: set it with search: language: en or ro in the brain's kluris.yml, or let Kluris detect it.
  • Deprecated neurons stay in the results, ranked lower and labelled.
kluris search "token refresh"
kluris search "raw sql" --lobe knowledge
kluris search "auth" --tag decision --limit 5
2 result(s) for 'token refresh' in acme

  371  Auth flow
        projects/billing/auth-flow.md
        The web app refreshes the access token five minutes before it expires.

   87  JWT
        glossary.md
        JSON Web Token: the signed session token the web app sends to every API

With --json, each result also says where and how it matched: the heading and line of the best section, the matched_terms, the coverage (the share of the query's words it holds), the neuron's related paths, its updated date, and deprecated (with replaced_by for a deprecated neuron):

{
  "file": "projects/billing/auth-flow.md",
  "file_type": "markdown",
  "title": "Auth flow",
  "matched_fields": ["heading", "body"],
  "snippet": "The web app refreshes the access token five minutes before it expires.",
  "score": 186,
  "deprecated": false,
  "heading": "Token refresh",
  "line": 14,
  "matched_terms": ["refreshing", "tokens"],
  "coverage": 1.0,
  "related": ["knowledge/use-clerk.md"],
  "updated": "2026-10-26"
}

The MRI

kluris mri writes the brain as one self-contained HTML page, an interactive architecture map, and prints a file:// link to open it:

MRI complete — /Users/you/brains/acme/brain-mri.html
  Open: file:///Users/you/brains/acme/brain-mri.html
  10 nodes, 27 edges
  • It opens on the brain's lobes and glossary. Click a folder to go into it: lobe, sub-lobe, neurons, as deep as your folders go. The breadcrumb and the back and forward buttons take you back up.
  • Each card shows its kind, a title and its counts; synapses between cards are drawn as edges with a count.
  • Click a neuron to read it. Drag to pan, scroll to zoom.
  • The left panel is the file tree; the right panel searches neurons, paths, lobes, tags and YAML (press /) and lists recent changes.

kluris mri: the root view of a brain, its lobes and glossary as boxes joined by synapse counts, with the file tree on the left and search and recent changes on the right

The page is brain-mri.html in the brain folder (git-ignored); --output writes it elsewhere. It needs no server and makes no network calls: open it from disk or send it to a colleague.

Commands

Command What it does
kluris create [NAME] Create a brain: a wizard, or flags (--description, --path, --type, --remote, --branch, --no-git, --from-config)
kluris register <path> Register a brain folder already on disk (for example a git clone)
kluris list List the registered brains
kluris status Lobes, neuron counts and recent commits (--brain)
kluris search <query> Ranked search (--brain, --lobe, --tag, --limit)
kluris wake-up The compact snapshot agents load at the start of a session (--brain)
kluris dream Regenerate maps, fix what is safe to fix, validate links (--brain, --broken-only with --json)
kluris mri Write the brain's visual map and print its link (--brain, --output)
kluris commit Commit only the files you name and the maps and links they change, pull and push (--brain, --paths, --message, --merge, --no-verify)
kluris sync Fetch, merge and push a brain, or every brain, by hand (--brain, --no-verify)
kluris resolve <path> Settle an open sync conflict path by path, pull and push (--ours, --theirs, --file, --merge, --no-verify)
kluris companion list The companion playbooks, which are installed, and which brains use them (--brain)
kluris companion add <name> Turn a companion on for a brain (--brain)
kluris companion remove <name> Turn a companion off for a brain (--brain)
kluris remove <name> Unregister a brain; its files stay on disk
kluris doctor Check git, PATH, the config and every brain (asking each brain's remote, and saying what its sync did), then refresh companions and agent skills (--no-refresh: no refresh)
kluris self-update Update to the newest release, or --version X (--check: only look)
kluris self-uninstall Uninstall Kluris (--purge, --yes)
kluris help [COMMAND] The command list, or one command's summary

Every command takes --json for scripts and agents, and --help.

Configuration

~/.kluris/config.yml lists the registered brains. KLURIS_CONFIG points Kluris at another file.

brains:
  acme:
    path: /Users/you/brains/acme
    description: Acme platform knowledge

<brain>/kluris.yml holds your own settings for one brain. It is git-ignored, so every teammate can keep different ones:

name: acme
description: Acme platform knowledge
agents:
  commands_for:      # which agents get the kluris-acme skill
  - claude
  - cursor
  - devin
  - copilot
  - codex
  - hermes
  - kilocode
  - junie
  - antigravity
companions: []       # see "Specmint companions"
search:
  language: en       # en or ro; detected when absent

Trim agents.commands_for to the agents you use and run kluris doctor. The shared ~/.agents/skills/ folder always gets every brain's skill.

Environment variables

Variable Effect
KLURIS_CONFIG Use this file instead of ~/.kluris/config.yml
KLURIS_NO_PROMPT=1 Never prompt; commands that need a choice stop and say what to pass
COPILOT_HOME Also install the skills into $COPILOT_HOME/skills
KLURIS_GITHUB_TOKEN A GitHub token for self-update
KLURIS_VERSION The release the install scripts install
KLURIS_NO_MODIFY_PATH=1 The install scripts leave PATH and shell files alone

Specmint companions

Specmint turns a feature request into a lasting spec through research, an interview and a written plan. Kluris ships four Specmint playbooks as companions you can turn on per brain:

Companion What it is
specmint-core Spec-first work: research, interview, spec, implement
specmint-tdd The same, with strict TDD: a failing test before any code
specmint-core-html Spec-first, with .specs/<id>/SPEC.html as the spec
specmint-tdd-html TDD, with SPEC.html carrying the tasks, test state, log and progress
kluris companion add specmint-core --brain acme
kluris companion add specmint-tdd --brain all
kluris companion list
kluris companion remove specmint-core --brain acme

Turning one on copies its folder to ~/.kluris/companions/<name>/ and adds a short section to the brain's skill. From then on, before multi-step work (a new feature, a refactor across files) the agent follows the playbook: it researches with the brain and the code, interviews you, then writes the spec. Small single-file edits skip it. kluris doctor keeps the copies current.

> /kluris-acme let's spec out adding OAuth sign-in with GitHub

Building from source

You need Rust (the toolchain is pinned in rust-toolchain.toml) and git.

git clone https://github.com/ngvoicu/kluris.git
cd kluris
cargo build --release          # target/release/kluris
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
cargo fmt --check

A build from source is not managed by self-update or self-uninstall; update it by pulling and building again.

License

MIT


AI-native toolkit

This project is part of a larger AI-native toolkit — and of a way of working your whole team can adopt: talks ("Becoming an AI Native Company"), hands-on team training that teaches employees to use AI, and AI adoption consulting for engineering teams.

Toolkit: Specmint (durable AI coding specs) · Kluris (team knowledge brains) · ConsensFlow (cross-agent second opinions)

About

Kluris gives AI coding agents shared, human-curated team knowledge: git-backed brains of markdown that agents search and update through per-brain skills and a native CLI.

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages