Skip to content

obielin/code-intel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

CodeIntel — Codebase Intelligence for AI Editors

Give your AI coding assistant a nervous system. CodeIntel indexes your codebase into an interactive knowledge graph and feeds deep architectural context to Cursor, Claude Code, and any AI editor.

Two tools, one purpose

Web UI (web/index.html) — Drop a GitHub URL or ZIP file. Get an interactive force-directed knowledge graph of every function, class, module, and import. Chat with the codebase via a built-in RAG agent. Runs entirely in your browser — nothing leaves your machine.

CLI (codeintel) — Index repos locally, query symbols and dependencies, and generate context files that AI editors automatically read.


Web UI

Open web/index.html in any browser — no server required. Or serve it locally:

codeintel serve              # → http://localhost:4242

Usage

  1. Paste a GitHub URL in the header and click ANALYSE — or drop a ZIP file
  2. Explore the interactive graph: drag nodes, filter by type, click to inspect
  3. Enter your Anthropic API key and chat with the codebase
  4. Click any node to pre-fill the chat with a question about that symbol

What gets visualised

  • Functions (cyan) — all named functions, arrow functions, methods
  • Classes / Interfaces (purple) — class and interface declarations
  • Modules (green) — one node per file
  • External imports (amber) — npm packages and external dependencies
  • Edges — import relationships, containment, inheritance

CLI

Install

cd cli
npm install
npm run build
npm link          # makes `codeintel` available globally

Commands

Index a repo:

codeintel index                         # current directory
codeintel index --root /path/to/repo

Generate AI editor context:

codeintel context                       # writes CLAUDE.md (for Claude Code)
codeintel context --format cursor       # writes .cursorrules (for Cursor)
codeintel context --format markdown     # writes CODEBASE.md
codeintel context --format json         # writes .codeintel-context.json

Query the index:

codeintel query --symbol processPayment          # find a symbol
codeintel query --file auth                      # all symbols in auth files
codeintel query --hubs                           # most-connected nodes
codeintel query --imports UserService            # who imports this?
codeintel query --deps PaymentController         # what does this depend on?

Stats:

codeintel stats

Watch mode (re-indexes on every save, keeps context files fresh):

codeintel watch                         # re-generates CLAUDE.md on changes
codeintel watch --format cursor         # re-generates .cursorrules

Integration with AI editors

Claude Code

codeintel index && codeintel context --format claude

Creates CLAUDE.md in your repo root. Claude Code reads this automatically on every session, giving it full architectural awareness — entry points, key symbols, dependency graph, most-connected modules.

Cursor

codeintel index && codeintel context --format cursor

Creates .cursorrules. Cursor reads this as part of its context on every prompt. AI edits will now reference actual function names and module paths from your codebase rather than guessing.

Auto-refresh with watch mode

codeintel watch --format claude         # keeps CLAUDE.md fresh as you code

Run this in a separate terminal while developing. Every time you save a file, the index updates and the context file regenerates within ~1 second.


What the index contains

{
  "version": "1.0.0",
  "indexedAt": "2026-04-09T...",
  "gitBranch": "main",
  "gitCommit": "a3f8c2d",
  "stats": { "files": 47, "nodes": 312, "links": 891 },
  "nodes": [
    {
      "id": "src/api/users.ts::createUser",
      "name": "createUser",
      "type": "function",
      "file": "src/api/users.ts",
      "lang": "TypeScript",
      "line": 24,
      "signature": "export async function createUser(data: CreateUserDTO): Promise<User>",
      "imports": [],
      "exports": ["createUser"]
    }
  ],
  "links": [
    { "source": "src/api/users.ts", "target": "src/db/client.ts", "type": "import" }
  ]
}

Saved as .codeintel.json in your repo root. Add to .gitignore or commit it — your choice.


Supported languages

Language Functions Classes Imports Exports
TypeScript
JavaScript
Python
Go
Rust

Privacy

The web UI runs entirely client-side. No code is ever uploaded to a server. GitHub repos are fetched directly from raw.githubusercontent.com in your browser.

The CLI runs entirely locally. The only network call is the RAG chat in the web UI, which goes directly from your browser to the Anthropic API using your own API key.


Linda Oraegbunam | LinkedIn | GitHub

About

Codebase intelligence for AI editors. Drop a GitHub URL or ZIP to get an interactive knowledge graph of every function, class, and dependency. Built-in RAG agent lets you chat with the repo. CLI indexes locally and generates CLAUDE.md or .cursorrules so Cursor and Claude Code understand your full architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors