
Grepai Storage Postgres
- 512 installs
- 18 repo stars
- Updated February 1, 2026
- yoanbernabeu/grepai-skills
grepai-storage-postgres is a GrepAI configuration skill that points semantic code search at a shared PostgreSQL plus pgvector index so developers who need team-wide or large-tree indexing can store embeddings in a concur
About
grepai-storage-postgres is a GrepAI storage-backend skill that configures PostgreSQL 14+ with the pgvector extension as the embedding index for semantic code search. Developers reach for it in team environments needing a shared index, codebases exceeding 10K files, concurrent indexer access, or reuse of existing PostgreSQL infrastructure. The skill covers database user permissions, network access to the server, and the tradeoffs versus local storage backends. Prerequisites include create-table permissions and reachable PostgreSQL with pgvector installed. Once configured, multiple developers or CI jobs can query and update the same vector index without rebuilding per-machine indexes.
- PostgreSQL 14+ with pgvector as GrepAI storage backend
- Docker one-liner for local pgvector/pg16 dev database
- Team-shared index with concurrent search for 10K+ file codebases
- Documents apt install and compile-from-source pgvector paths
- Compares benefits: persistence, scalability, and familiar SQL tooling
Grepai Storage Postgres by the numbers
- 512 all-time installs (skills.sh)
- +5 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #122 of 911 Databases skills by installs in the Skillselion catalog
- Security screen: HIGH risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-storage-postgresAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 512 |
|---|---|
| repo stars | ★ 18 |
| Security audit | 2 / 3 scanners passed |
| Last updated | February 1, 2026 |
| Repository | yoanbernabeu/grepai-skills ↗ |
How do you share GrepAI indexes on PostgreSQL?
Point GrepAI semantic code search at a shared PostgreSQL + pgvector index for team repos and large trees.
Who is it for?
Teams indexing large monorepos who already run PostgreSQL and need concurrent semantic search access.
Skip if: Solo developers on small repos who are fine with GrepAI's default local storage backend.
When should I use this skill?
GrepAI semantic search must scale to 10K+ files or be shared across multiple machines on PostgreSQL.
What you get
A shared pgvector-backed GrepAI index reachable by multiple clients over PostgreSQL.
- shared pgvector index
- GrepAI PostgreSQL connection config
By the numbers
- Requires PostgreSQL 14+ with pgvector extension
- Recommended for large codebases with 10K+ files
Files
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)
# 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:pg16Option 2: Install on Existing PostgreSQL
# 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 installThen enable the extension:
-- Connect to your database
CREATE EXTENSION IF NOT EXISTS vector;Option 3: Managed Services
- Supabase: pgvector included by default
- Neon: pgvector available
- AWS RDS: Install pgvector extension
- Azure Database: pgvector available
Configuration
Basic Configuration
# .grepai/config.yaml
store:
backend: postgres
postgres:
dsn: postgres://user:password@localhost:5432/grepaiWith Environment Variable
store:
backend: postgres
postgres:
dsn: ${DATABASE_URL}Set the environment variable:
export DATABASE_URL="postgres://user:password@localhost:5432/grepai"Full DSN Options
store:
backend: postgres
postgres:
dsn: postgres://user:password@host:5432/database?sslmode=requireDSN components:
user: Database usernamepassword: Database passwordhost: Server hostname or IP5432: Port (default: 5432)database: Database namesslmode: SSL mode (disable, require, verify-full)
SSL Modes
| Mode | Description | Use Case |
|---|---|---|
disable | No SSL | Local development |
require | SSL required | Production |
verify-full | SSL + verify certificate | High security |
# Production with SSL
store:
backend: postgres
postgres:
dsn: postgres://user:pass@prod.db.com:5432/grepai?sslmode=requireDatabase Schema
GrepAI automatically creates these tables:
-- Vector embeddings table
CREATE TABLE IF NOT EXISTS embeddings (
id SERIAL PRIMARY KEY,
file_path TEXT NOT NULL,
chunk_index INTEGER NOT NULL,
content TEXT NOT NULL,
start_line INTEGER,
end_line INTEGER,
embedding vector(768), -- Dimension matches your model
created_at TIMESTAMP DEFAULT NOW(),
UNIQUE(file_path, chunk_index)
);
-- Index for vector similarity search
CREATE INDEX ON embeddings USING ivfflat (embedding vector_cosine_ops);Verifying Setup
Check pgvector Extension
-- Connect to database
psql -U grepai -d grepai
-- Check extension is installed
SELECT * FROM pg_extension WHERE extname = 'vector';
-- Check GrepAI tables exist (after first grepai watch)
\dtTest Connection from GrepAI
# Check status
grepai status
# Should show PostgreSQL backend infoPerformance Tuning
PostgreSQL Configuration
For better vector search performance:
-- Increase work memory for vector operations
SET work_mem = '256MB';
-- Adjust for your hardware
SET effective_cache_size = '4GB';
SET shared_buffers = '1GB';Index Tuning
For large indices, tune the IVFFlat index:
-- More lists = faster search, more memory
CREATE INDEX ON embeddings
USING ivfflat (embedding vector_cosine_ops)
WITH (lists = 100); -- Adjust based on row countRule of thumb: lists = sqrt(rows)
Concurrent Access
PostgreSQL handles concurrent access automatically:
- Multiple
grepai searchcommands work simultaneously - One
grepai watchdaemon per codebase - Many users can share the same index
Team Setup
Shared Database
All team members point to the same database:
# Each developer's .grepai/config.yaml
store:
backend: postgres
postgres:
dsn: postgres://team:secret@shared-db.company.com:5432/grepaiPer-Project Databases
For isolated projects, use separate databases:
# Create databases
createdb -U postgres grepai_projecta
createdb -U postgres grepai_projectb# Project A config
store:
backend: postgres
postgres:
dsn: postgres://user:pass@localhost:5432/grepai_projectaBackup and Restore
Backup
pg_dump -U grepai -d grepai > grepai_backup.sqlRestore
psql -U grepai -d grepai < grepai_backup.sqlMigrating from GOB
1. Set up PostgreSQL with pgvector 2. Update configuration:
store:
backend: postgres
postgres:
dsn: postgres://user:pass@localhost:5432/grepai3. Delete old index:
rm .grepai/index.gob4. Re-index:
grepai watchCommon Issues
❌ Problem: FATAL: password authentication failed ✅ Solution: Check DSN credentials and pg_hba.conf
❌ Problem: ERROR: extension "vector" is not available ✅ Solution: Install pgvector:
sudo apt install postgresql-16-pgvector
# Then: CREATE EXTENSION vector;❌ Problem: ERROR: type "vector" does not exist ✅ Solution: Enable extension in the database:
CREATE EXTENSION IF NOT EXISTS vector;❌ Problem: Connection refused ✅ Solution:
- Check PostgreSQL is running
- Verify host and port
- Check firewall rules
❌ Problem: Slow searches ✅ Solution:
- Add IVFFlat index
- Increase
work_mem - Vacuum and analyze tables
Best Practices
1. Use environment variables: Don't commit credentials 2. Enable SSL: For remote databases 3. Regular backups: pg_dump before major changes 4. Monitor performance: Check query times 5. Index maintenance: Regular VACUUM ANALYZE
Output Format
PostgreSQL storage status:
✅ PostgreSQL Storage Configured
Backend: PostgreSQL + pgvector
Host: localhost:5432
Database: grepai
SSL: disabled
Contents:
- Files: 2,450
- Chunks: 12,340
- Vector dimension: 768
Performance:
- Connection: OK
- IVFFlat index: Yes
- Search latency: ~50msRelated skills
How it compares
Choose grepai-storage-postgres over local GrepAI storage when multiple developers or CI jobs must query the same semantic index.
FAQ
When should grepai-storage-postgres be used?
grepai-storage-postgres fits team environments with shared indexes, codebases over 10K files, concurrent access needs, or existing PostgreSQL infrastructure. Use it when local GrepAI storage cannot scale or share across machines.
What are the prerequisites for grepai-storage-postgres?
grepai-storage-postgres requires PostgreSQL 14+ with the pgvector extension, a database user with create table permissions, and network access to the PostgreSQL server hosting the shared index.
Is Grepai Storage Postgres safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.