Kinrg: The Intelligence OS for Code Context
"Stop letting AI guess. Let AI truly understand your codebase."
🌑 The Problem: AI is lost in your code
Most current AI tools read code linearly. In a large project (Monorepo), AI faces three hurdles:
- Noise: Reading thousands of irrelevant lines, wasting tokens.
- Oversight: Missing critical dependencies located in other files.
- Hallucination: Providing incorrect solutions due to a lack of overall architectural understanding.
🔥 The Breakthrough: Graph Intelligence Layer
kinrg is a Context Engine that transforms your source code into a living Knowledge Graph. It allows your AI Agent to "see":
- Blast Radius: Precisely identify the impact zone of any code change.
- Logic Flows: Understand how data flows from entry points to core logic.
- Smart Pruning: Automatically strip away 95% of context noise so AI focuses on the right issue.
💎 Core Pillars
| 🚀 ULTIMATE PERFORMANCE | 🧠 DEEP AST TECHNOLOGY | 🌐 OPEN ECOSYSTEM |
|---|---|---|
| Save up to 27x Tokens through intelligent context filtering, sending only what truly matters. | Powered by Tree-sitter to understand source code like a real compiler (19+ languages). | Automatic MCP configuration for Cursor, Claude Code, Windsurf, Zed, Continue, and OpenCode. |
| Updates in < 2s even for projects with thousands of files, thanks to incremental algorithms. | Hybrid Search: The perfect blend of Keyword (FTS5) and Semantic Vector Search (Embeddings). | Deeply integrated into Anthropic's Model Context Protocol (MCP). |
🔌 Supported AI Ecosystem
With a single kinrg install command, you can upgrade the intelligence of:
Cursor • Claude Code • Windsurf • Zed • Continue • OpenCode • Antigravity
⚙️ Installation & Setup
1. Requirements
- Python: Version 3.10 or higher.
- IDEs: Best compatible with tools supporting MCP (Cursor, Claude Code, etc.)
2. Installation Methods
You can install kinrg flexibly via popular package managers:
# Standard installation via pip
pip install kinrg
# Install via pipx (Recommended to avoid dependency conflicts)
pipx install kinrg
# Use uv for maximum installation performance
uv tool install kinrg
3. Advanced Features (Optional)
Unlock the full power of kinrg by installing extension modules:
# Enable Semantic Search (Vector Embeddings)
pip install "kinrg[embeddings]"
# Enable Community & Module Structure Analysis
pip install "kinrg[communities]"
# Enable Automated Wiki Documentation (requires LLM summaries)
pip install "kinrg[wiki]"
# Install all features in a single command
pip install "kinrg[all]"
4. Connect to your AI Editor
Use the install command to let kinrg automatically detect your installed IDEs and configure the MCP Server:
kinrg install
Note: To configure for a specific platform, use: kinrg install --platform [cursor|claude-code|zed|...].
💡 First-time Usage Guide
To get started, open your project in an IDE (like Cursor or VS Code) and follow these steps:
- Build the Graph: Type in your AI chat: "Build the source code graph using kinrg".
- Review Code: When you have new changes, ask: "Review my latest changes using kinrg".
- Search: "Find all functions related to login using semantic search".
kinrg will run in the background, providing all necessary data for the AI to work with maximum accuracy.
🛠️ Comprehensive Intelligence: 26 MCP Tools
Your AI Agent will automatically utilize these 26 specialized tools to assist with every programming task:
🔍 Analysis & Review (Review & Impact)
audit_diff_tool: Risk analysis and precise change boundary identification based on Git diff.trace_impact_tool: Precisely identify the "impact radius" of code changes (Blast Radius).prepare_review_tool: Provide optimized code snippets for AI review, saving tokens.quick_brief_tool: Retrieve hyper-compressed context (~100 tokens) for any task.check_complexity_tool: Detect functions/classes that are too complex based on line count.
🌐 Search & Graph (Search & Query)
smart_search_tool: Search code using natural language or meaning (Vector Search).inspect_relationships_tool: Query Callers, Callees, Imports, Tests, and Inheritance.global_search_tool: Search source code across multiple registered projects simultaneously.fetch_stats_tool: View detailed statistics on node counts, edges, and languages.
🌊 Execution Flow
explore_flows_tool: List major execution flows (Entry points) sorted by criticality.detail_flow_tool: Step-by-step trace of a specific source code flow.check_damaged_flows_tool: Find user flows directly affected by the code you just modified.
🏛️ Architecture & Community
generate_blueprint_tool: Overview architecture map and coupling dependency warnings.cluster_modules_tool: Automatically cluster source code into logic modules (Leiden algorithm).inspect_module_tool: View the boundaries and members of a specific code cluster.
📝 Documentation & Resources (Docs & Wiki)
build_wiki_tool: Automatically generate a full Markdown Wiki for the project from the graph.read_wiki_tool: Retrieve documentation content for a specific module.read_manual_tool: Quickly access technical documentation sections forkinrg.
🔧 Refactor & Database
refactor_advisor_tool: Preview wide-reaching renames and detect dead code for cleanup.execute_refactor_tool: Execute refactoring changes that have been previewed.catalog_database_tool: List all database tables (SQL, Prisma, Django, etc.).inspect_table_tool: Table schema details, foreign keys, and code files querying it.
🏗️ Administration (Core & Registry)
sync_knowledge_tool: Initialize or update the project architectural graph (Full/Incremental).optimize_graph_tool: Re-run post-processing steps (Flows, Communities, FTS) for the graph.vectorize_codebase_tool: Compute vector embeddings for the entire codebase to enable semantic search.manage_registry_tool: Manage and list repositories registered in the multi-repo system.
💻 CLI Reference
Control kinrg directly from your terminal using the following command suite:
| Command | Function |
|---|---|
kinrg install |
Auto-detect and configure MCP for IDEs. |
kinrg index |
Scan and build the architectural graph for the first time (Full parse). |
kinrg sync |
Fast update of the graph (Processes only changed files). |
kinrg report |
View detailed statistics on nodes, edges, and graph health. |
kinrg monitor |
Watch mode: Auto-update the graph immediately upon file save. |
kinrg map |
Launch the web interface to visualize the project graph. |
kinrg docs |
Automatically generate a Markdown Wiki based on code structure. |
kinrg audit |
Risk analysis of current changes compared to Git. |
kinrg attach <path> |
Register a new project into the multi-repo management system. |
kinrg registry |
List all repositories registered in the Registry. |
kinrg serve |
Start the MCP server to connect with AI Agents. |
⚡ Slash Commands
When chatting with MCP-enabled AIs (like Cursor, Claude Code, OpenCode), you can use these shortcuts:
/kinrg:build-graph: Ask AI to update the entire project architectural map./kinrg:review-delta: AI will analyze and comment on your latest code changes./kinrg:review-pr: Perform a full PR review process with deep risk analysis.
📝 License
MIT. All source code data is kept secure locally within the .kinrg/ directory.
Website • GitHub
Released under the MIT License. All source code data is kept secure locally within the .kinrg/ directory.
Metadata
Release files for kinrg 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kinrg-1.0.4.tar.gz | 589.4 kB | Without provenance | Details for kinrg-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kinrg-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for kinrg-1.0.4-py3-none-any.whl |
Total release size: 787.1 kB
Release files / kinrg-1.0.4.tar.gz
| Download URL | kinrg-1.0.4.tar.gz |
|---|---|
| Size | 589.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65196907b6fb9e8cdd39a0ef9ebb419de7ebe37a6b1040157cd580d2ccdb7515
|
|
BLAKE2b-256 checksum How to use checksums |
5bc0370e9fb03267ecbff443e9aa03c56603dd5708a1dda66251d6d9367e05bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / kinrg-1.0.4-py3-none-any.whl
| Download URL | kinrg-1.0.4-py3-none-any.whl |
|---|---|
| Size | 197.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1bcc03d5d9271399b2c0a8b9113a88248b2eded48f8f60e6c147202cb7c14f54
|
|
BLAKE2b-256 checksum How to use checksums |
7c035ee4dc21db696f30ad9fed4fec1572f6085aafea17c240e39ceb622ea151
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for kinrg 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.