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

Uploaded Python 3

File details

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

File metadata

  • Download URL: codebookx-3.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 20327c2d2fcf2d537cf29ab19bd690ad45da2ce66b80d412399ea0b356015516
MD5 1a618c8e7bbbefe50eb849d1fce27912
BLAKE2b-256 5fcbd138f014c7dae8aa4c97730d495549d5eebe8a30e8632b0528449126f2e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebookx-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 25.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e46d0106d617c2c053d0715b67617651abe33996aa2d1077bad4e30c12d493
MD5 8d5c29f0599524e5b1d64aa81d45ba48
BLAKE2b-256 232517b7e92b2ff882a2ef8d835df7c9acc55c7b0405defb7eea5d5b47b9c160

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