Skip to main content

High-performance database CLI engineered for Django developers — Advanced ORM analysis, performance optimization, SSH tunneling, and seamless multi-database support (PostgreSQL, MySQL, SQLite)

Project description

DBCrust

A modern database CLI that speaks your language. DBCrust combines the speed of Rust with intelligent features like context-aware autocompletion, SSH tunneling, Vault integration, and powerful Django ORM analysis. Whether you're debugging production issues, analyzing data, or optimizing Django applications, DBCrust provides an unmatched developer experience.

🤖 Proudly crafted with Claude Code — where AI meets thoughtful development.

Rust License: MIT Documentation PyPI

Why DBCrust?

DBCrust is a high-performance database CLI built for modern developers. Beyond standard database management, it provides context-aware autocompletion, SSH tunneling, HashiCorp Vault integration, and Docker support. Built in Rust for speed, with specialized features for Django developers including real-time ORM analysis and N+1 query detection.

🚀 Key Features

  • 🐳 Multi-Database & File Format Support - PostgreSQL, MySQL, SQLite, MongoDB, ClickHouse, Elasticsearch, plus Parquet, CSV, JSON files via Apache DataFusion
  • ⚡ Intelligent CLI - Context-aware autocompletion, syntax highlighting, and external editor support
  • 🔐 Enterprise Ready - SSH tunneling, HashiCorp Vault integration, and encrypted connections
  • 🔍 Smart Performance Analysis - Built-in EXPLAIN visualization and query optimization tools
  • 🐍 Django ORM Analyzer - Real-time N+1 query detection, performance monitoring, and optimization recommendations
  • 📊 Python Library - Complete programmatic access with unified CLI and Python APIs

Quick Start

Installation

# Native install (fastest, recommended)
curl -fsSL https://clement-tourriere.github.io/dbcrust/install.sh | sh  # Unix
# irm https://clement-tourriere.github.io/dbcrust/install.ps1 | iex  # Windows

# Or via uv (Python package manager)
uvx dbcrust postgres://user:pass@localhost/mydb  # Run immediately
uv tool install dbcrust  # Install as isolated tool (recommended)

Basic Usage

# Multi-database connections with intelligent autocompletion
dbcrust postgres://user:pass@localhost/mydb   # PostgreSQL
dbcrust mysql://user:pass@localhost/mydb      # MySQL
dbcrust elasticsearch://localhost:9200        # Elasticsearch
dbcrust mongodb://localhost:27017/mydb        # MongoDB
dbcrust clickhouse://localhost:8123/default   # ClickHouse
dbcrust docker://postgres-container           # Container auto-discovery
dbcrust session://production_db               # Saved sessions

# File format connections (Parquet, CSV, JSON)
dbcrust parquet:///data/sales_2024.parquet    # Parquet files
dbcrust csv:///logs/*.csv?header=true         # CSV with glob patterns
dbcrust json:///api_responses.json            # JSON/NDJSON files

Essential Commands

# Multi-database connections
dbcrust postgres://postgres:pass@localhost/myapp     # PostgreSQL
dbcrust elasticsearch://localhost:9200               # Elasticsearch (no auth)
dbcrust mongodb://user:pass@localhost:27017/mydb     # MongoDB
dbcrust clickhouse://user:pass@localhost:8123/default # ClickHouse
dbcrust docker://my-postgres-container               # Container auto-discovery

# Interactive commands (once connected)
\dt                               # List tables
\d users                         # Describe table
\e                               # Toggle EXPLAIN mode
\cs                              # Column selection for wide results
\ss production_db                # Save current connection

Advanced Features

# EXPLAIN visualization - toggle with \e
SELECT * FROM users WHERE email = 'user@example.com';
# ○ Execution Time: 1.23 ms • Planning Time: 0.15 ms
# Index Scan using email_idx (Cost: 4, Rows: 1)

# SSH tunneling for secure connections
dbcrust postgres://user:pass@db.internal.com/myapp --ssh-tunnel jumphost.com

# HashiCorp Vault integration
dbcrust vault://app-role@database/postgres-prod

🐍 Django & Python Integration

Django ORM Performance Analysis

# Real-time ORM analysis with middleware (fastest setup)
# settings.py
MIDDLEWARE = ['dbcrust.django.PerformanceAnalysisMiddleware', ...]

# Or manual analysis
from dbcrust.django import analyzer
with analyzer.analyze() as analysis:
    books = Book.objects.all()
    for book in books:
        print(book.author.name)  # Detects N+1 automatically

results = analysis.get_results()  # Get optimization recommendations

Perfect for Django teams: N+1 detection, performance monitoring, CI/CD integration, and real-time optimization suggestions.

📖 Complete Django Integration Guide →

Python API

import dbcrust

# Direct command execution
result = dbcrust.run_command("postgres://user:pass@localhost/mydb", "SELECT * FROM users LIMIT 10")

# Launch interactive CLI from Python
dbcrust.run_cli("postgres://user:pass@localhost/mydb")

# PostgresClient class for object-oriented usage
from dbcrust import PostgresClient
client = PostgresClient(host="localhost", user="postgres", dbname="myapp")
tables = client.list_tables()

📖 Complete Python API Documentation →

Documentation & Support


Built with ❤️ using Rust • Modern database CLI • Security-first architecture

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dbcrust-0.23.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.1 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

dbcrust-0.23.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.1 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

dbcrust-0.23.2-cp38-abi3-win_amd64.whl (11.8 MB view details)

Uploaded CPython 3.8+Windows x86-64

dbcrust-0.23.2-cp38-abi3-musllinux_1_2_x86_64.whl (15.2 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

dbcrust-0.23.2-cp38-abi3-musllinux_1_2_aarch64.whl (15.3 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

dbcrust-0.23.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.5 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

dbcrust-0.23.2-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (15.3 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ i686

dbcrust-0.23.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

dbcrust-0.23.2-cp38-abi3-macosx_11_0_arm64.whl (12.2 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

dbcrust-0.23.2-cp38-abi3-macosx_10_12_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file dbcrust-0.23.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e581dd7ee28ae98c8e084b567ad93d513f17bf5323e3b867974d8b09ca9a25ce
MD5 1b1554e09c33448069f2f9b63a24c36f
BLAKE2b-256 1d41925c2eb01d94afd1a3467c0bf14d8adec1ea2754b5c21f9eb533618e2b8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbcrust-0.23.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a48020dad2b38f7e33d7e42a1c6dc37fe5accf7badb40cf0255abbe0014a4a37
MD5 d716ea47bcec0d5aef333310a9436983
BLAKE2b-256 51c4efdc648bb242dda95d3b940a13be7f68e30733f86c966f96989c94045632

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbcrust-0.23.2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: dbcrust-0.23.2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dbcrust-0.23.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 871f138bfbb4197d9af5b00c61f8f11f076879af7461fe3968ba9dfaf967b568
MD5 b8d75c4b26dae23d89e5d6353c07a1ad
BLAKE2b-256 dd5597fe3953c3ab81394935970b1f39470fa9f98cbd9b71717fb75ac5785e8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-cp38-abi3-win_amd64.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbcrust-0.23.2-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.2-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3aee9c91ba70029d56c241bb241b3c53571e2734b53de4c1a9e6714f3efcaf8b
MD5 883306196c142ad0e943fc1aeec59a45
BLAKE2b-256 5f797159ef8cfa037cb2edc04ce2e4796daae56c7fd5d5b8d550f536a2435210

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-cp38-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbcrust-0.23.2-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.2-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f0be9a4544edd765a6d6507dc2035730a0d6c1738500bdd39dde7ba551013985
MD5 75ba28bc5f08e3a9e8c62caa4c5c74f4
BLAKE2b-256 2e8aa233119598f1b3dc4b01c773f43e63119ab341dae4244e34ad11216843fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-cp38-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbcrust-0.23.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d8748a556dbfa40033fc0868f0d80bb7736a6a13ef5d539b07dded1f9d053d5
MD5 3f2c0b8339e8f57bdbff6c7548c04853
BLAKE2b-256 12a1d7fc8078c01f243d5fcf983a853b5ca1e8388488b229a8bceb86f41ef66e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbcrust-0.23.2-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.2-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 2b79abde4b2a589611efbf7e63addc4a699fd954c050608b3cd1dea2f84d77df
MD5 3a9414e483d60b7fa1716d235582a43b
BLAKE2b-256 403e917de90f2d234bfc887af1b941a13270dca0ac5c0fcaa60c70e5344a5198

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbcrust-0.23.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 33350d49e4d97035016e4be1e4638f54f995c31746903266f9084a0199c70847
MD5 d250fb2a96b9f060c099a51e61969bec
BLAKE2b-256 7873b8fa4d9ac6c4696565de514e09d75d722ddb76ea0de297fbe8455269bda4

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbcrust-0.23.2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a1c58d56b0698d5003482c89b6f0fa9512ab46abe162bd7971b3a5fe75abc33c
MD5 f4e82e3b7056432d014bbf0a91b1d47b
BLAKE2b-256 43e3095793ae3fa8a7b1070c32884c3b57e9953d139fd0b90b56a3210ce1ba3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbcrust-0.23.2-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 eac92c487320986eb9b23d1c2f85d7a778f31c92a732ff7ea616dd0efd806108
MD5 08927a640dc07076fe3226828f41be47
BLAKE2b-256 89bb5fd3cd16a87a06647c580079ff587ecd855933f041ac1a318c7a31d022db

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.2-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on clement-tourriere/dbcrust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page