Quick Start
Get up and running with sqry in minutes. This guide walks through installing sqry, indexing a codebase, and running your first queries.
Install
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/verivus-oss/sqry/main/scripts/install.sh | bash -s -- --component all
Windows (PowerShell):
irm https://raw.githubusercontent.com/verivus-oss/sqry/main/scripts/install.ps1 | iex
From crates.io (all platforms):
cargo install sqry-cli
The macOS/Linux and Windows installers install sqry, sqry-mcp, sqry-lsp, and sqryd. cargo install sqry-cli installs the CLI binary only. The standard language set is included by default; high-cost plugins can be enabled explicitly when needed. See Installation for package managers, build-from-source, and signature verification options.
Verify the installation:
sqry --version
Index Your Codebase
Before running queries, sqry needs to build an index of your project. Navigate to your project root and run:
sqry index .
This command parses every source file using tree-sitter AST analysis, extracts symbols (functions, classes, structs, methods, and more), resolves cross-file relationships (callers, callees, imports, exports), and writes a ready-to-query graph to .sqry/. That includes the graph snapshot in .sqry/graph/ plus the analysis artifacts used by cycle detection, reachability, and path queries. The index is persistent — subsequent queries use the cached snapshot and are dramatically faster (452ms cold parse down to 4ms with a warm cache).
To update the index after making changes to your code:
sqry update .
If you want to rebuild only the analysis layer with explicit tuning controls, run:
sqry analyze .
In normal workflows you do not need a separate analyze step after sqry index ..
Run Your First Query
With the index built, queries are instant. The sqry query command searches the indexed graph using sqry’s boolean query language.
Find all functions in the codebase:
sqry query "kind:function"
Find all async functions:
sqry query "kind:function AND async:true"
Find all public Rust symbols:
sqry query "lang:rust AND visibility:public"
Find every function that calls authenticate:
sqry query "callers:authenticate"
Find all Serialize implementations:
sqry query "impl:Serialize"
Find functions whose name starts with test_:
sqry query "name~=/^test_/"
For exploration without building an index first, use sqry search. It parses files on the fly, so it is slower and does not support relation queries (callers:, callees:, etc.), but requires no setup:
sqry search "kind:function" src/
Interactive Shell
For interactive exploration, the shell command keeps the index loaded in memory between queries, giving sub-10ms response times:
sqry shell .
Inside the shell, type queries directly without the sqry query prefix. Type exit or press Ctrl-D to quit.
The shell is particularly useful when navigating an unfamiliar codebase or running several related queries in sequence.
Wire up your AI assistant
Run sqry mcp setup from the project root. sqry detects installed agents (Claude Code, Codex CLI, Gemini CLI) and writes the right config for each:
sqry mcp setup
sqry mcp status
For a hands-free setup, hand the Install via Your Agent prompt to your agent — it installs sqry, indexes the project, and configures itself end-to-end.
Keep the graph warm
For long sessions or large repositories, run sqry as a daemon so the index stays in memory across CLI, LSP, and MCP queries:
sqry daemon start
sqry daemon load .
sqry-mcp --daemon # MCP shim — auto-starts the daemon
sqry lsp --stdio --daemon # LSP shim
See Daemon (sqryd) for the full lifecycle, configuration, and service-installation reference.
Next Steps
- Install via Your Agent — copy-paste prompts that install sqry and wire your agent up automatically
- Query Syntax — learn the full boolean query language, all operators, and every available field
- Field Reference — complete reference for every query field with examples
- Examples — real-world query patterns organized by use case
- Incremental Indexing —
--cache-dir,--no-incremental, and Prometheus metrics export - Macro Boundaries — Rust
#[cfg]filtering, generated-symbol tracking, and the macro-expansion cache - Installation — build from source, shell completions, and the MCP/LSP/daemon binaries
- Configuration — tune sqry with the config file and environment variables
- MCP Integration — connect Claude, Codex, Gemini, Cursor, and Windsurf
- LSP Integration — editor support with custom
sqry/*methods, diagnostics, and code lenses - Daemon (sqryd) — keep graphs warm in memory across sessions