Berkelium CLI
Berkelium CLI is a Code Graph Management tool and Model Context Protocol (MCP) server. It uses tree-sitter to parse your codebase into a structured graph stored in SQLite, enabling high-fidelity impact analysis and surgical context retrieval for AI assistants.
Quick Start
Installation
# Install
pip install berkelium
# Run the TUI
berkelium-cli
Development Setup
git clone https://github.com/BerkeliumLabs/berkelium-cli
cd berkelium-cli
uv sync
TUI Features
The Berkelium TUI (berkelium-cli) provides a terminal interface for:
- Build/Update Graph: Index supported languages (Python, JS/TS, Go, Java, Rust, C/C++).
- Incremental Sync: Uses git-diff to update the graph in milliseconds.
- Exploration: Visualize symbols and relationships directly in your terminal.
MCP Server (for AI Assistants)
Connect Berkelium to Claude, Cursor, or any MCP-compatible client to give your AI "graph-vision" over your code.
Configuration (Claude)
Add this to your settings.json:
{
"mcpServers": {
"berkelium": {
"command": "berkelium-mcp",
}
}
}
Available Tools
query_search_codebase: Executes read-only Cypher queries directly against the code graph for advanced structural search.
Available Prompts
review_my_pr: A guided workflow that syncs the graph, identifies changes via git, and suggests targeted tests based on impact analysis.
Usage Examples (AI-Assisted Development)
Berkelium is most powerful when used through an AI assistant (like Claude or Cursor). Here are some real-world scenarios where it excels:
1. Architectural Exploration
Prompt: "I want to add a new database provider. Show me all classes that inherit from BaseProvider to see the existing pattern."
- AI Action: Uses
query_search_codebasewith a Cypher query like:MATCH (child)-[:INHERITS]->(parent) WHERE parent.name = 'BaseProvider' RETURN child.name AS name, child.file_rel_path AS file
2. Tracing Complex Call Chains
Prompt: "Trace the execution flow starting from IncrementalSync.sync(). What internal methods does it reach?"
- AI Action: Uses
query_search_codebaseto traverse the[:CALLS]edges.
3. Identifying Dead Code
Prompt: "Are there any functions in the utils/ directory that are never called by any other part of the project?"
- AI Action: Uses
query_search_codebaseto find nodes with zero incoming[:CALLS]edges.
Architecture
- Extractor (
extractor.py): Language-agnostic extraction usingtree-sitter. - Store (
store.py): Persistence layer usingGraphQLiteon SQLite. - Sync (
sync.py): Git-based incremental synchronization logic. - Retriever (
retriever.py): Graph traversal algorithms for impact and context.
License
MIT License - see LICENSE.
Metadata
Release files for berkelium 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| berkelium-0.1.1.tar.gz | 224.1 kB | Without provenance | Details for berkelium-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| berkelium-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for berkelium-0.1.1-py3-none-any.whl |
Total release size: 264.0 kB
Release files / berkelium-0.1.1.tar.gz
| Download URL | berkelium-0.1.1.tar.gz |
|---|---|
| Size | 224.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0e10de1eaca3d14aa6a27688e44d09a3acb95b2ad619db99c4c8295b56c80e7
|
|
BLAKE2b-256 checksum How to use checksums |
8dfa59a511c04b059b24472dde3ce937f04eb7ef13e54f61d697f8f914581816
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / berkelium-0.1.1-py3-none-any.whl
| Download URL | berkelium-0.1.1-py3-none-any.whl |
|---|---|
| Size | 39.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54f744d5455ce5e2218504122845496d3c518701771c33c1980eca78da7ea0e1
|
|
BLAKE2b-256 checksum How to use checksums |
111961db145352a985d93a83cd8b3e581dae67079645017a5b2bd9cd45c201a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for berkelium 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.