Back to browse
Sqry – semantic code search using AST and call graphs

Sqry – semantic code search using AST and call graphs

by verivusai·Mar 6, 2026·5 points·1 comment

AI Analysis

●●●BangerSolve My ProblemNiche GemZero to One

12ms exact call-graph queries beat 1,400ms embeddings; 35 languages, zero cloud required.

Strengths
  • Structural queries replace fuzzy embeddings: `callers:function` returns exact results in milliseconds vs 1,400ms+ with ~60% precision from vector search
  • Tree-sitter AST + unified graph design is sound: handles call graphs, imports, type relationships, dead code across 28 languages (Tier 1) with full relation tracking
  • 33 MCP tools + LSP server + local 22M-param NLP model = polished integration story; works with Claude, editors, and doesn't leak code to cloud
Weaknesses
  • Category is crowded: Sourcegraph, Continue IDE, Cursor, and GitHub Copilot already offer semantic navigation (though most require uploads)
  • Success depends on tree-sitter coverage—Tier 2 languages (Terraform, Pulumi) lack relation tracking; maturity of call graphs on dynamic/metaprogramming languages unclear
Target Audience

Backend/systems engineers, DevSecOps teams, private/regulated codebases, Rust/C++ heavy projects

Similar To

Sourcegraph · Continue.dev · GitHub Copilot with local indexing

Post Description

I built sqry, a local code search tool that works at the semantic level rather than the text level.

The motivation: ripgrep is great for finding strings, but it can't tell you "who calls this function", "what does this function call", or "find all public async functions that return Result". Those questions require understanding code structure, not just matching patterns.

sqry parses your code into an AST using tree-sitter, builds a unified call/ import/dependency graph, and lets you query it:

sqry query "callers:authenticate" sqry query "kind:function AND visibility:public AND lang:rust" sqry graph trace-path main handle_request sqry cycles sqry ask "find all error handling functions"

The `sqry ask` command translates natural language into sqry query syntax locally, using a compact 22M-parameter model with no network calls.

Some things that might be interesting to HN:

- 35 language plugins via tree-sitter (C, Rust, Go, Python, TypeScript, Java, SQL, Terraform, and more) - Cross-language edge detection: FFI linking (Rust↔C/C++), HTTP route matching (JS/TS↔Python/Java/Go) - 33-tool MCP server so AI assistants get exact call graph data instead of relying on embedding similarity - Arena-based graph with CSR storage; indexed queries run ~4ms warm - Cycle detection, dead code analysis, semantic diff between git refs

It's MIT-licensed and builds from source with Rust 1.90+. Fair warning: full build takes ~20 GB disk because 35 tree-sitter grammars compile from source.

Repo: https://github.com/verivusai-labs/sqry Docs: https://sqry.dev

Happy to answer questions about the architecture, the NL translation approach, or the cross-language detection.

Similar Projects