Utility scripts for AST-RAG indexing and maintenance.
Index all folders sequentially (one at a time).
Use case: Stable indexing without parallelism issues.
./scripts/index-sequential.shFeatures:
- Applies Neo4j schema once at the beginning
- Indexes folders one by one (no parallel conflicts)
- Skips already completed folders (checks
/tmp/index_*.log) - Runs quality evaluation at the end
Time: ~3-4 hours for full codebase
Index only folders that haven't been completed yet.
Use case: Resume interrupted indexing.
./scripts/index-remaining.shFeatures:
- Automatically detects completed folders from logs
- Only indexes remaining folders
- Applies schema once
- Runs quality evaluation at the end
Time: Depends on how many folders remain
Most indexing tasks are now available via CLI:
ast-rag index-folder /path/to/folder --workers 4 --batch-size 50ast-rag index-folder /path/to/folder --no-schemaast-rag evaluate --allast-rag evaluate --query benchmarks/queries/def_001.json# 1. Full index
ast-rag init /path/to/codebase
# 2. Verify quality
ast-rag evaluate --all# Index specific changed folder
ast-rag index-folder ./src/modified_module --no-schema# Index remaining folders
./scripts/index-remaining.sh- Use CLI for single folders -
ast-rag index-folder - Use scripts for bulk operations -
./scripts/index-remaining.sh - Always run evaluation after indexing -
ast-rag evaluate --all - Target >80% pass rate for production use
- Folder logs:
/tmp/index_*.log(one per folder) - Script logs:
index_sequential.log,index_remaining.log - Evaluation results:
benchmarks/results/evaluation.json
- Check Neo4j connection:
cypher-shell "MATCH (n) RETURN count(n)" - Check memory:
free -h - Try sequential indexing:
./scripts/index-sequential.sh
- Re-run evaluation:
ast-rag evaluate --all - Check if all folders indexed:
grep "COMPLETE" /tmp/index_*.log | wc -l - Index remaining:
./scripts/index-remaining.sh
- Apply schema manually:
ast-rag init /tmp/empty --commit test - Or use
--no-schemaflag for subsequent indexing