Skip to main content
Reindex a project or all projects using block-based indexing. This updates the search index to reflect changes in your codebase.

Syntax

adist reindex [projectName] [options]

Arguments

projectName
string
Optional project name to reindex. If omitted, reindexes the current project.

Options

-a, --all
boolean
Reindex all projects instead of just one.
-s, --summarize
boolean
Generate LLM summaries for files during indexing.Note: This will incur API costs based on codebase size.

Behavior

Block-Based Indexing

The reindex command uses intelligent block-based indexing that:
  • Parses files into semantic blocks (functions, classes, sections)
  • Extracts metadata (titles, line numbers, types)
  • Creates searchable embeddings for each block
  • Preserves code structure and context

Summarization

When --summarize is used:
  • Generates AI summaries for each file
  • Creates an overall project summary
  • Stores summaries for use in search results
  • Improves context for AI queries

Examples

Reindex current project

adist reindex

Reindex with summaries

adist reindex --summarize

Reindex specific project

adist reindex my-project

Reindex specific project with summaries

adist reindex my-api --summarize

Reindex all projects

adist reindex --all

Reindex all projects with summaries

adist reindex --all --summarize

When to Reindex

Reindex your project when:
  • You’ve added new files
  • Code has been significantly modified
  • Search results seem outdated
  • You want to add summaries to an existing project
  • Switching from legacy to block-based indexing

Output

Shows:
  • Indexing progress
  • Number of files processed
  • Success/error status
  • Summary generation status (if enabled)

Environment Variables

ANTHROPIC_API_KEY
string
Required when using --summarize flag.

Performance Notes

  • Block-based indexing is more thorough than legacy indexing
  • Summarization significantly increases processing time
  • Large codebases may take several minutes to index
  • Progress is shown during the indexing process

Build docs developers (and LLMs) love