Skip to main content

The context engine for AI coding agents - reduce tokens by 50-70%

Project description

CodeNexus

The context engine for AI coding agents

License: MIT Python 3.10+

English | 한국어


What is CodeNexus?

CodeNexus is a local-first context engine that helps AI coding agents understand your codebase better. It builds a live dependency graph of your code and serves only the relevant context to AI agents, reducing token usage by 50-70% while improving code quality.

Key Features

  • Local-first: Your code never leaves your machine
  • Token reduction: Save 50-70% on AI API costs
  • Multi-language: Python, JavaScript, TypeScript support
  • MCP compatible: Works with Claude Code, Cursor, and other AI agents
  • Fast indexing: SQLite-based dependency graph

Quick Start

Installation

pip install codenexus

Basic Usage

# Index your project
codenexus index

# Search for context
codenexus search "authentication middleware"

# Run context pipeline
codenexus pipeline "fix login bug"

# Check index status
codenexus status

How It Works

Your Codebase
     ↓
[CodeNexus Indexer]
     ↓
┌─────────────────────────────────────┐
│  Dependency Graph (SQLite + FTS5)   │
│  - Functions, Classes, Imports      │
│  - Call relationships               │
│  - Type information                 │
└─────────────────────────────────────┘
     ↓
[Context Capsule Generator]
     ↓
┌─────────────────────────────────────┐
│  Optimized Context for AI Agent     │
│  - Pivot files: Full source         │
│  - Supporting: Skeleton only        │
│  - Token budget: Respected          │
└─────────────────────────────────────┘
     ↓
AI Agent (Claude Code, Cursor, etc.)

Claude Code Integration

Add to your ~/.claude.json:

{
  "mcpServers": {
    "codenexus": {
      "command": "codenexus",
      "args": ["serve", "-w", "/path/to/your/project"]
    }
  }
}

Supported Languages

Language Status
Python ✅ Full support
JavaScript ✅ Full support
TypeScript ✅ Full support
Go ✅ Full support
Rust ✅ Full support
Java ✅ Full support
C# ✅ Full support

Token Savings Example

Before CodeNexus:

8,247 tokens per query

After CodeNexus:

2,140 tokens per query (74% reduction)

Roadmap

  • Tree-sitter integration for better parsing
  • Graph centrality (PageRank) for better ranking
  • Local LLM support for additional savings
  • Multi-repo workspace support
  • VS Code extension

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

  • Inspired by vexp - The original context engine
  • Built with Python, SQLite, and MCP
  • Thanks to all contributors

Support

If you find CodeNexus useful, consider supporting the project:

Ko-fi GitHub Sponsors


Connect your code. Empower your AI.

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

codenexus_ai-1.0.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

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

codenexus_ai-1.0.0-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file codenexus_ai-1.0.0.tar.gz.

File metadata

  • Download URL: codenexus_ai-1.0.0.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for codenexus_ai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 db1974f95e1a7fec771430780971b9d3431c4bb07d53aec65af637a1900c44ec
MD5 5c23889e188f4b4c82786d9de5ca5f0f
BLAKE2b-256 1ac7e8c20bc2b579d693e01f0a7c9eaefb8e6049e3fb7795a219aca15f0057c6

See more details on using hashes here.

File details

Details for the file codenexus_ai-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: codenexus_ai-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for codenexus_ai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75a1cd913d8ee4536afd14bfdd78d0e0a6bac32904f6cf1af98669dcac190b0b
MD5 42d7b3247c0ed33c502aa6a2c8ae1e03
BLAKE2b-256 80ba9f38a3d91a560579e44382d9fbf90711eee8121717662b64c0f2edc60ee9

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