Gold Digger

Rust CLI for MySQL/MariaDB query execution and structured data export. Designed for operators who need reliable, reproducible data extraction.

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

Key Features

Database Support

Secure connections to MySQL and MariaDB databases with TLS support.

Structured Outputs

Export data in CSV, JSON, or TSV formats with deterministic formatting for consistent results.

Automation Ready

Built for integration with cron jobs, CI/CD pipelines, and automated workflows.

Pipeline Integration

Clear exit codes and error handling for reliable pipeline integration.

Ready to Get Started?

Download Gold Digger and start using it in your environment.