Show HN: Sqry – semantic code search using AST and call graphs
3 points
16 hours ago
| 1 comment
| sqry.dev
| HN
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.

UltraSane
3 hours ago
[-]
This is actually really cool and something I have played around with using Neo4j
reply