Skip to main content

Berkelium CLI — TUI for code graph management.

Project description

Berkelium CLI

PyPI Version PyPI Downloads License MCP Compatible

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 Desktop)

Add this to your claude_config.json:

{
  "mcpServers": {
    "berkelium": {
      "command": "berkelium-mcp",
    }
  }
}

Available Tools

  • build_or_update_graph: Performs a full extraction or an incremental git-diff sync.
  • get_impact_radius: Analyzes functional blast radius (upstream callers and downstream dependencies).
  • get_structural_context: Returns Markdown-formatted context optimized for LLM injection.
  • get_file_symbols: Lists all symbols (functions, classes, etc.) defined in a specific file.
  • search_symbols: Locates symbols by name fragment across the entire codebase.
  • query_graph: Executes read-only Cypher queries directly against the code graph.

Available Prompts

  • review_my_pr: A guided workflow that syncs the graph, identifies changes via git, and suggests targeted tests based on impact analysis.

🏗️ Architecture

  • Extractor (extractor.py): Language-agnostic extraction using tree-sitter.
  • Store (store.py): Persistence layer using GraphQLite on SQLite.
  • Sync (sync.py): Git-based incremental synchronization logic.
  • Retriever (retriever.py): Graph traversal algorithms for impact and context.

📄 License

MIT License - see LICENSE.

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

berkelium-0.0.2.tar.gz (175.2 kB view details)

Uploaded Source

Built Distribution

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

berkelium-0.0.2-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file berkelium-0.0.2.tar.gz.

File metadata

  • Download URL: berkelium-0.0.2.tar.gz
  • Upload date:
  • Size: 175.2 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for berkelium-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7bd048f41eb0452e7f8f5e3246ecb82ab6765f58348666cbf7b71de7139982a3
MD5 11a6bf753bbebb26326d4db9b85c3366
BLAKE2b-256 7e4037e681539b35ad12e12598400460475f06d4b9f373b339f18420350ab29c

See more details on using hashes here.

File details

Details for the file berkelium-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: berkelium-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for berkelium-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 719fb608bf5a6038de19a57be77887f821ae75980a265472b9c9f0b4f1de0150
MD5 ef50b35625ae4db815771c242a99c350
BLAKE2b-256 e9de834561e20accb295c966e1f2e1f4d133105903c9834a0d89c02d7a33f368

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