A structural code search engine for Al agents.
# Add to your Claude Code skills
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 speed for very large codebases.
Overall Assessment: 4/5 - Excellent for AI agents, good for developers, needs speed optimization for 100K+ file repos.
Enterprise-Grade Context Infrastructure
No comments yet. Be the first to share your thoughts!
transformers.jsmantic "verify user" --semanticmantic goto UserService returns the exact line number across your entire monorepo.mantic references handleLogin finds every usage, respecting .gitignore..mantic/search-patterns.json) and can be committed to git to share knowledge across your team.Performance Update: v1.0.25 is ~2x faster than previous versions, scanning Chromium (481K files) in <2 seconds.
Tested on 481K files (Chromium) with 100% multi-repo accuracy.
See the CHANGELOG for detailed release notes.
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.
For a team of 100 developers performing 100 searches per day (approx. 3M searches/year):
| Tool | Annual Cost (Est.) | Per-Search Cost | Privacy | |------|---|---|---| | Mantic | $0 | $0 | Local-First | | Vector Embeddings (DIY) | $1,680 - $10,950* | $0.0005 - $0.003 | Cloud | | SaaS Alternatives | $46,800+ | $0.015+ | Cloud |
Note: Mantic costs are zero. Vector/SaaS costs are estimates based on standard managed infrastructure (e.g. Pinecone/Weaviate managed pods + compute) or per-seat Enterprise licensing (e.g. GitHub Copilot Enterprise).
| Repository | Files | Query | Mantic v1.0.25 | ripgrep | fzf | Verdict | |------------|-------|-------|-----------------|---------|-----|--------| | cal.com | 9.7K | "stripe payment" | 0.288s | 0.121s | 0.534s | Fast | | next.js | 25K | "router server" | 0.440s | 0.034s | 0.049s | Fast | | tensorflow | 35K | "gpu" | 0.550s | 0.022s | N/A | Fast | | chromium | 481K | "ScriptController" | 1.961s | 0.380s | 0.336s | <2s (Massive) |
Speed Verdict:
"router server" in next.jspackages/next/src/server/lib/router-server.ts (Score: 220)"ScriptController" in chromiumscript_controller.h, script_controller.cc (Score: 200)script.*controller"gpu" in tensorflowtensorflow/lite/delegates/gpu/"blink renderer core dom" in chromiumthird_party/blink/renderer/core/dom/README.md| Feature | Mantic | ripgrep | ag | fzf | |---------|--------|---------|----|-----| | Text Search Speed | 2-10x slower | Fastest | Slow (large repos) | Very Fast | | Relevance Ranking | Excellent | None | None | Basic | | Path Structure Awareness | Perfect | None | None | Partial | | CamelCase Detection | Yes | No | No | No | | Exact Filename Matching | Yes | No | No | Yes | | Multi-Word Queries | Semantic | Regex needed | Regex needed | AND logic | | Go to Definition | Yes (Cross-Repo) | No | No | No | | Find References | Yes | No | No | No | | Impact Analysis | Yes | No | No | No | | Zero-Query Mode | Yes | No | No | No |
Quick Start (no installation required):
npx mantic.sh@latest "your search query"
New Commands:
# Semantic Search (Neural Reranking)
npx mantic.sh@latest "verify user identity" --semantic
# Go to Definition
npx mantic.sh@latest goto "UserService"
# Find References
npx mantic.sh@latest references "handleLogin"
From Source:
git clone https://github.com/marcoaapfortes/Mantic.sh.git
cd Mantic.sh
npm install
npm run build
npm link
Mantic works as an MCP (Model Context Protocol) server for Claude Desktop, Cursor, VS Code, and other MCP-compatible tools.
One-Click Install:
Manual Configuration (for Claude Desktop or other MCP clients):
Add this to your MCP settings file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"mantic": {
"command": "npx",
"args": ["-y", "mantic.sh@latest", "server"]
}
}
}
Find files matching your intent:
mantic "stripe payment integration"
Returns JSON with ranked files, confidence scores, and token estimates.
Zero-Query Mode (proactive context):
mantic ""
# Shows modified files, related dependencies, impact analysis
Context Carryover (session mode):
mantic "auth logic" --session my-task
# Previously viewed files get +150 boost
Impact Analysis:
mantic "payment processing" --impact
# Shows blast radius and depe