█

AI/TLDR

Buy me a coffee
Buy me a coffee

AOCI-CODE

A Git-versioned, one-line-per-file map of your codebase that coding agents read before they act

Code Indexing & SearchOpen source
Latest
v0.1.0-rc20
Updated
9 Oct 2026
Language
Go
License
FSL-1.1-MIT (Fair Source, source-available)
$git clone https://github.com/aoci-spec/aoci-code.git

What's new

v0.1.0-rc209 Oct 2026

Release candidate adding an E scale audit to verify and check, reporting git submodules as boundaries, and root-anchored exclude_root_dirs for new repositories, built with Go 1.26.9.

IN SHORT

What is AOCI-CODE?

AOCI-CODE keeps a persistent map of a whole codebase that a coding agent reads once at the start of a session instead of re-searching the repository for every task. It sits in the Code Indexing & Search category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Go and licensed FSL-1.1-MIT (Fair Source, source-available).

Updated Markdown version ↗

Overview

AOCI-CODE keeps a persistent map of a whole codebase that a coding agent reads once at the start of a session instead of re-searching the repository for every task. The map is plain text stored in the repository next to the code and versioned by Git, so when a project changes hands, switches agents or opens a new conversation, one read of the index picks up where the last one left off. It works with MCP hosts such as Codex, Claude Code, Cursor and OpenCode.

The index is written by the agent's own model, one line per file, in a fixed format called FRAS: F is what the file is responsible for, R is what must be read along with it, A is what callers depend on, and S records constraints that cannot be inferred from the code but must not be broken. A compact tag places each file by layer, domain, importance and size. AOCI-CODE itself does not invent meaning from filenames or ASTs; its job is governance — establishing the managed scope and Baseline, validating candidate entries, committing them with locks and atomic writes, and detecting drift between the index and the source.

The project is a single CGO-free Go binary that runs locally: the `aoci` CLI plus a stdio MCP server exposing exactly nine tools. After the first index is built, the MCP server detects code changes and has the agent update the affected entries as it finishes each task. It can also index PostgreSQL, MySQL and (with constraints) openGauss schemas at table level, reading only catalog metadata, with credentials referenced by environment-variable name rather than stored.

What it does

  • Model-authored FRAS entries — Function, Relations, API and non-obvious constraints — one line per managed file
  • Index stored as plain-text Cognition Volumes (aoci.txt, aoci.meta.txt, aoci.code.txt, optional aoci.database.txt) that Git can diff, review and roll back
  • stdio MCP server with nine tools, including aoci_overview, aoci_search, aoci_maintain and aoci_update_entry
  • Drift detection and governance gates via `aoci verify` and `aoci check`, reporting Missing, Orphan, Stale and Unbaselined objects
  • Optional Database Cognition for PostgreSQL, MySQL and openGauss 6.0.5, reading only schema metadata and never business rows
  • Local read-only panel (`aoci ui`) showing the index verbatim, token budget, compression ratio, drift and running MCP servers
  • Host setup via `aoci init --agent` for Codex, Claude Code, OpenCode and Qoder, plus a reference snippet for Cursor

Getting started

Get a binary from a signed GitHub Release or build it from source, initialize the target repository, then ask your agent to build the index through the MCP tools.

Download a release or build from source

Release packages are on the GitHub Releases page; verify them with the project's installation guide. To build from source you need the Go toolchain declared in go.mod and make.

bashbash
git clone https://github.com/aoci-spec/aoci-code.git
cd aoci-code
mkdir -p build
make build
./build/aoci --version

Initialize the target repository

From the root of the project you want indexed, point at the binary by a stable absolute path. `init` writes the locale configuration, the managed AGENTS.md rules block, Git boundaries, an empty index skeleton and the host's MCP configuration; `scan` establishes the managed Baseline. Do not add the index files init writes to .gitignore — scan takes its inventory from Git.

bashbash
AOCI=/absolute/path/to/aoci-code/build/aoci
"$AOCI" --repo . init --locale en-US --agent codex
"$AOCI" --repo . scan

Restart the agent and ask it to build the index

Restart the host so it loads the newly written MCP server, then send this instruction. The agent reads every managed file and writes one entry per file; the README estimates about an hour per 200,000 lines, resumable if interrupted.

texttext
First confirm the AOCI MCP server is connected, then build the AOCI index for this project. When it is complete, give me the AOCI panel link.

Verify alignment and open the panel

The index and the managed source should converge to `aligned`. The read-only panel binds to loopback only.

bashbash
"$AOCI" --repo . verify
"$AOCI" --repo . check
"$AOCI" ui --open

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Hand an existing codebase of hundreds of thousands of lines to a coding agent and have it start each task already knowing what every file is for
  • Keep system knowledge across agents, sessions and team members by versioning the index in Git alongside the code
  • Give an agent table-level knowledge of a PostgreSQL or MySQL schema together with the code that uses it
  • Pair with a code graph tool such as CodeGraph: the index for the whole-system picture, the graph for exact source and call paths

How AOCI-CODE compares

AOCI-CODE alongside other open-source code indexing & search tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
CodeGraph★ 79.3kBuilds a local SQLite knowledge graph of a codebase with a Rust tree-sitter kernel, keeps it in sync through a file watcher, and serves symbols, call paths and blast radius to coding agents over MCP.
codebase-memory-mcp★ 49.4kA native MCP server that indexes a repository into a persistent tree-sitter knowledge graph of functions, call chains and routes, queried by agents through 15 tools.
GitNexus★ 49kIndexes a codebase into a knowledge graph of dependencies, call chains and execution flows, then exposes it to Claude Code, Cursor and Codex through MCP tools.
code-review-graph★ 33kA local-first code intelligence graph built with Tree-sitter that serves precise, incrementally-updated structural context to AI coding tools over MCP, so they read only the code a task needs.
XERJ★ 22.9kSingle-binary, Elasticsearch-compatible search engine whose autoindex command turns any folder of code, docs, logs or PDFs into typed indices that AI coding agents query via CLI or MCP instead of grepping.
Claude Context★ 12.7kAn MCP server that indexes your codebase into a vector database so AI coding agents can find relevant code by meaning instead of loading whole folders.
Graft★ 11.6kBuilds a persistent knowledge graph of your codebase as linked markdown files, then feeds the matching nodes to coding agents so they stop re-exploring the repo on every task.
AOCI-CODE★ 3.1kA Git-versioned, one-line-per-file map of your codebase that coding agents read before they act