-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Berkay Günaydın edited this page Aug 6, 2026
·
2 revisions
propq runs SQL queries across multiple MySQL/MariaDB servers concurrently from a single command. One binary, one TOML config file, zero daemons.
# Run a query on every production database
propq --sql "SELECT COUNT(*) FROM users" -s prod
# Migration file with filter
propq -f migration.sql -d "^shop_"
# Pipe it
echo "SELECT NOW(), DATABASE()" | propq -s staging
# Live streaming results
propq -s "www1|www6|www7" --sql "SELECT VERSION()" --stream
# CI-friendly JSON
propq --sql "SHOW TABLE STATUS" -s prod --json
# See what would happen, safely
propq --sql "DROP TABLE temp" --dry-run- ⚡ Async execution — goroutine pool + per-server semaphores. Default mode runs once per server (~50 ms);
-aswitches to per-database mode. - 📥 4 SQL sources — inline (
--sql), file (-f), pipe (stdin), editor (-e). - 🎯 Smart filtering — regex on server names (
-s), database names (-d/-D), tags (-t). - 📊 3 output formats — table (human),
--json(AI/scripts),--csv(Excel). - 📖 Pager integration — auto-pages through
less -SRFX;--no-pagerto disable. - 🛡️ Safety first — destructive SQL requires
--force, confirmation when no filter is set,--ask-for-commit. - 🔄 Retry —
--retry Nwith exponential backoff for flaky connections. - 🔴 Live streaming —
--streamprints results as they complete. - 🎛️ Config-oriented — everything lives in
propq.toml; CLI flags override.
# 1. Install
go install github.com/v0id00/propq/cmd/propq@latest
# 2. Create config
cp propq.toml.example propq.toml # or: propq config generate
# edit propq.toml with your server details
# 3. Verify
propq servers # list servers + live DB counts
propq config check # validate config, test connections
# 4. First query
propq -s local --sql "SELECT VERSION(), NOW()"| Page | What's in it |
|---|---|
| Installation | Go install, binaries, build from source, completion |
| Getting-Started | First steps: config → servers → query |
| Configuration | Every propq.toml key explained |
| CLI-Reference | All flags and subcommands |
| Output-Formats | Table, JSON, CSV, pager, streaming, history |
| Safety | Destructive SQL protection, transactions, dry-run |
| Examples | Real-world command recipes |
| AI-Agents | JSON output + propq skill install
|
| Development | Build, test, lint, contributing |
SQL → Scanner → Config → Runner → Display → stdout
↓
Filter (regex + tags)
↓
Async executor (goroutines + per-server semaphore)
↓
Result collection (with optional streaming)
- Scanner reads SQL from argument, file, pipe, or editor (with history)
- Config loads server connections from TOML
-
Filter applies
-s/-d/-D/-tregex and optional editor picker - Runner executes concurrently with per-server semaphores, retries on failure
- Display formats results as table, JSON, or CSV (optionally paged)
MIT — see LICENSE.
This wiki is community-maintained. Found something outdated? Open an issue on the repository.
propq — Async SQL executor for MySQL/MariaDB
- Home
- Installation
- Getting-Started
- Configuration
- CLI-Reference
- Output-Formats
- Safety
- Examples
- AI-Agents
- Development
External links