Terraform-style, declarative Postgres schema migration. Agent friendly.
github.com/pgplex/pgschemaIndexed at 319b88cUp to date with upstream
`pgschema` is a state-based Postgres schema engine that consumes a desired schema (DDL plus `pgschema.toml` and CSV `\copy` data), builds an IR for inspection and diff planning, and produces an ordered apply plan of SQL artifacts that reconcile a live database to the desired state—used by developers who want Terraform-like “plan then apply” workflows for real-world Postgres features (RLS, partitioning, identity columns, grants, triggers, and more). It works end-to-end by dumping or loading your current schema, normalizing and analyzing objects, generating a preview/plan, and then applying changes with embedded Postgres validation so you don’t need a manual migration history or a separate shadow database.
Written by gpt-5.4-nano from the index
1,504 files and 2,775 symbols in 7 modules, led by Go (121 files) and Shell (19).
Code health
This codebase scores 6.8 out of 10 for code health, which we rate fair. It also scores maintainability 7.9 and static performance 9.7 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 22 of 1,504 files are git hotspots, and they average 2.7 — which is where the fixes pay off most.
On the leaderboards:#9 of 19 Go repos
Nothing stands out in the week to Sep 10, the last indexed commit.
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
Point Claude Code, Cursor, Codex or VS Code at this repository. Your agent gets the index this page is built from: cited answers, callers, history and health for any file.
https://api.repowise.dev/mcp/pgplex/pgschemaOne command, run anywhere. Adds the server to your local Claude Code config.
Docsclaude mcp add --transport http repowise https://api.repowise.dev/mcp/pgplex/pgschema \ --header "Authorization: Bearer rw_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
This repo is public, so anyone with a Repowise account and an API key can connect.
Try asking
Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.
Sign in with GitHub and we check that you are an admin or maintainer of pgplex/pgschema. Then add a badge to the README that links readers here.
Add this URL as a custom connector and sign in with repowise when asked. No API key to copy.
https://api.repowise.dev/mcp/pgplex/pgschemaFor maintainers
Every badge is public, cached, and updates on its own after every index. Nothing to install.
Links to this page, with no score on it. Adding it also re-indexes the repo every week.
[](https://repowise.dev/repo/pgplex/pgschema?src=badge_wiki)The repo's health score out of 10, from the latest index.
[](https://repowise.dev/repo/pgplex/pgschema?src=badge_health)A larger card with the score, its change since the last index, and when it was measured. The HTML version follows the reader's light or dark theme.
[](https://repowise.dev/repo/pgplex/pgschema?src=badge_card)Terraform-style, declarative Postgres schema migration. Agent friendly. This page is a map of the pgplex/pgschema repository, written primarily in Go, rebuilt from the source each time it is indexed. Repowise parses every symbol, computes a dependency graph, scores per-file code health from complexity, duplication, test coverage and churn, mines git history for hotspots and ownership, and lifts the architectural decisions into documentation you can read here or query through MCP.
The codebase has 1,504 files and 2,775 symbols in 7 modules, led by Go, Shell and Python. Code health is 6.8 out of 10, rated fair.
Use the links above to open each view, or connect this repository to your agent for grounded answers inside Claude, Cursor, Codex or VS Code.