Skip to main content
Search for relevant code blocks in the current project using block-based semantic search. This is the default search method that returns structured code blocks with context.

Syntax

adist get <query> [options]

Arguments

query
string
required
The search query to match against code blocks and file contents.

Options

-n, --max-results
number
default:"10"
Maximum number of results to display.
-l, --limit-lines
number
default:"20"
Maximum number of content lines to show per block.

Behavior

  • Uses block-based indexing to find relevant code sections
  • Displays matching blocks with syntax highlighting
  • Shows file summaries if available when no specific matches found
  • Falls back to project summary for general queries
  • Supports both code content and file path searches

Block Types

The search returns different types of code blocks:
  • document - File-level information with summary
  • function - Function declarations
  • class - Class definitions
  • codeblock - Code fences in markdown files
  • section - Logical code sections
  • heading - Markdown headings

Examples

adist get "authentication logic"

Search with custom result limit

adist get "database queries" --max-results 5

Limit displayed lines per block

adist get "API endpoints" --limit-lines 10
adist get "config.ts"

Output Format

Results are displayed with:
  • File path and name
  • File summary (if available)
  • Block type and line numbers
  • Block title (for functions, classes, etc.)
  • Syntax-highlighted content

Build docs developers (and LLMs) love