logoalt Hacker News

Show HN: Mantic.sh – A structural code search engine for AI agents

70 pointsby marcoaapforteslast Tuesday at 1:48 PM32 commentsview on HN

Author here! Some context: I published this 48 hours ago and it was auto-listed on MCPMarket (the MCP tools directory). Got 700+ organic downloads with zero marketing—developers were actively searching for exactly this solution.

The "Git Accelerator" optimization story:

Initially used a file walker that took 6.6s on Chromium. Profiling showed 90% was filesystem I/O. The fix: git ls-files returns 480k paths in ~200ms. Added smart heuristics for untracked files (only scan dirs <50k files), bringing total to 0.46s.

Why this matters: Agents can't wait 10 seconds for search. Sub-500ms makes it feel instant, changing how they explore codebases.

Installation:

  Cursor: npx mantic.sh@latest
  VS Code: npx mantic.sh@latest
  CLI: npm i -g mantic.sh
Limitations: Mantic is optimized for precise queries ("find stripe webhook") where structure matters. For fuzzy exploratory search, traditional embeddings may still be better. Curious if HN has ideas for hybrid approaches.

Happy to answer questions!


Comments

zvrlast Tuesday at 11:07 PM

Interesting and I haven't tried it yet.

But the "Usage Guidelines" part of the "License" section at the end of the README says: "License required for: Commercial embedding in products you sell or offering Mantic as a hosted service."

This is not completely true, since it seems that the software is licensed under AGPLv3, which of course allow the use of the software for any purpose, even commercial.

show 1 reply
forgotpwd16yesterday at 6:58 AM

Interesting idea but its very strong path-dependence makes me wary on its general use and reliability. E.g. on project's own codebase querying "extract exports" will've expected to get `src/dependency-graph.ts`, which has an `extractExports` function, 1st rather 7th. (Though in out of ~30 total files, that means gives expected result in top 25%.) Trying to search anything on chromium repo (just "git clone https://chromium.googlesource.com/chromium", no deps/submodules; only ~44k paths in `git ls-files`) returns "Error: Scanner failed to produce scored files. This is a bug."

show 2 replies
oooyaylast Tuesday at 8:40 PM

Hello! Cool tool, I'm going to give it a try on my personal assistant. The vector DB prices look a bit cynical to me, even incredible. Do you think you could break down how you arrived at the cost estimation both for competing vector DBs and Mantic? For example, I use Weaviate at the moment and I don't come close to this cost even at a years perspective with a generous amount of usage from multiple users (~60)

show 1 reply
rayladlast Tuesday at 8:49 PM

MANTIC_IGNORE_PATTERNS seems not to be implemented, or am I missing something?

show 1 reply
esafaklast Tuesday at 8:54 PM

What is "cognitive code search" "without embeddings"? Do you mean you accept natural language queries and create embeddings on-the-fly?

edit: That's structural or syntax-aware search.

show 1 reply
vzalivayesterday at 2:10 AM

I've tried it on my project and it always finds one file: package.json. What languages it support? Only javascript?

show 1 reply
warthoglast Tuesday at 9:02 PM

Can you explain how you achieve this in more detail? Did not see any in-detail explanation in the readme in repo

show 1 reply
vaultlast Tuesday at 9:37 PM

Is it possible that you are advertising mantic as an MCP tool without it actually being one? Or at least please document how to use it as such.

show 1 reply
vithlanilast Tuesday at 11:15 PM

[dead]