Skip to main content

index Command

Build/update graph + BSG artifacts for a repository.

Usage

batho index --root /path/to/repo --verbose

Flags

FlagDefaultDescription
--max-workers0 (auto)Worker threads — 0 uses CPU × 2, capped at 32
--max-file-size-kb500Skip files larger than this
--extensionsall supportedRestrict indexing to selected extensions
--fulloffDisable incremental reuse and force full rebuild
--forceoffClear AST cache before indexing
--no-ast-cacheoffBypass AST cache for the current indexing run
--base-snapshotNoneOptional base snapshot ID for incremental indexing (auto-detects latest if omitted)
--output-jsonnoneOptional override path for graph JSON output
--metrics-outputfrom configWrite metrics JSON to explicit path
--verboseoffPrint progress to stdout
--snapshotoffCreate snapshot after indexing
--snapshot-labelnoneAttach label to generated snapshot

Examples

# Full index
batho index --root /path/to/repo --verbose

# Force full rebuild (disable incremental path)
batho index --root /path/to/repo --full

# Force cache reset before indexing (clears file cache + AST cache)
batho index --root /path/to/repo --force

# Deterministic fresh parse run (bypass AST cache for this invocation)
batho index --root /path/to/repo --force --no-ast-cache --verbose

# Index and create snapshot
batho index --root /path/to/repo --snapshot --snapshot-label "release-candidate"