$git clone https://github.com/marcoaapfortes/Mantic.shMantic is a context-aware code search engine that prioritizes relevance over raw speed. After testing across 5 repositories (cal.com, next.js, tensorflow, supabase, chromium), it demonstrates superior result quality compared to grep/ripgrep, despite some trade-offs in
| 1 | # Mantic.sh |
| 2 | |
| 3 | [](https://www.npmjs.com/package/mantic.sh) |
| 4 | [](https://cursor.com/en/install-mcp?name=mantic&config=eyJ0eXBlIjogInN0ZGlvIiwgImNvbW1hbmQiOiAibnB4IiwgImFyZ3MiOiBbIi15IiwgIm1hbnRpYy5zaEBsYXRlc3QiLCAic2VydmVyIl19) |
| 5 | [](https://vscode.dev/redirect/mcp/install?name=mantic&config=%7B%22type%22%3A%20%22stdio%22%2C%20%22command%22%3A%20%22npx%22%2C%20%22args%22%3A%20%5B%22-y%22%2C%20%22mantic.sh%40latest%22%2C%20%22server%22%5D%7D) |
| 6 | [](https://github.com/marcoaapfortes/Mantic.sh/blob/main/AGENT_RULES.md) |
| 7 | [](#mcp-server-installation) |
| 8 | |
| 9 | |
| 10 | ## Summary |
| 11 | |
| 12 | Mantic is a **context-aware code search engine** that prioritizes **relevance over raw speed**. After testing across 5 repositories (cal.com, next.js, tensorflow, supabase, chromium), it demonstrates **superior result quality** compared to grep/ripgrep, despite some trade-offs in speed for very large codebases. |
| 13 | |
| 14 | **Overall Assessment**: 4/5 - Excellent for AI agents, good for developers, needs speed optimization for 100K+ file repos. |
| 15 | |
| 16 | ## What's New in v1.0.25 |
| 17 | |
| 18 | **Enterprise-Grade Context Infrastructure** |
| 19 | |
| 20 | - **Semantic Reranking (Hybrid Intelligence)**: Combines heuristic speed with neural understanding. Uses local embeddings (`transformers.js`) to find "conceptually relevant" code even without exact keyword matches. |
| 21 | - Usage: `mantic "verify user" --semantic` |
| 22 | - **Code Intelligence**: Deep understanding of your codebase structure using Tree-sitter. |
| 23 | - **Go to Definition**: `mantic goto UserService` returns the exact line number across your entire monorepo. |
| 24 | - **Find References**: `mantic references handleLogin` finds every usage, respecting `.gitignore`. |
| 25 | - **Learned Context (Team Memories)**: Mantic now remembers which files solved previous queries. These patterns are saved locally (`.mantic/search-patterns.json`) and can be committed to git to share knowledge across your team. |
| 26 | - **Python Support**: Now includes first-class support for Python imports in the dependency graph. |
| 27 | - **Security & Stability**: |
| 28 | - Regex DoS protection for user inputs. |
| 29 | - Command injection mitigations for VS Code extension. |
| 30 | - Safe fallback for non-git directories (scans allow-listed extensions). |
| 31 | |
| 32 | **Performance Update**: v1.0.25 is **~2x faster** than previous versions, scanning Chromium (481K files) in <2 seconds. |
| 33 | |
| 34 | **Tested on 481K files (Chromium) with 100% multi-repo accuracy.** |
| 35 | |
| 36 | See the [CHANGELOG](https://github.com/marcoaapfortes/Mantic.sh/blob/main/CHANGELOG.md) for detailed release notes. |
| 37 | |
| 38 | ## Table of Contents |
| 39 | |
| 40 | - [About the Project](#about-the-project) |
| 41 | - [Proprietary vs Mantic](#proprietary-vs-mantic-cost-analysis) |
| 42 | - [Performance Benchmarks](#performance-benchmarks) |
| 43 | - [Accuracy & Relevance](#accuracy--relevance-analysis) |
| 44 | - [Feature Comparison](#feature-comparison-matrix) |
| 45 | - [Use Case Recommendations](#use-case-recommendations) |
| 46 | - [Installation](#installation) |
| 47 | - [CLI Installation](#cli-installation) |
| 48 | - [MCP Server Installation](#mcp-server-installation) |
| 49 | - [Usage](#usage) |
| 50 | - [Agent Rules](#agent-rules-auto-pilot) |
| 51 | - [How It Works](#how-it-works) |
| 52 | - [License](#license) |
| 53 | |
| 54 | ## About the Project |
| 55 | |
| 56 | Mantic is an infrastructure layer designed to remove unnecessary context retrieval overhead for AI agents. It infers intent from file structure and metadata rather than brute-force reading content, enabling retrieval speeds faster than human reaction time. |
| 57 | |
| 58 | ### Key Benefits |
| 59 | |
| 60 | - **Speed**: Retrieval is consistently under 500ms for |