MCPcopy Index your code
hub / github.com/bitloops/bitloops

github.com/bitloops/bitloops @v0.0.31

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.31 ↗ · + Follow
22,078 symbols 88,303 edges 1,657 files 260 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Bitloops logo

Give AI coding agents the context they need to ship production-quality software.

Your AI agent forgets your codebase between sessions. You re-explain the architecture, re-paste rules, re-list constraints. Bitloops captures all of it once — automatically, from your agent conversations — and feeds the right pieces back to every future prompt. Runs locally. Replaces your CLAUDE.md, .cursor/rules, and AGENTS.md.

Fork Star Commits Version Downloads License Local First Agent Agnostic

<a href="https://bitloops.com">Website</a>
·
<a href="https://bitloops.com/docs/">Docs</a>
·
<a href="https://bitloops.com/docs/getting-started/quickstart">Quickstart</a>
·
<a href="https://bitloops.com/docs/concepts/devql">DevQL</a>
·
<a href="https://github.com/bitloops/bitloops/discussions">Discussions</a>

Quick Start

Fast scripted setup installs Bitloops and applies the default daemon config:

macOS, Linux, WSL:

curl -fsSL https://bitloops.com/install.sh | bash -s -- --default-config

Windows PowerShell:

& ([scriptblock]::Create((irm https://bitloops.com/install.ps1))) -DefaultConfig

Then, from inside the repo you want Bitloops to capture:

bitloops init

Prefer to configure manually? Install without the default-config flag, then run:

bitloops configure --web
bitloops init

Work normally with Codex, Claude Code, Cursor, Gemini, Opencode or Copilot. Commit as usual. Bitloops captures the relevant context around every change and keeps your codebase model fresh in the background.

Open the local dashboard:

bitloops dashboard

Other install paths and full setup → Docs

What You Get

  • 🧠 Persistent codebase substrate — files, symbols, dependencies, tests, and history modeled as a queryable graph, not text.
  • 🪶 Automatic context capture — decisions, constraints, and reasoning are pulled from your agent conversations as you work. No markdown file to maintain.
  • 🎯 Relevance-ranked retrieval — every prompt gets the artifacts that actually matter. Not all files. Not random files. The right ones.
  • 🔁 Cross-agent memory — what you decided in Claude Code yesterday guides Cursor today and Copilot tomorrow. Same substrate underneath all of them.
  • 🧾 Provenance from commit to prompt — every commit traces back to the prompt, model, and rejected alternatives that produced it. Two weeks later you can still answer "why."
  • 🗺️ Code City spatial view — a live map of your codebase. Files as buildings, height as size, arcs as dependencies. Filter by what AI touched.
  • 🔍 DevQL — a typed query language for your codebase model. Ask precise questions instead of grepping.
  • 🔒 Local-first — your code isn't stored on our infrastructure. The daemon runs on your machine.
  • 🧩 Drops in alongside your agent — no agent switch, no IDE switch. Bitloops is the substrate underneath.

Why Bitloops Exists

You've already built the workaround. A CLAUDE.md that grew to 2,000 lines. A .cursor/rules folder you copy-paste between projects. An AGENTS.md you swear you'll keep updated. A shell script that concatenates the "right" files into every prompt.

The pattern is always the same: a second brain for your codebase, built in markdown, manually maintained, going stale every week.

AI coding agents are bottlenecked by state, not generation. A codebase isn't fundamentally text — it's a system of files, symbols, APIs, tests, decisions, and history. Most agents force that structured system through an unstructured medium (prompt text, RAG chunks, embeddings) and have to infer the system over and over.

The loop today:

retrieve → infer → act → forget

Bitloops changes the loop to:

capture → persist → rank → serve → refresh

Agents can't reliably change systems they can't model. Bitloops builds and maintains the model.


The Old Way vs The Bitloops Way

You're doing this today With Bitloops
Re-explaining your architecture every session Substrate captured once. Re-served on every prompt.
Hand-writing CLAUDE.md / .cursor/rules / AGENTS.md Decisions and constraints captured automatically from your agent conversations.
Agent re-implements a util that already exists three folders over Static analysis + clone detection feeds existing code into pre-edit context.
"Why is this here?" → the prompt is gone Commit → prompt → rejected alternatives, all traceable.
Five rules files for five agents One substrate. Claude Code, Cursor, Copilot — same model underneath.
RAG embeddings rebuilt every session Long-lived daemon. Index is always-on, always-current.
Repository uploaded and stored on a vendor's infra Runs locally. Code processed, not stored.

How It Works

┌──────────────────────────────────────────────────────────────────────┐
│  Your agent (Claude Code / Cursor / Copilot) makes a request         │
└──────────────────────────────────────────────────────────────────────┘
                                  ↓
┌──────────────────────────────────────────────────────────────────────┐
│  Bitloops hooks capture the prompt, transcript, and tool events      │
└──────────────────────────────────────────────────────────────────────┘
                                  ↓
┌──────────────────────────────────────────────────────────────────────┐
│  Local daemon updates the codebase graph (files, symbols, deps)      │
└──────────────────────────────────────────────────────────────────────┘
                                  ↓
┌──────────────────────────────────────────────────────────────────────┐
│  DevQL ranks and serves the right artifacts back into the agent      │
└──────────────────────────────────────────────────────────────────────┘
                                  ↓
┌──────────────────────────────────────────────────────────────────────┐
│  Commit links to the prompt, model, and decision that produced it    │
└──────────────────────────────────────────────────────────────────────┘

Architecture deep-dive → Docs › Architecture


Who Bitloops Is For

  • Devs shipping multiple AI-assisted PRs per week with Claude Code, Cursor, Copilot, or Codex — who've stopped being amazed and started being annoyed.
  • Anyone maintaining a CLAUDE.md, .cursor/rules, or AGENTS.md and quietly knowing it's already out of date.
  • Engineering teams who want a reviewable trail for AI-assisted work — prompts, tool events, decisions, commits — not just diffs.
  • Platform and DevEx teams building internal AI workflows who need a typed local substrate for agent context.

Supported Agents & Languages

Agents:

  • [x] Claude Code
  • [x] Codex
  • [x] Cursor
  • [x] Gemini
  • [x] Copilot
  • [x] OpenCode

Languages: - [x] Rust - [x] TypeScript / JavaScript - [x] Python - [x] Go - [x] Java - [x] C# - [x] PHP - [x] C++


Local-First Trust Model

Your code isn't stored on our infrastructure. The daemon runs on your machine; configuration, repository model, event data, and blobs stay local by default.

LLM reasoning over commits, code, and conversations is part of the system — that processing requires sending content to a model provider, and an account is required to authenticate it. The line: your code isn't stored, it is processed.


Demo video

Bitloops Getting Started


Documentation

  • 📖 Quickstart — set up and first capture
  • 🔍 DevQL — query the codebase model
  • 🏗️ Docs home — guides, concepts, troubleshooting
  • 🛠️ Contributing — rules, dev setup, extension guides

Community

  • 💬 GitHub Discussions — questions, ideas, feedback
  • 🐛 Issues — bug reports, feature requests
  • 🔒 Security — responsible disclosure
  • 🤝 Code of Conduct If Bitloops is solving a problem you've felt — star the repo. It tells us we're building the right thing, and it tells other devs the project is real.

License

Apache-2.0. See LICENSE.

Extension points exported contracts — how you extend this code

Strategy (Interface)
Strategy interface: creates checkpoints from session turn/task data. [6 implementers]
bitloops/src/host/checkpoints/strategy.rs
CommandExecutor (Interface)
(no doc) [19 implementers]
vscode-extension/src/bitloopsCli.ts
RelationalGateway (Interface)
Host relational port for capability packs. [14 implementers]
bitloops/src/host/capability_host/gateways/relational.rs
BitloopsQueryClient (Interface)
(no doc) [5 implementers]
vscode-extension/src/bitloopsCli.ts
TranscriptEntryDeriver (Interface)
Converts an agent-specific transcript into canonical `TranscriptEntry` rows. Each agent implements this to absorb its o [6 …
bitloops/src/adapters/agents.rs
OverviewCounts (Interface)
(no doc)
vscode-extension/src/overviewFormatter.ts
TranscriptToolEventDeriver (Interface)
Provides transcript-derived tool observations for interaction capture. [5 implementers]
bitloops/src/adapters/agents.rs
ActiveStageState (Interface)
(no doc)
vscode-extension/src/sidebarController.ts

Core symbols most depended-on inside this repo

to_string
called by 10986
bitloops/src/capability_packs/semantic_clones/ingesters/refresh.rs
path
called by 2766
bitloops/src/host/checkpoints/strategy/manual_commit/git_utilities.rs
is_empty
called by 2496
bitloops/src/host/devql/exclusion_reconcile.rs
push
called by 2364
bitloops/src/host/devql/commands_sync/sqlite_writer.rs
get
called by 2064
bitloops/src/adapters/agents/registry.rs
path
called by 1557
bitloops/src/api/db/sqlite.rs
get
called by 1402
bitloops/src/host/language_adapter/registry.rs
write
called by 1356
bitloops/src/api/runtime_schema/config_management/targets.rs

Shape

Function 15,256
Method 3,760
Class 2,497
Enum 435
Interface 130

Languages

Rust99%
TypeScript1%

Modules by API surface

bitloops/tests/qat_support/helpers/core.rs294 symbols
bitloops/src/host/devql/tests/cucumber_steps/core.rs168 symbols
bitloops/tests/qat_support/steps/then.rs148 symbols
xtask/src/main.rs146 symbols
bitloops/tests/qat_support/steps/given.rs134 symbols
bitloops/src/host/checkpoints/lifecycle/lifecycle_tests.rs125 symbols
bitloops/src/daemon/enrichment_tests.rs119 symbols
bitloops/tests/qat_support/helpers/tests.rs111 symbols
bitloops/tests/qat_support/helpers/architecture_roles.rs103 symbols
bitloops/src/host/hooks/runtime/agent_runtime_tests.rs101 symbols
bitloops/src/cli/explain_test.rs92 symbols
bitloops/src/cli/enable_tests.rs90 symbols

Datastores touched

bitloopsDatabase · 1 repos
dbDatabase · 1 repos
devqlDatabase · 1 repos

For agents

$ claude mcp add bitloops \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact