Skip to main content

Brainiac

A local second brain for any LLM. Your notes stay plain Markdown and YAML on your own disk. The brain command-line engine gives Claude Code, Codex, Gemini CLI and Claude Desktop fast, sourced search over them. No vendor lock-in, no cloud index, no server.

Why

Most retrieval tools ask you to trust one app and its plugin pipeline forever. Brainiac keeps the substrate as files (vault/brain/ and vault/raw/), keeps the search index as a cache you can rebuild at any time, and passes every read through a deny-by-default classification filter before a model sees it. You decide what an LLM may see, note by note.

Install

Brainiac is one engine install plus one setup command. The setup command, brain init --full --apply, creates your vault, seeds three sample notes, builds the search index, provisions the audit signing key and registers the maintenance task. Pick the path that matches how you work.

1. Let your AI assistant do it. Paste this into any assistant that can run commands on your machine (Claude Code, Codex, Gemini CLI):

Install Brainiac for me. Fetch and follow this exactly, asking me only what it says to:
https://raw.githubusercontent.com/Autopsias/brainiac/main/docs/install/LLM-INSTALL.md

2. Claude Code plugin. One command installs the plugin, and the plugin installs the engine:

/plugin install brainiac-manager --marketplace Autopsias/brainiac
/brainiac-install ~/brain

The one-command form needs Claude Code 2.1.275 or later. On an older version, run /plugin marketplace add Autopsias/brainiac, then /plugin install brainiac-manager@brainiac. In Claude Desktop, add the marketplace under Customize › Plugins.

3. By hand, on any OS. With uv, pipx or pip already present:

uv tool install 'brainiac-cli[mcp]'        # or: pipx install 'brainiac-cli[mcp]'
BRAIN_VAULT=~/brain/vault brain init --full --apply

Without Python, the bootstrap script fetches uv and installs through it. Run it, then the brain init line above:

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Autopsias/brainiac/main/install.sh -o /tmp/brainiac-install.sh && bash /tmp/brainiac-install.sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/Autopsias/brainiac/main/install.ps1 -OutFile install.ps1; .\install.ps1
$env:BRAIN_VAULT = "$HOME\brain\vault"; brain init --full --apply

With Node.js 18 or later, npx brainiac-install --vault ~/brain does the engine install and the vault setup in one command. It needs uv, pipx or Python on the machine already.

Every platform, step by step: docs/install/README.md.

brain search "welcome" --json

Three things to know on day one:

  • Your notes live in the vault (~/brain/vault above). They are the source of truth. The index is a cache in your app-data folder. brain rebuild recreates it at any time.
  • Semantic search downloads its model (bge-m3-int8, about 563 MB) once, on first use. brain warmup fetches it up front.
  • An existing folder of notes is not indexed by brain init. Run brain rebuild once, or the first search returns nothing.

brain --help lists every command.

On a Codex-only macOS host, Sunday synthesis can use the opt-in Codex adapter. It handles new source-derived notes; the stock Claude runner remains the default.

Update

brain update            # --dry-run shows the plan; your notes are never touched

It detects how you installed the engine (uv, pipx, pip or an editable checkout), upgrades it, refreshes the Claude Code plugins, restages every registered Cowork workspace and verifies with brain doctor. In Claude Code, /brainiac-update runs the same thing.

You rarely need to run it. The hourly maintenance task applies a newer version on its own, and keeps it only when brain doctor is green and a real query embed succeeds. brain doctor on its own is a read-only health check with the exact fix for anything stale.

A second vault

The install is per machine. Vaults are per project. Point the same brain at another folder and it gets its own index and audit chain:

export BRAIN_VAULT=~/vaults/my-new-project
brain init --full --apply
brain rebuild            # only when the folder already holds notes

Details, including the per-vault overlay and the scheduled task: docs/install/second-vault.md.

How the AI assistants are wired

Every assistant calls the brain CLI through its normal shell. No MCP server is required. brain connect --client <name> wires one client (claude-code, claude-desktop, codex or gemini), shows the diff and asks before it touches a config file. AGENTS.md is the conventions file every assistant reads; CLAUDE.md imports its short core.

The one exception is the Claude Desktop Chat tab, which cannot run a command. For that surface, install the brainiac.mcpb extension from the latest release, or run brain connect --client claude-desktop. Pick one. The full matrix is in docs/harness-wiring.md.

Security, in one paragraph

All data stays on the local disk: notes are Markdown, the index is a local SQLite file, and the project holds no model API keys. Every read command filters notes by their classification tier before it prints, and an unlabelled note counts as the most restrictive tier. Every committed write is Ed25519-signed and hash-chained, with the key in the OS secret store. A sandboxed surface such as Cowork gets a read-only snapshot and a draft inbox, and can never sign or index. Runtime dependencies are pinned in requirements.lock; CI runs pip-audit weekly and emits an SBOM.

Where to go next

Repository layout

AGENTS.md            conventions and the note schema
src/brain/           the brain CLI and engine (index, search, audit)
plugins/             the three Claude Code plugins (kernel, extras, manager)
docs/                install guides, specs, security notes, decision records
tools/validate.py    conventions validator for a vault
vault/               the small sample vault used above

License

Apache-2.0. Built clean-room; see docs/clean-room-log.md.

Metadata

Release files for brainiac-cli 0.20.47

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brainiac-cli 0.20.47
File Size Uploaded Provenance Actions
brainiac_cli-0.20.47.tar.gz 1.2 MB With provenance Details for brainiac_cli-0.20.47.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brainiac-cli 0.20.47
File Interpreter ABI Platform Actions
brainiac_cli-0.20.47-py3-none-any.whl Python 3 none any Details for brainiac_cli-0.20.47-py3-none-any.whl

Total release size: 2.7 MB

Release files / brainiac_cli-0.20.47.tar.gz

Download URL brainiac_cli-0.20.47.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
7ab3d73949e42a794e6f4c8e25c1d36d0448c4894e0ffe8b0006c6fa55c109ab
BLAKE2b-256 checksum
How to use checksums
166208a18fd050162b997096790377c022ee7f5bc83a440956a41dfc43662697
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / brainiac_cli-0.20.47-py3-none-any.whl

Download URL brainiac_cli-0.20.47-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
36705ad86beef5159f628459d68c35b5b55cc966450245b938f4348c16a6e93a
BLAKE2b-256 checksum
How to use checksums
73e7950cbeaeebc2fa4d4cc7655593e0b2f120cab0586ef31a4a92de078bc901
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for brainiac-cli 0.20.47

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for brainiac_cli-0.20.47.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.20.47 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page