grepai-storage-postgreslisted
Install: claude install-skill NNIIKKKKII/grepai-skills
# GrepAI Storage with PostgreSQL
This skill covers using PostgreSQL with the pgvector extension as the storage backend for GrepAI.
## When to Use This Skill
- Team environments with shared index
- Large codebases (10K+ files)
- Need concurrent access
- Integration with existing PostgreSQL infrastructure
## Prerequisites
1. PostgreSQL 14+ with pgvector extension
2. Database user with create table permissions
3. Network access to PostgreSQL server
## Advantages
| Benefit | Description |
|---------|-------------|
| 👥 **Team sharing** | Multiple users can access same index |
| 📏 **Scalable** | Handles large codebases |
| 🔄 **Concurrent** | Multiple simultaneous searches |
| 💾 **Persistent** | Data survives machine restarts |
| 🔧 **Familiar** | Standard database tooling |
## Setting Up PostgreSQL with pgvector
### Option 1: Docker (Recommended for Development)
```bash
# Run PostgreSQL with pgvector
docker run -d \
--name grepai-postgres \
-e POSTGRES_USER=grepai \
-e POSTGRES_PASSWORD=grepai \
-e POSTGRES_DB=grepai \
-p 5432:5432 \
pgvector/pgvector:pg16
```
### Option 2: Install on Existing PostgreSQL
```bash
# Install pgvector extension (Ubuntu/Debian)
sudo apt install postgresql-16-pgvector
# Or compile from source
git clone https://github.com/pgvector/pgvector.git
cd pgvector
make
sudo make install
```
Then enable the extension:
```sql
-- Connect to your database
CREATE EXTENSION IF NOT EXISTS vector;
```
### Option 3: Managed Services
- **Sup