payp is Claude Code for data engineers. A chat-first CLI that connects live databases to the model of your choice — with the safest AI-to-SQL workflow available.
payp introspects your database on connect and builds a tiered context (T0–T3) so the model sees the right tables, columns, and relationships — even across 4,000-table schemas.
Route through OpenRouter and talk to Claude, GPT, Gemini, Qwen, or Ollama against PostgreSQL, MySQL, or Oracle — in the same session, with one connection file.
Every destructive statement ships with auto-generated reverse-SQL. Every DML gets a snapshot up to 10K rows. Every operation lands in a SQLite audit log.
ALTER TABLE ships with its undo. UPDATE and DELETE keep a snapshot. Type /rollback and the last operation unwinds — even days later.payp.toml profiles, schema annotations, business glossaries, and saved queries live in your repo. Secrets stay in OS keyring or .cred files with chmod 600. Clone the repo, add your key, you're running.| Capability | Claude Code + MCP | payp |
|---|---|---|
| Schema awareness | Flat dump | Tiered T0–T3, 4,000+ tables |
| Reverse-SQL on DDL/DML | — | Auto-generated, every statement |
| DML row snapshots | — | Up to 10K rows, rollback anytime |
| Two-model validation | — | Executor + reviewer, different providers |
| Transaction log | — | SQLite audit trail, git-reflog style |
| Cross-DB ops (PG / MySQL / Oracle) | — | One session, dialect-aware |
| EXPLAIN interpreted by LLM | — | Plan analysis + index suggestions |
| Streaming export (CSV/JSON/Parquet/Excel) | — | Built-in, handles millions of rows |
| Security modes | Allow / deny | Manual · YOLO · Secure · Secure-Auto |
| Persona | Generic coder | DE · Architect · Analyst · DBA · Security |
Describe the query in plain English. payp writes dialect-aware SQL, explains the join strategy, and formats results before showing you anything. Tab to edit, Enter to run.
See more patterns →Ask for a breakdown, get a terminal bar chart. Ask for a trend, get a line plot. Ask for a dashboard, launch a full TUI with live metrics. All rendered with plotext, all keyboard-driven.
Open a dashboard →Switch between PostgreSQL, MySQL, and Oracle mid-session. Diff schemas between prod and staging. Compare row counts. Generate a migration that runs identically across dialects.
See cross-db ops →Every SQL statement is shown before execution with its reverse-SQL. Enter to run, Tab to edit inline, Esc to cancel.
Auto-execute read-only queries. Every destructive statement (INSERT, UPDATE, DELETE, DDL) stops for explicit approval with full context.
Executor model writes SQL. A different reviewer model inspects it. Read-only queries pass through. Destructive statements need both signatures.
Auto-execute everything, no prompts. Reserved for ephemeral environments where the worst case is a docker compose down -v.
Python 3.11+ via pipx, keeps your global env clean.
Anthropic, OpenAI, Google, Ollama, or any model via OpenRouter with one key.
PostgreSQL, MySQL, or Oracle. Schema introspects automatically.
Ask for data in natural language. payp writes the SQL, you approve it.
payp is MIT-licensed and community-driven. File an issue, open a PR, or join the room where the roadmap gets argued out.