Status: Active
Gold Digger is a Rust-based command-line tool that executes SQL queries against MySQL/MariaDB databases and exports results to structured formats (CSV, JSON, TSV). Designed for operators who need reliable, reproducible data extraction for ETL pipelines, analytics, and reporting without GUI dependencies.
Highlights#
- MySQL/MariaDB support with secure TLS connections
- Structured outputs: CSV, JSON, TSV with deterministic formatting
- Built for automation (cron, CI/CD) and offline-first environments
- Clear exit codes for pipeline integration
- Streaming processing for large datasets
- Environment variable configuration with CLI overrides
Usage#
Basic query execution:
gold_digger --db-url "mysql://user:pass@host:3306/db" --query-file report.sql --output results.csv
Environment variable configuration:
export GOLD_DIGGER_DB_URL="mysql://user:pass@host:3306/db"
export GOLD_DIGGER_OUTPUT_FORMAT="json"
gold_digger --query "SELECT * FROM users WHERE active = 1" --output users.json
Pipeline integration:
# Exit codes: 0=success, 1=error, 2=no data
gold_digger --db-url "$DB_URL" --query-file daily_report.sql --output daily.csv
if [ $? -eq 0 ]; then
echo "Report generated successfully"
else
echo "Report generation failed"
exit 1
fi
Download & Verify
Download the latest release and verify its integrity:
For detailed verification steps, see our Shipping & Verification page.