sync
Purpose
Synchronize existing project indexes with the current filesystem state.
Usage
Arguments
Flags
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
.idx directories 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.
.gitignore matcher cannot be loaded.
- Directory traversal/read errors.
- Index/checksum persistence errors.
Examples