sync
Purpose
Synchronize existing project indexes with the current filesystem state.
Usage
idx sync
Arguments
- None.
Flags
- Global:
--quiet,-q.
Behavior and Side Effects
- Must be executed from the Git project root.
- Requires the root index at
<project-root>/.idx/index.idx. - Discovers indexed directories and currently eligible directories from
.gitignore. - Removes stale
.idxdirectories that are no longer eligible. - Re-indexes eligible directories only when checksums indicate changes.
Output
- Success:
โ Project indices synchronized.
Errors
- Current directory is not project root.
- Root index does not exist:
sync requires project root to be indexed... run idx init first. .gitignorematcher cannot be loaded.- Directory traversal/read errors.
- Index/checksum persistence errors.
Examples
idx sync