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
Navigate to your project directory
Open your terminal and change to the directory you want to index:
Run the init command
Initialize Adist for your project:Replace
my-project with a meaningful name for your project.Choose summarization option
Adist will ask if you want to enable LLM summarization:
- Type
yto generate AI summaries of your code (incurs API costs) - Type
nor press Enter to skip summarization (you can enable it later)
Your project is now indexed and ready to use!
Try your first search
Now that your project is indexed, you can search it using natural language:Ask questions about your code
Use thequery command to ask specific questions:
- Search for relevant code in your project
- Analyze the context
- Provide a detailed explanation with code references
Start an interactive chat session
For a more conversational experience, use chat mode:- 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
Working with multiple projects
List all projects
View all your indexed projects:Switch between projects
Switch to a different project:Reindex a project
If you’ve made changes to your code, reindex the current project:View project summaries
If you enabled summarization during initialization, you can view summaries:Common commands reference
Here’s a quick reference of the most commonly used commands:| Command | Description |
|---|---|
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 chat | Start an interactive chat session |
adist list | List all indexed projects |
adist switch <name> | Switch to a different project |
adist reindex | Reindex the current project |
adist summary | View project or file summaries |
adist llm-config | Configure 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 refactoringUse chat for exploration
Chat mode is great for understanding unfamiliar codebases
Next steps
Now that you know the basics, explore more features:- Learn about block-based indexing for understanding how Adist analyzes code
- Explore advanced search techniques for finding exactly what you need
- Set up multiple LLM providers to compare results
- Check out best practices for working with large codebases
Need help? Run
adist --help or adist <command> --help for detailed command information.