Skip to main content
This guide will walk you through setting up your first project with Adist and exploring its core features.

Prerequisites

Before you begin, make sure you have:
  • Installed Adist globally (npm install -g adist)
  • Configured an LLM provider using adist llm-config
  • Set your API key environment variable (if using Anthropic or OpenAI)
Need help with installation? Check out the installation guide.

Initialize your first project

1

Navigate to your project directory

Open your terminal and change to the directory you want to index:
cd /path/to/your/project
2

Run the init command

Initialize Adist for your project:
adist init my-project
Replace my-project with a meaningful name for your project.
3

Choose summarization option

Adist will ask if you want to enable LLM summarization:
Would you like to enable LLM summarization? (y/N):
  • Type y to generate AI summaries of your code (incurs API costs)
  • Type n or press Enter to skip summarization (you can enable it later)
Enabling summarization will make API calls to your configured LLM provider, which may incur costs depending on your project size.
4

Wait for indexing to complete

Adist will:
  1. Scan all supported files in your directory
  2. Create block-based indices for semantic search
  3. Optionally generate summaries (if enabled)
This may take a few minutes depending on your project size.
Your project is now indexed and ready to use!
Now that your project is indexed, you can search it using natural language:
adist get "authentication logic"
This will return relevant code blocks related to authentication in your project.
Use specific, descriptive queries for better results. The search uses semantic understanding, so it can find conceptually related code even if the exact words don’t match.

Ask questions about your code

Use the query command to ask specific questions:
adist query "How does the authentication system work?"
The AI will:
  1. Search for relevant code in your project
  2. Analyze the context
  3. Provide a detailed explanation with code references
adist query "How does the authentication system work?"

Start an interactive chat session

For a more conversational experience, use chat mode:
adist chat
This starts an interactive session where you can:
  • Ask multiple questions in sequence
  • Build on previous answers with follow-up questions
  • Get code explanations with syntax highlighting
Type /exit to end the chat session.

Chat example

$ adist chat

💬 Chat Mode - Ask questions about your project
Type /exit to quit

You: What are the main components of this project?

AI: Based on the codebase, the main components are:
1. Authentication module (src/auth/)
2. API routes (src/routes/)
3. Database layer (src/db/)
...

You: Tell me more about the authentication module

AI: The authentication module uses JWT tokens...

Working with multiple projects

List all projects

View all your indexed projects:
adist list

Switch between projects

Switch to a different project:
adist switch other-project
Or run without a project name to select from a list interactively:
adist switch

Reindex a project

If you’ve made changes to your code, reindex the current project:
adist reindex
To also regenerate summaries:
adist reindex --summarize
Reindexing with --summarize will regenerate all summaries and incur API costs.

View project summaries

If you enabled summarization during initialization, you can view summaries:
adist summary

Common commands reference

Here’s a quick reference of the most commonly used commands:
CommandDescription
adist init <name>Initialize a new project
adist get "<query>"Search for code using natural language
adist query "<question>"Ask AI questions about your code
adist chatStart an interactive chat session
adist listList all indexed projects
adist switch <name>Switch to a different project
adist reindexReindex the current project
adist summaryView project or file summaries
adist llm-configConfigure LLM provider settings

Tips for better results

Use descriptive queries

Instead of “auth”, try “user authentication and login flow”

Ask specific questions

“How are API errors handled?” works better than “tell me about errors”

Reindex after major changes

Run adist reindex after adding new features or refactoring

Use chat for exploration

Chat mode is great for understanding unfamiliar codebases

Next steps

Now that you know the basics, explore more features:
Need help? Run adist --help or adist <command> --help for detailed command information.

Build docs developers (and LLMs) love