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.1.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.1-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: berkelium-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 adc2bd1d3f0c657e99cc92b5f90d8033670ee1c0a96ab9970f463ea78a9ab480
MD5 c1fda1662672be2f9f80756e64e5f52c
BLAKE2b-256 2a087c79abab85a3560a90ec59cfd9ef0a1b574ee4a5dde9fedbe6714cf67f2e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: berkelium-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96486787417eb162f3d56fe1bec181b611f279ff481434a03843bc4e43234acb
MD5 429b2ea596716ef30403cc3f6bc1f415
BLAKE2b-256 e568688713c8c18846b9216be71fd2b67ac41159ed37b5302810ebef603adeb8

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