Skip to main content
Ask natural language questions about your project and get AI-powered answers based on your codebase.

Syntax

adist query <question> [options]

Arguments

question
string
required
The natural language question to ask about your project.

Options

--stream
boolean
Enable streaming responses for real-time output.Note: Code highlighting may not work properly in streaming mode.

Behavior

  1. Searches for relevant code blocks using semantic search
  2. Retrieves project summaries if available and relevant
  3. Sends context to configured LLM provider
  4. Returns AI-generated answer with code examples
  5. Displays cost estimation and context information

Examples

Ask about functionality

adist query "How does authentication work in this project?"

Request code examples

adist query "Show me examples of API error handling"

Get project overview

adist query "What is this project about?"

Use streaming mode

adist query "Explain the database schema" --stream

Output Information

The command displays:
  • Debug Info: Number of documents and blocks found
  • Document Tree: Hierarchical view of relevant files and blocks
  • Answer: AI-generated response with syntax highlighting
  • Cost: Estimated API cost for the query
  • Context Status: Whether cached context was used
  • Query Complexity: Complexity rating (low/medium/high)

Context Caching

The command uses context caching to reduce costs:
  • Project context is cached per project ID
  • Repeated queries reuse cached context
  • Cache indicator shown in output

Requirements

  • Active project must be selected
  • LLM provider must be configured (see adist llm-config)
  • Project should be indexed with block-based indexing

Environment Variables

ANTHROPIC_API_KEY
string
Required if using Anthropic Claude provider.
OPENAI_API_KEY
string
Required if using OpenAI provider.

Build docs developers (and LLMs) love