GrepAI Storage with GOB
This skill covers using GOB (Go Binary) as the storage backend for GrepAI, the default and simplest option.
When to Use This Skill
- Single developer projects
- Small to medium codebases
- Simple setup without external dependencies
- Local development environments
What is GOB Storage?
GOB is Go's native binary serialization format. GrepAI uses it to store:
- Vector embeddings
- File metadata
- Chunk information
Everything is stored in a single local file.
Advantages
Limitations
Configuration
Default Configuration
GOB is the default backend. Minimal config:
Explicit Configuration
Storage Location
GOB storage creates files in your project's .grepai/ directory:
File Sizes
Approximate .grepai/index.gob sizes:
Operations
Creating the Index
Checking Index Status
Backing Up the Index
Clearing the Index
Moving to a New Machine
Performance Considerations
Memory Usage
GOB loads the entire index into RAM for searches:
Search Speed
GOB provides fast searches for typical codebases:
When to Upgrade
Consider PostgreSQL or Qdrant when:
- Index exceeds 1 GB
- Need concurrent access
- Want to share index across team
- Codebase has 50K+ files
.gitignore Configuration
Add .grepai/ to your .gitignore:
Why: The index is machine-specific because:
- Contains binary embeddings
- Tied to the embedding model used
- Each machine should generate its own
Sharing Index (Not Recommended)
While you can copy the index file, it's not recommended because:
- Must use identical embedding model
- File paths are absolute
- Different machines may have different code versions
Better approach: Each developer runs their own grepai watch.
Migrating to Other Backends
To PostgreSQL
- Update config:
- Re-index:
To Qdrant
- Update config:
- Re-index:
Common Issues
❌ Problem: Index file too large ✅ Solution: Add more ignore patterns or migrate to PostgreSQL/Qdrant
❌ Problem: Slow searches on large codebase ✅ Solution: Migrate to Qdrant for better performance
❌ Problem: Corrupted index ✅ Solution: Delete and re-index:
❌ Problem: "Index not found" error
✅ Solution: Run grepai watch to create the index
Best Practices
- Use for small/medium projects: Up to ~10K files
- Add to .gitignore: Don't commit the index
- Backup before major changes: Copy index.gob before experiments
- Re-index after model changes: If you change embedding models
- Monitor file size: Migrate if index exceeds 1GB
Output Format
GOB storage status:


