Skip to main content

Feature-graph code intelligence for AI agents — stop grepping, start graphing

Project description

jcode

Code intelligence for AI agents — without burning your token budget.


If you've ever watched Claude or GPT spend 40 tool calls grepping through your codebase just to answer "where does authentication happen?", you'll get why this exists.

jcode builds a feature graph of your repo — functions, classes, imports, call relationships — stores it locally as a SQLite database, and exposes it as an MCP server. Instead of reading twenty files, your AI agent calls one tool and gets exactly the context it needs.

It's fast, it's local, and it works with Python, TypeScript, JavaScript, Go, and Rust repos right out of the box.


What it actually does

When you run jcode index, it walks your repo with Tree-sitter, extracts every function, class, method, and import, and builds a directed graph of how they relate to each other. That graph lives in a .jcode/ folder at your repo root.

From there, your AI agent has five tools:

Tool What it does
jcode_feature_map High-level folder/feature overview — always call this first
jcode_search Semantic + keyword search to find entry points
jcode_context Forward DFS from a node — "show me everything this function touches"
jcode_blast_radius Reverse BFS — "if I change this, what breaks?"
jcode_index Trigger a (re-)index from inside a conversation

The blast radius tool is the one people find most surprising. Change a function signature, a model field, or a shared utility and instantly see every caller, handler, and dependent that needs to know about it — across the entire codebase, regardless of language.


Language support

jcode uses Tree-sitter under the hood, so it understands the actual structure of your code rather than just searching text.

Language Status
Python ✅ Full support — functions, classes, methods, imports, call edges
TypeScript ✅ Supported
JavaScript ✅ Supported
Go ✅ Supported
Rust ✅ Supported

Mixed-language repos work fine — index once, query across everything.

Install the parsers you need:

pip install jcode[typescript]
pip install jcode[javascript]
pip install jcode[go]
pip install jcode[rust]
pip install jcode[all-langs]   # everything at once

Quick start

Step 1 — Install

pip install jcode

Or with uv:

uv add jcode

Verify it worked:

jcode --version
jcode --help

Step 2 — Index your project

jcode index /path/to/your/project

This creates a .jcode/ folder inside your project with the graph database. Works on any supported language — point it at a Python backend, a TypeScript frontend, a Go service, whatever.

Step 3 — Write CLAUDE.md

jcode init /path/to/your/project

This writes a CLAUDE.md at your project root so Claude Code knows to use jcode instead of grepping.

Step 4 — Connect to Claude Code

jcode setup-mcp /path/to/your/project

This prints the exact command you need to run, something like:

claude mcp add jcode -e JCODE_DIR=/path/to/your/project/.jcode -- jcode serve

Copy that and run it. One-time setup per project.

Step 5 — Open Claude Code in your project

cd /path/to/your/project
claude

Claude will read CLAUDE.md on startup and use jcode instead of reading files one by one.


Incremental indexing

Re-indexing only processes files that changed since the last run — content hashed, not timestamp compared. Fast enough to run as a file-watcher or a pre-commit hook.

jcode index /path/to/repo                    # incremental (default)
jcode index /path/to/repo --full-reindex     # wipe and rebuild

Framework plugins

For some frameworks, generic call analysis isn't enough — you need to understand what the framework is doing with your code. jcode has a plugin system for exactly this. Auto-detection is based on your requirements.txt or pyproject.toml, no config needed.

FastAPI — detects Depends(fn) and Security(fn) in route handlers and emits typed depends edges. Blast radius from get_current_user correctly reaches every protected route.

Django — three patterns covered:

  • path('login/', views.login_view)route edge to the view function
  • ForeignKey(User, ...)references edge between models
  • @receiver(post_save, sender=User)signal edge from handler to model

More plugins are coming. Writing one is about 50 lines — implement handled_names and handle_call, register it in _REGISTRY.


Semantic search

Install sentence-transformers and search upgrades from keyword matching to semantic vector search. Useful when you know what something does but not what it's called.

pip install jcode[embed]

Embeddings are computed once on first index and stored in the graph. Incremental runs only embed new or changed nodes.


How the graph is stored

Everything goes in .jcode/ at your repo root:

  • graph.db — SQLite database with nodes, edges, FTS5 full-text index, vector embeddings, and a file-hash manifest for incremental indexing
  • objects/ — content-addressable store for raw node data (git-style blobs, keyed by SHA-256)

Add .jcode/ to your .gitignore — it's generated data.


CLI reference

jcode index <repo>          Index or re-index a repository
jcode init  <repo>          Write CLAUDE.md to the repo root
jcode status <repo>         Show index stats
jcode setup-mcp <repo>      Print the claude mcp add command
jcode serve                 Start the MCP server (stdio transport)

Project structure

src/jcode/
├── domain/         core models and port interfaces (zero external deps)
├── storage/        SQLite graph DB + content-addressable object store
├── indexer/        Tree-sitter parsers, incremental builder, plugins, embedder
├── graph/          DFS context traversal + BFS blast radius
└── mcp/            FastMCP server exposing the five tools

Known limitations

  • Cross-file call resolution is name-based — if two modules have a function with the same name, they're treated as the same target. Rare in practice but worth knowing.
  • The semantic search quality depends on your sentence-transformer model. The default (all-MiniLM-L6-v2) is fast and good enough for most codebases.
  • .jcode/ grows with your repo. --full-reindex cleans it up if it feels stale.

License

Personal and non-commercial use only. See LICENSE.


Built because reading source code line by line is a bad use of an AI agent's attention.


Author

Joel Thomas

🌐 codewithjoe.in · LinkedIn · Instagram · 𝕏

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jcode-0.1.8.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jcode-0.1.8-py3-none-any.whl (41.0 kB view details)

Uploaded Python 3

File details

Details for the file jcode-0.1.8.tar.gz.

File metadata

  • Download URL: jcode-0.1.8.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jcode-0.1.8.tar.gz
Algorithm Hash digest
SHA256 8cceabdc166e1a967386a323734b3d4e95f2893e839b0bebe70cd77611bdb918
MD5 a144832c4bd86b9fb0303df814caf9a9
BLAKE2b-256 bb9e3b92cda65fb4891d73b5d6cb6dda3ba5a8af689f592397230fc94091478a

See more details on using hashes here.

File details

Details for the file jcode-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: jcode-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 41.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jcode-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3b177d4d89c617f5d7ee077238a942ca3aff9d7008e284b6101a69cc32d75b19
MD5 146d175b8ea91e0d05407328bfa959e6
BLAKE2b-256 af792208d42cef9413a330dd00173d2ffc1d16754d71dc039bd9e3168d9e0f98

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page