Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

pgroll

$ pgroll Official Med Risk
Xata · Database & Data · Apache-2.0 · macos / linux / windows

Developed by Xata, pgroll implements lock-safe, zero-downtime PostgreSQL migrations using dual-version schema views and background backfills. Agents can pgroll validate JSON/YAML migration files, inspect pgroll status, pgroll pull --json, and safely abort active rollouts with pgroll rollback.

FCRS-1.0 Score
84 /100
Good
Medium Confidence
Zero-Friction Install
brew install xataio/pgroll/pgroll
CLI vs MCP Decision CLI Preferred vs MCP

pgroll executes multi-step expand/contract DDL and pgroll validate checks directly on local migration JSON/YAML files.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Uses structured JSON/YAML migration specs, pgroll validate, and pgroll pull --json, though pgroll status prints text rather than JSON.

  • Native JSON migration specs and pgroll pull --json
  • pgroll validate runs pre-flight syntax checks
Trust & Safety 23 / 25

Separating pgroll start (expand) from pgroll complete (contract) enables instant pgroll rollback without downtime or data loss.

  • Expand/contract lifecycle with instant pgroll rollback prior to complete
Setup & Portability 13 / 15

Single Go binary distributed via Homebrew tap, go install, and GitHub releases across macOS, Linux, and Windows.

  • Static Go binary with brew install xataio/pgroll/pgroll
Utility & Efficiency 13 / 15

Automates complex multi-step expand/contract triggers, backfills, and dual-schema views that are error-prone to hand-code in raw SQL.

  • Automates zero-downtime dual-version schema views
Maintenance & Lineage 8 / 10

Actively developed by Xata (xataio/pgroll) under Apache-2.0 license.

  • Official xataio/pgroll repository under Apache-2.0
Docs & Verifiability 7 / 10

Good official docs and migration examples at pgroll.com/docs/, though operation schemas evolve rapidly across versions.

  • Operation reference and tutorials at pgroll.com/docs

Security, Auth & Guardrails

Auth Modes
Env API Key Config File
Credential Storage

Reads --postgres-url or PGROLL_PG_URL (plus standard libpq PG* env vars); does not persist credentials separately.

Side Effects
Read-Only Remote Write Destructive
Cost & Quotas

Apache-2.0 open-source CLI; free to use on any PostgreSQL instance.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# pgroll Agent Rules
- Run `pgroll validate` and `pgroll status` before starting any migration.
- Treat `pgroll start` as reversible via `pgroll rollback`, but require explicit approval before `pgroll complete` drops legacy columns.

Agent-Ready Command Recipes

Safe Read-Only Queries

Validate migration files before connecting
pgroll validate migrations/

Checks JSON/YAML migration syntax and structural validity without applying changes.

Inspect current rollout status and pull JSON history
pgroll status --postgres-url "$PGROLL_PG_URL"

Reports active or latest completed schema version and migration state.

Controlled Writes & Previews

Start a reversible expand-phase migration
pgroll start migrations/01_add_col.yaml --postgres-url "$PGROLL_PG_URL"

Creates the new schema view alongside the existing version so old and new app builds stay compatible until pgroll complete.

Strengths for Agents

  • + Built-in pgroll rollback cleanly aborts active expand migrations with zero downtime.
  • + Dual-version schema views let old and new application code run concurrently.
  • + JSON/YAML declarative migration specs and pgroll validate integrate neatly into CI.

Caveats & Pitfalls

  • ! PostgreSQL-only; requires pgroll init state tables and setting search_path in client connections.
  • ! pgroll status outputs human-readable text rather than --json.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI