Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 32 variants Visualize(VisualizeCommand), Search { pattern: String, path: Option<String>, save_as: Option<String>, global: bool, description: Option<String>, validate: ValidationMode, }, Query {
Show 13 fields query: String, path: Option<String>, session: bool, explain: bool, no_parallel: bool, verbose: bool, timeout: Option<u64>, limit: Option<usize>, save_as: Option<String>, global: bool, description: Option<String>, validate: ValidationMode, var: Vec<String>,
}, Graph { operation: GraphOperation, path: Option<String>, format: String, verbose: bool, }, Shell { path: Option<String>, }, Batch(BatchCommand), Index { path: Option<String>, force: bool, status: bool, add_to_gitignore: bool, threads: Option<usize>, no_incremental: bool, cache_dir: Option<String>, no_compress: bool, metrics_format: MetricsFormat, }, Analyze { path: Option<String>, force: bool, threads: Option<usize>, label_budget: Option<u64>, density_threshold: Option<u64>, budget_exceeded_policy: Option<String>, no_labels: bool, }, Lsp { options: LspOptions, }, Update { path: Option<String>, threads: Option<usize>, no_incremental: bool, cache_dir: Option<String>, stats: bool, }, Watch { path: Option<String>, threads: Option<usize>, build: bool, debounce: Option<u64>, stats: bool, }, Repair { path: Option<String>, fix_orphans: bool, fix_dangling: bool, recompute_checksum: bool, fix_all: bool, dry_run: bool, }, Cache { action: CacheAction, }, Config { action: ConfigAction, }, Completions(CompletionsCommand), Workspace { action: WorkspaceCommand, }, Alias { action: AliasAction, }, History { action: HistoryAction, }, Ask { query: String, path: Option<String>, auto_execute: bool, dry_run: bool, threshold: f32, }, Insights { action: InsightsAction, }, Troubleshoot { output: Option<String>, dry_run: bool, include_trace: bool, window: String, }, Duplicates { path: Option<String>, type: String, threshold: u32, max_results: usize, exact: bool, }, Cycles { path: Option<String>, type: String, min_depth: usize, max_depth: Option<usize>, include_self: bool, max_results: usize, }, Unused { path: Option<String>, scope: String, lang: Option<String>, kind: Option<String>, max_results: usize, }, Export { path: Option<String>, format: String, direction: String, filter_lang: Option<String>, filter_edge: Option<String>, highlight_cross: bool, show_details: bool, show_labels: bool, output: Option<String>, }, Explain { file: String, symbol: String, path: Option<String>, no_context: bool, no_relations: bool, }, Similar { file: String, symbol: String, path: Option<String>, threshold: f64, limit: usize, }, Subgraph { symbols: Vec<String>, path: Option<String>, depth: usize, max_nodes: usize, no_callers: bool, no_callees: bool, include_imports: bool, }, Impact { symbol: String, path: Option<String>, depth: usize, limit: usize, direct_only: bool, show_files: bool, }, Diff { base: String, target: String, path: Option<String>, limit: usize, kind: Option<String>, change_type: Option<String>, }, Hier { query: String, path: Option<String>, limit: usize, max_files: usize, context: usize, kind: Option<String>, lang: Option<String>, }, Mcp { command: McpCommand, },
}
Expand description

Available subcommands

Variants§

§

Visualize(VisualizeCommand)

Visualize code relationships as diagrams

§

Search

Search for symbols by pattern (simple pattern matching)

Fast pattern-based search using regex or literal matching. Use this for quick searches with simple text patterns.

For complex queries with boolean logic and AST predicates, use ‘query’ instead.

Examples: sqry search “test.*” # Find symbols matching regex sqry search “test” –save-as find-tests # Save as alias sqry search “test” –validate fail # Strict index validation

For kind/language/fuzzy filtering, use the top-level shorthand: sqry –kind function “test” # Filter by kind sqry –exact “main” # Exact match sqry –fuzzy “config” # Fuzzy search

See also: ‘sqry query’ for structured AST-aware queries

Fields

§pattern: String

Search pattern (regex or literal with –exact).

§path: Option<String>

Search path. For fuzzy search, walks up directory tree to find nearest .sqry-index if needed.

§save_as: Option<String>

Save this search as a named alias for later reuse.

The alias can be invoked with @name syntax: sqry search “test” –save-as find-tests sqry @find-tests src/

§global: bool

Save alias to global storage (~/.config/sqry/) instead of local.

Global aliases are available across all projects. Local aliases (default) are project-specific.

§description: Option<String>

Optional description for the saved alias.

§validate: ValidationMode

Index validation mode before search execution.

Controls how sqry handles stale indices (files removed since indexing):

  • warn: Log warning but continue (default)
  • fail: Exit with code 2 if >20% of indexed files are missing
  • off: Skip validation entirely

Examples: sqry search “test” –validate fail # Strict mode sqry search “test” –validate off # Fast mode

§

Query

Execute AST-aware query (structured queries with boolean logic)

Powerful structured queries using predicates and boolean operators. Use this for complex searches that combine multiple criteria.

For simple pattern matching, use ‘search’ instead.

Predicate examples:

  • kind:function # Find functions
  • name:test # Name contains ‘test’
  • lang:rust # Rust files only
  • visibility:public # Public symbols
  • async:true # Async functions

Boolean logic:

  • kind:function AND name:test # Functions with ‘test’ in name
  • kind:class OR kind:struct # All classes or structs
  • lang:rust AND visibility:public # Public Rust symbols

Relation queries (28 languages with full support):

  • callers:authenticate # Who calls authenticate?
  • callees:processData # What does processData call?
  • exports:UserService # What does UserService export?
  • imports:database # What imports database?

Supported for: C, C++, C#, CSS, Dart, Elixir, Go, Groovy, Haskell, HTML, Java, JavaScript, Kotlin, Lua, Perl, PHP, Python, R, Ruby, Rust, Scala, Shell, SQL, Svelte, Swift, TypeScript, Vue, Zig

Saving as alias: sqry query “kind:function AND name:test” –save-as test-funcs sqry @test-funcs src/

See also: ‘sqry search’ for simple pattern-based searches

Fields

§query: String

Query expression with predicates.

§path: Option<String>

Search path. If no index exists here, walks up directory tree to find nearest .sqry-index.

§session: bool

Use persistent session (keeps .sqry-index hot for repeated queries).

§explain: bool

Explain query execution (debug mode).

§no_parallel: bool

Disable parallel query execution (for A/B performance testing).

By default, OR branches (3+) and symbol filtering (100+) use parallel execution. Use this flag to force sequential execution for performance comparison.

§verbose: bool

Show verbose output including cache statistics.

§timeout: Option<u64>

Maximum query execution time in seconds (default: 30s, max: 30s).

Queries exceeding this limit will be terminated with partial results. The 30-second ceiling is a NON-NEGOTIABLE security requirement. Specify lower values for faster feedback on interactive queries.

Examples: sqry query –timeout 10 “impl:Debug” # 10 second timeout sqry query –timeout 5 “kind:function” # 5 second timeout

§limit: Option<usize>

Maximum number of results to return (default: 10000).

Queries returning more results will be truncated. Use this to limit memory usage for large result sets.

Examples: sqry query –limit 100 “kind:function” # First 100 functions sqry query –limit 1000 “impl:Debug” # First 1000 Debug impls

§save_as: Option<String>

Save this query as a named alias for later reuse.

The alias can be invoked with @name syntax: sqry query “kind:function” –save-as all-funcs sqry @all-funcs src/

§global: bool

Save alias to global storage (~/.config/sqry/) instead of local.

Global aliases are available across all projects. Local aliases (default) are project-specific.

§description: Option<String>

Optional description for the saved alias.

§validate: ValidationMode

Index validation mode before query execution.

Controls how sqry handles stale indices (files removed since indexing):

  • warn: Log warning but continue (default)
  • fail: Exit with code 2 if >20% of indexed files are missing
  • off: Skip validation entirely

Examples: sqry query “kind:function” –validate fail # Strict mode sqry query “kind:function” –validate off # Fast mode

§var: Vec<String>

Substitute variables in the query expression.

Variables are referenced as $name in queries and resolved before execution. Specify as KEY=VALUE pairs; can be repeated.

Examples: sqry query “kind:$type” –var type=function sqry query “kind:$k AND lang:$l” –var k=function –var l=rust

§

Graph

Graph-based queries and analysis

Advanced graph operations using the unified graph architecture. All subcommands are noun-based and represent different analysis types.

Available analyses:

  • trace-path <from> <to> # Find shortest path between symbols
  • call-chain-depth <symbol> # Calculate maximum call depth
  • dependency-tree <module> # Show transitive dependencies
  • nodes # List unified graph nodes
  • edges # List unified graph edges
  • cross-language # List cross-language relationships
  • stats # Show graph statistics
  • cycles # Detect circular dependencies
  • complexity # Calculate code complexity

All commands support –format json for programmatic use.

Fields

§operation: GraphOperation
§path: Option<String>

Search path (defaults to current directory).

§format: String

Output format (json, text, dot, mermaid, d2).

§verbose: bool

Show verbose output with detailed metadata.

§

Shell

Start an interactive shell that keeps the session cache warm

Fields

§path: Option<String>

Directory containing the .sqry-index file.

§

Batch(BatchCommand)

Execute multiple queries from a batch file using a warm session

§

Index

Build symbol index and graph analyses for fast queries

Creates a persistent index of all symbols in the specified directory. The index is saved to .sqry/ and includes precomputed graph analyses for cycle detection, reachability, and path queries. Uses parallel processing by default for faster indexing.

Fields

§path: Option<String>

Directory to index (defaults to current directory).

§force: bool

Force rebuild even if index exists.

§status: bool

Show index status without building.

Returns metadata about the existing index (age, symbol count, languages). Useful for programmatic consumers to check if indexing is needed.

§add_to_gitignore: bool

Automatically add .sqry-index/ to .gitignore if not already present.

§threads: Option<usize>

Number of threads for parallel indexing (default: auto-detect).

Set to 1 for single-threaded (useful for debugging). Defaults to number of CPU cores.

§no_incremental: bool

Disable incremental indexing (hash-based change detection).

When set, indexing will skip the persistent hash index and avoid hash-based change detection entirely. Useful for debugging or forcing metadata-only evaluation.

§cache_dir: Option<String>

Override cache directory for incremental indexing (default: .sqry-cache).

Points sqry at an alternate cache location for the hash index. Handy for ephemeral or sandboxed environments.

§no_compress: bool

Disable index compression (P1-12: Index Compression).

By default, indexes are compressed with zstd for faster load times and reduced disk space. Use this flag to store uncompressed indexes (useful for debugging or compatibility testing).

§metrics_format: MetricsFormat

Metrics export format for validation status (json or prometheus).

Used with –status –json to export validation metrics in different formats. Prometheus format outputs OpenMetrics-compatible text for monitoring systems. JSON format (default) provides structured data.

§

Analyze

Build precomputed graph analyses for fast query performance

Computes CSR adjacency, SCC (Strongly Connected Components), condensation DAGs, and 2-hop interval labels to eliminate O(V+E) query-time costs. Analysis files are persisted to .sqry/analysis/ and enable fast cycle detection, reachability queries, and path finding.

Note: sqry index already builds a ready graph with analysis artifacts. Run sqry analyze when you want to rebuild analyses with explicit tuning controls or after changing analysis configuration.

Examples: sqry analyze # Rebuild analyses for current index sqry analyze –force # Force analysis rebuild

Fields

§path: Option<String>

Search path (defaults to current directory).

§force: bool

Force rebuild even if analysis files exist.

§threads: Option<usize>

Number of threads for parallel analysis (default: auto-detect).

Controls the rayon thread pool size for SCC/condensation DAG computation. Set to 1 for single-threaded (useful for debugging). Defaults to number of CPU cores.

§label_budget: Option<u64>

Override maximum 2-hop label intervals per edge kind.

Controls the maximum number of reachability intervals computed per edge kind. Larger budgets enable O(1) reachability queries but use more memory. Default: from config or 15,000,000.

§density_threshold: Option<u64>

Override density gate threshold.

Skip 2-hop label computation when condensation_edges > threshold * scc_count. Prevents multi-minute hangs on dense import/reference graphs. 0 = disabled. Default: from config or 64.

§budget_exceeded_policy: Option<String>

Override budget-exceeded policy: "degrade" (BFS fallback) or "fail".

When the label budget is exceeded for an edge kind:

  • "degrade": Fall back to BFS on the condensation DAG (default)
  • “fail”: Return an error and abort analysis
§no_labels: bool

Skip 2-hop interval label computation entirely.

When set, the analysis builds CSR + SCC + Condensation DAG but skips the expensive 2-hop label phase. Reachability queries fall back to BFS on the condensation DAG (~10-50ms per query instead of O(1)). Useful for very large codebases where label computation is too slow.

§

Lsp

Start the sqry Language Server Protocol endpoint

Fields

§options: LspOptions
§

Update

Update existing symbol index

Incrementally updates the index by re-indexing only changed files. Much faster than a full rebuild for large codebases.

Fields

§path: Option<String>

Directory with existing index (defaults to current directory).

§threads: Option<usize>

Number of threads for parallel indexing (default: auto-detect).

Set to 1 for single-threaded (useful for debugging). Defaults to number of CPU cores.

§no_incremental: bool

Disable incremental indexing (force metadata-only or full updates).

When set, the update process will not use the hash index and will rely on metadata-only checks for staleness.

§cache_dir: Option<String>

Override cache directory for incremental indexing (default: .sqry-cache).

Points sqry at an alternate cache location for the hash index.

§stats: bool

Show statistics about the update.

§

Watch

Watch directory and auto-update index on file changes

Monitors the directory for file system changes and automatically updates the index in real-time. Uses OS-level file monitoring (inotify/FSEvents/Windows) for <1ms change detection latency.

Press Ctrl+C to stop watching.

Fields

§path: Option<String>

Directory to watch (defaults to current directory).

§threads: Option<usize>

Number of threads for parallel indexing (default: auto-detect).

Set to 1 for single-threaded (useful for debugging). Defaults to number of CPU cores.

§build: bool

Build initial index if it doesn’t exist.

§debounce: Option<u64>

Debounce duration in milliseconds.

Wait time after detecting a change before processing to collect rapid-fire changes (e.g., from editor saves).

Default is platform-aware: 400ms on macOS, 100ms on Linux/Windows. Can also be set via SQRY_LIMITS__WATCH__DEBOUNCE_MS env var.

§stats: bool

Show detailed statistics for each update.

§

Repair

Repair corrupted index by fixing common issues

Automatically detects and fixes common index corruption issues:

  • Orphaned symbols (files no longer exist)
  • Dangling references (symbols reference non-existent dependencies)
  • Invalid checksums

Use –dry-run to preview changes without modifying the index.

Fields

§path: Option<String>

Directory with existing index (defaults to current directory).

§fix_orphans: bool

Remove symbols for files that no longer exist on disk.

§fix_dangling: bool

Remove dangling references to non-existent symbols.

§recompute_checksum: bool

Recompute index checksum after repairs.

§fix_all: bool

Fix all detected issues (combines all repair options).

§dry_run: bool

Preview changes without modifying the index (dry run).

§

Cache

Manage AST cache

Control the disk-persisted AST cache that speeds up queries by avoiding expensive tree-sitter parsing. The cache is stored in .sqry-cache/ and is shared across all sqry processes.

Fields

§

Config

Manage graph config (.sqry/graph/config/config.json)

Configure sqry behavior through the unified config partition. All settings are stored in .sqry/graph/config/config.json.

Examples: sqry config init # Initialize config with defaults sqry config show # Display effective config sqry config set limits.max_results 10000 # Update a setting sqry config get limits.max_results # Get a single value sqry config validate # Validate config file sqry config alias set my-funcs “kind:function” # Create alias sqry config alias list # List all aliases

Fields

§

Completions(CompletionsCommand)

Generate shell completions

Generate shell completion scripts for bash, zsh, fish, or PowerShell. Install by redirecting output to the appropriate location for your shell.

Examples: sqry completions bash > /etc/bash_completion.d/sqry sqry completions zsh > ~/.zfunc/_sqry sqry completions fish > ~/.config/fish/completions/sqry.fish

§

Workspace

Manage multi-repository workspaces

Fields

§

Alias

Manage saved query aliases

Save frequently used queries as named aliases for easy reuse. Aliases can be stored globally (~/.config/sqry/) or locally (.sqry-index.user).

Examples: sqry alias list # List all aliases sqry alias show my-funcs # Show alias details sqry alias delete my-funcs # Delete an alias sqry alias rename old-name new # Rename an alias

To create an alias, use –save-as with search/query commands: sqry query “kind:function” –save-as my-funcs sqry search “test” –save-as find-tests –global

To execute an alias, use @name syntax: sqry @my-funcs sqry @find-tests src/

Fields

§

History

Manage query history

View and manage your query history. History is recorded automatically for search and query commands (unless disabled via SQRY_NO_HISTORY=1).

Examples: sqry history list # List recent queries sqry history list –limit 50 # Show last 50 queries sqry history search “function” # Search history sqry history clear # Clear all history sqry history clear –older 30d # Clear entries older than 30 days sqry history stats # Show history statistics

Sensitive data (API keys, tokens) is automatically redacted.

Fields

§

Ask

Natural language interface for sqry queries

Translate natural language descriptions into sqry commands. Uses a safety-focused translation pipeline that validates all generated commands before execution.

Response tiers based on confidence:

  • Execute (≥85%): Run command automatically
  • Confirm (65-85%): Ask for user confirmation
  • Disambiguate (<65%): Present options to choose from
  • Reject: Cannot safely translate

Examples: sqry ask “find all public functions in rust” sqry ask “who calls authenticate” sqry ask “trace path from main to database” sqry ask –auto-execute “find all classes”

Safety: Commands are validated against a whitelist and checked for shell injection, path traversal, and other attacks.

Fields

§query: String

Natural language query to translate.

§path: Option<String>

Search path (defaults to current directory).

§auto_execute: bool

Auto-execute high-confidence commands without confirmation.

When enabled, commands with ≥85% confidence will execute immediately. Otherwise, all commands require confirmation.

§dry_run: bool

Show the translated command without executing.

Useful for understanding what command would be generated from your natural language query.

§threshold: f32

Minimum confidence threshold for auto-execution (0.0-1.0).

Commands with confidence below this threshold will always require confirmation, even with –auto-execute.

§

Insights

View usage insights and manage local diagnostics

sqry captures anonymous behavioral patterns locally to help you understand your usage and improve the tool. All data stays on your machine unless you explicitly choose to share.

Examples: sqry insights show # Show current week’s summary sqry insights show –week 2025-W50 # Show specific week sqry insights config # Show configuration sqry insights config –disable # Disable uses capture sqry insights status # Show storage status sqry insights prune –older 90d # Clean up old data

Privacy: All data is stored locally. No network calls are made unless you explicitly use –share (which generates a file, not a network request).

Fields

§

Troubleshoot

Generate a troubleshooting bundle for issue reporting

Creates a structured bundle containing diagnostic information that can be shared with the sqry team. All data is sanitized - no code content, file paths, or secrets are included.

The bundle includes:

  • System information (OS, architecture)
  • sqry version and build type
  • Sanitized configuration
  • Recent use events (last 24h)
  • Recent errors

Examples: sqry troubleshoot # Generate to stdout sqry troubleshoot -o bundle.json # Save to file sqry troubleshoot –dry-run # Preview without generating sqry troubleshoot –include-trace # Include workflow trace

Privacy: No paths, code content, or secrets are included. Review the output before sharing if you have concerns.

Fields

§output: Option<String>

Output file path (default: stdout)

§dry_run: bool

Preview bundle contents without generating

§include_trace: bool

Include workflow trace (opt-in, requires explicit consent)

Adds a sequence of recent workflow steps to the bundle. The trace helps understand how operations were performed but reveals more behavioral patterns than the default bundle.

§window: String

Time window for events to include (e.g., 24h, 7d)

Defaults to 24 hours. Longer windows provide more context but may include older events.

§

Duplicates

Find duplicate code in the codebase

Detects similar or identical code patterns using structural analysis. Supports different duplicate types:

  • body: Functions with identical/similar bodies
  • signature: Functions with identical signatures
  • struct: Structs with similar field layouts

Examples: sqry duplicates # Find body duplicates sqry duplicates –type signature # Find signature duplicates sqry duplicates –threshold 90 # 90% similarity threshold sqry duplicates –exact # Exact matches only

Fields

§path: Option<String>

Search path (defaults to current directory).

§type: String

Type of duplicate detection.

  • body: Functions with identical/similar bodies (default)
  • signature: Functions with identical signatures
  • struct: Structs with similar field layouts
§threshold: u32

Similarity threshold (0-100, default: 80).

Higher values require more similarity to be considered duplicates. 100 means exact matches only.

§max_results: usize

Maximum results to return.

§exact: bool

Exact matches only (equivalent to –threshold 100).

§

Cycles

Find circular dependencies in the codebase

Detects cycles in call graphs, import graphs, or module dependencies. Uses Tarjan’s SCC algorithm for efficient O(V+E) detection.

Examples: sqry cycles # Find call cycles sqry cycles –type imports # Find import cycles sqry cycles –min-depth 3 # Cycles with 3+ nodes sqry cycles –include-self # Include self-loops

Fields

§path: Option<String>

Search path (defaults to current directory).

§type: String

Type of cycle detection.

  • calls: Function/method call cycles (default)
  • imports: File import cycles
  • modules: Module-level cycles
§min_depth: usize

Minimum cycle depth (default: 2).

§max_depth: Option<usize>

Maximum cycle depth (default: unlimited).

§include_self: bool

Include self-loops (A → A).

§max_results: usize

Maximum results to return.

§

Unused

Find unused/dead code in the codebase

Detects symbols that are never referenced using reachability analysis. Entry points (main, public lib exports, tests) are considered reachable.

Examples: sqry unused # Find all unused symbols sqry unused –scope public # Only public unused symbols sqry unused –scope function # Only unused functions sqry unused –lang rust # Only in Rust files

Fields

§path: Option<String>

Search path (defaults to current directory).

§scope: String

Scope of unused detection.

  • all: All unused symbols (default)
  • public: Public symbols with no external references
  • private: Private symbols with no references
  • function: Unused functions only
  • struct: Unused structs/types only
§lang: Option<String>

Filter by language.

§kind: Option<String>

Filter by symbol kind.

§max_results: usize

Maximum results to return.

§

Export

Export the code graph in various formats

Exports the unified code graph to DOT, D2, Mermaid, or JSON formats for visualization or further analysis.

Examples: sqry export # DOT format to stdout sqry export –format mermaid # Mermaid format sqry export –format d2 -o graph.d2 # D2 format to file sqry export –highlight-cross # Highlight cross-language edges sqry export –filter-lang rust,python # Filter languages

Fields

§path: Option<String>

Search path (defaults to current directory).

§format: String

Output format.

  • dot: Graphviz DOT format (default)
  • d2: D2 diagram format
  • mermaid: Mermaid markdown format
  • json: JSON format for programmatic use
§direction: String

Graph layout direction.

  • lr: Left to right (default)
  • tb: Top to bottom
§filter_lang: Option<String>

Filter by languages (comma-separated).

§filter_edge: Option<String>

Filter by edge types (comma-separated: calls,imports,exports).

§highlight_cross: bool

Highlight cross-language edges.

§show_details: bool

Show node details (signatures, docs).

§show_labels: bool

Show edge labels.

§output: Option<String>

Output file (default: stdout).

§

Explain

Explain a symbol with context and relations

Get detailed information about a symbol including its code context, callers, callees, and other relationships.

Examples: sqry explain src/main.rs main # Explain main function sqry explain src/lib.rs MyStruct # Explain a struct sqry explain –no-context file.rs func # Skip code context sqry explain –no-relations file.rs fn # Skip relations

Fields

§file: String

File containing the symbol.

§symbol: String

Symbol name to explain.

§path: Option<String>

Search path (defaults to current directory).

§no_context: bool

Skip code context in output.

§no_relations: bool

Skip relation information in output.

§

Similar

Find symbols similar to a reference symbol

Uses fuzzy name matching to find symbols that are similar to a given reference symbol.

Examples: sqry similar src/lib.rs processData # Find similar to processData sqry similar –threshold 0.8 file.rs fn # 80% similarity threshold sqry similar –limit 20 file.rs func # Limit to 20 results

Fields

§file: String

File containing the reference symbol.

§symbol: String

Reference symbol name.

§path: Option<String>

Search path (defaults to current directory).

§threshold: f64

Minimum similarity threshold (0.0 to 1.0, default: 0.7).

§limit: usize

Maximum results to return (default: 20).

§

Subgraph

Extract a focused subgraph around seed symbols

Collects nodes and edges within a specified depth from seed symbols, useful for understanding local code structure.

Examples: sqry subgraph main # Subgraph around main sqry subgraph -d 3 func1 func2 # Depth 3, multiple seeds sqry subgraph –no-callers main # Only callees sqry subgraph –include-imports main # Include import edges

Fields

§symbols: Vec<String>

Seed symbol names (at least one required).

§path: Option<String>

Search path (defaults to current directory).

§depth: usize

Maximum traversal depth from seeds (default: 2).

§max_nodes: usize

Maximum nodes to include (default: 50).

§no_callers: bool

Exclude callers (incoming edges).

§no_callees: bool

Exclude callees (outgoing edges).

§include_imports: bool

Include import relationships.

§

Impact

Analyze what would break if a symbol changes

Performs reverse dependency analysis to find all symbols that directly or indirectly depend on the target.

Examples: sqry impact authenticate # Impact of changing authenticate sqry impact -d 5 MyClass # Deep analysis (5 levels) sqry impact –direct-only func # Only direct dependents sqry impact –show-files func # Show affected files

Fields

§symbol: String

Symbol to analyze.

§path: Option<String>

Search path (defaults to current directory).

§depth: usize

Maximum analysis depth (default: 3).

§limit: usize

Maximum results to return (default: 100).

§direct_only: bool

Only show direct dependents (depth 1).

§show_files: bool

Show list of affected files.

§

Diff

Compare semantic changes between git refs

Analyzes AST differences between two git refs to detect added, removed, modified, and renamed symbols. Provides structured output showing what changed semantically, not just textually.

Examples: sqry diff main HEAD # Compare branches sqry diff v1.0.0 v2.0.0 –json # Release comparison sqry diff HEAD~5 HEAD –kind function # Functions only sqry diff main feature –change-type added # New symbols only

Fields

§base: String

Base git ref (commit, branch, or tag).

§target: String

Target git ref (commit, branch, or tag).

§path: Option<String>

Path to git repository (defaults to current directory).

Can be the repository root or any path within it - sqry will walk up the directory tree to find the .git directory.

§limit: usize

Maximum total results to display (default: 100).

§kind: Option<String>

Filter by symbol kinds (comma-separated).

§change_type: Option<String>

Filter by change types (comma-separated).

Valid values: added, removed, modified, renamed, signature_changed

Example: –change-type added,modified

§

Hier

Hierarchical semantic search (RAG-optimized)

Performs semantic search with results grouped by file and container, optimized for retrieval-augmented generation (RAG) workflows.

Examples: sqry hier “kind:function” # All functions, grouped sqry hier “auth” –max-files 10 # Limit file groups sqry hier –kind function “test” # Filter by kind sqry hier –context 5 “validate” # More context lines

Fields

§query: String

Search query.

§path: Option<String>

Search path (defaults to current directory).

§limit: usize

Maximum symbols before grouping (default: 200).

§max_files: usize

Maximum files in output (default: 20).

§context: usize

Context lines around matches (default: 3).

§kind: Option<String>

Filter by symbol kinds (comma-separated).

§lang: Option<String>

Filter by languages (comma-separated).

§

Mcp

Configure MCP server integration for AI coding tools

Auto-detect and configure sqry MCP for Claude Code, Codex, and Gemini CLI. The setup command writes tool-specific configuration so AI coding assistants can use sqry’s semantic code search capabilities.

Examples: sqry mcp setup # Auto-configure all detected tools sqry mcp setup –tool claude # Configure Claude Code only sqry mcp setup –scope global –dry-run # Preview global config changes sqry mcp status # Show current MCP configuration sqry mcp status –json # Machine-readable status

Fields

§command: McpCommand

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Command

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Command

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more