Interactive Shell
Overview
sqry shell starts an interactive REPL that keeps the index loaded in memory. Queries execute in single-digit milliseconds because the snapshot is already parsed and the cache is warm. It is the fastest way to explore a codebase interactively.
Start the shell
cd /path/to/your/project
sqry shell
The shell loads the index once on startup, then presents a prompt:
sqry v4.10.13 — 42,318 nodes, 67,204 edges
sqry>
Running queries
Type any query at the prompt — the same syntax as sqry query:
sqry> kind:function AND async:true
src/api/routes.rs:42 handle_request
src/auth/middleware.rs:18 validate_token
... (38 more results)
sqry> callers:validate_token
src/api/routes.rs:45 handle_request
src/tests/auth_test.rs:12 test_auth_flow
sqry> callers:handle_request --limit 5
src/main.rs:28 main
src/tests/api_test.rs:55 test_routes
All flags work the same as in the non-interactive sqry query command: --limit, --json, --kind, --lang, etc.
Graph commands
Run graph commands without the sqry graph prefix:
sqry> trace-path main database
sqry> direct-callers authenticate
sqry> cycles --type imports
sqry> unused --scope public
sqry> stats
History
The shell maintains query history across sessions. Use arrow keys to navigate previous queries, or search with Ctrl+R:
sqry> # Press Up/Down to cycle through history
sqry> # Press Ctrl+R to search history
Exiting
Type exit, quit, or press Ctrl+D to exit the shell.
When to use the shell
The shell is best for exploratory sessions — when you’re tracing through unfamiliar code, debugging a call chain, or iteratively narrowing down a set of symbols. Each query runs against the already-loaded index, so the 4ms warm-cache latency applies to every command after the first.
For scripted or CI use cases, use sqry batch instead.