Skip to main content
Switch the currently active adist project. You can specify a project name directly or choose from an interactive list.

Syntax

adist switch [projectName]

Arguments

projectName
string
Optional name of the project to switch to. If omitted, displays an interactive selection menu.

Behavior

With Project Name

When you provide a project name:
  1. Searches for the project by name
  2. Switches to it immediately if found
  3. Shows available projects if name not found

Without Project Name

When no project name is provided:
  1. Displays an interactive list of all projects
  2. Use arrow keys to navigate
  3. Press Enter to select
  4. Shows 10 projects per page for easy scrolling

Examples

Switch to specific project

adist switch my-project

Interactive selection

adist switch
# Displays:
# ? Select a project:
#   > my-project
#     another-project
#     api-server

Switch to project with similar name

adist switch api
# If exact match not found, shows:
# ✘ Project "api" not found.
# 📚 Available Projects:
#   api-server
#   api-client

Output

On successful switch:
✓ Switched to project: my-project
Run adist get "<query>" to search for documents.

Error Handling

  • If no projects exist, suggests using adist init
  • If project name not found, lists available projects
  • Validates project data before switching

Current Project Indicator

After switching, the current project is used by:

Build docs developers (and LLMs) love