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 release assets, build-from-source, and checksum 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 source files using tree-sitter AST analysis, extracts symbols (functions, classes, structs, methods, and more), resolves graph 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, so subsequent queries load the cached snapshot instead of reparsing the repository.

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 pattern-based name exploration, use sqry search. It searches symbol names as a regex by default, or as a literal with --exact. It does not accept structural predicates like kind:function or relation predicates like callers:; use sqry query for those:

sqry search "handle_.*" src/
sqry search "main" --exact .

Interactive Shell

For interactive exploration, the shell command keeps the index loaded in memory between query expressions:

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 editor or AI-assistant sessions on large repositories, run sqry as a daemon so daemon-backed LSP and MCP shims can use a loaded graph:

sqry daemon start
sqry daemon load .
sqry-mcp --daemon         # MCP shim — auto-starts the daemon
sqry lsp --daemon         # LSP shim — auto-starts the daemon

See Daemon (sqryd) for the full lifecycle, configuration, and service-installation reference.

Next Steps