Skip to main content

Codebase-X: Production-grade, offline code comprehension and AI-tasking platform

Project description

Codebase-X

The Intelligent AI Assistant for Your Entire Codebase.

Codebase-X is a production-grade, offline platform designed to give you total control over your code. By building a deep, persistent Knowledge Graph of your repository, Codebase-X enables advanced architectural analysis, atomic task decomposition, and prompt engineering—all while keeping your data 100% private and local.


🗺️ User Journey

  1. codebookx analyze: Scan your repository to build a Knowledge Graph and architectural teardown.
  2. codebookx view: Launch the interactive Knowledge Graph browser to explore your code visually.
  3. codebookx ask "...": Ask technical questions about your codebase, powered by the Knowledge Graph context.

🚀 Core Capabilities

🏛️ Codebase Teardown (Analyze)

Stop guessing how your system works. Codebase-X scans your entire repository to generate a high-level architectural blueprint.

  • Elevator Pitch: Get an instant summary of any project.
  • Architecture Blueprint: Automatically mapped folder roles and purposes.
  • Data Flow: Understand how the core components of your system interact.
codebookx analyze

🔨 Atomic Task Decomposition (Decompose)

Break complex features into small, manageable pieces. Codebase-X analyzes your feature request against your actual codebase to produce a series of atomic tasks.

  • AI-Ready: Each task includes a "copy-paste" prompt specifically designed for AI coding assistants.
  • Context-Aware: Tasks reference the exact files and symbols needed.
codebookx decompose "Add a user settings page"

✨ Prompt Enhancement (Enhance)

Stop writing vague prompts. The Prompt Enhancer uses the Knowledge Graph to inject relevant file paths, function signatures, and dependencies into your request, creating a high-context prompt that gets it right the first time.

codebookx enhance "Refactor the authentication flow"

🕸️ Knowledge Graph Browser (View)

Explore your code visually. Launch an interactive local web UI to traverse your project's dependency graph, find symbols, and manage your AI tasks.

  • Visual Map: Interactive D3.js force-directed graph available at /graph.
  • Relations: Track CALLS, IMPORTS, and CONTAINS relationships cross-file.
codebookx view

❓ Technical Q&A (Ask)

Knowledge Graph-backed Q&A for your codebase. Answers are saved automatically.

# Single question
codebookx ask "How is the authentication handled in this project?"

# Interactive chat mode (multi-turn, context carry-over)
codebookx ask -c "Walk me through the data flow"

# Save Q&A logs to a custom directory
codebookx ask "What does run_ask do?" --dir ~/my-notes
  • Auto-save: Every Q&A and chat session is saved to ask_history/ by default (--dir to override, or set CODEBOOK_ASK_DIR env var).
  • Chat mode (-c): Multi-turn conversation with full context carry-over. Each turn is saved incrementally — no history lost on crash.

🛠️ Getting Started

1. Install

pip install .

2. Local LLM Setup Codebase-X is designed to work with LM Studio, Ollama, or any OpenAI-compatible local server. Ensure your server is running.

3. Initial Analysis Scan your repository to build the Knowledge Graph:

codebookx analyze

🔒 Privacy & Performance

  • 100% Offline: Your code never leaves your machine. No cloud APIs, no subscriptions.
  • Persistent Indexing: Uses a lightning-fast SQLite-backed Knowledge Graph with hash-based caching.
  • Multi-Language: Deep support for Python, TypeScript, JavaScript, and more.

📄 License

Codebase-X is released under the MIT 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

codebookx-3.0.0.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

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

codebookx-3.0.0-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file codebookx-3.0.0.tar.gz.

File metadata

  • Download URL: codebookx-3.0.0.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for codebookx-3.0.0.tar.gz
Algorithm Hash digest
SHA256 ccf3c6161af8ffd8f2b66d26768700f3efaa4245b9cd2999f7ba31b590750bb1
MD5 c3a876458a6e37e4a121dd8731552b28
BLAKE2b-256 e52f3b4667f7c20bb0123871747a4d489037ede71ee24e4bc0dce4a7084ceaf8

See more details on using hashes here.

File details

Details for the file codebookx-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: codebookx-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for codebookx-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6e519431843a44ec552c82e4a2f9631a3f52a8ee2246c1ad47a502b71db1bd2
MD5 a45826dbc56b94b0a095d5ea732b8c91
BLAKE2b-256 ea996736f062da3ab8eabb06527562a130fa11e5c2310e5dddb9fecedf3b5784

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