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.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.1 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

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

Uploaded PyPymanylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.8+Windows x86-64

dbcrust-0.23.3-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.3-cp38-abi3-musllinux_1_2_aarch64.whl (15.3 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

dbcrust-0.23.3-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.3-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.3-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.3-cp38-abi3-macosx_11_0_arm64.whl (12.2 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

dbcrust-0.23.3-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.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dea9364bfbbf817636007d845ec50f136bdfbcd180ae2805239954532e294e78
MD5 347263e21fc709a60d9c75bc24b22169
BLAKE2b-256 c223605bce81c41bbf7fac52b7f5e5c0961103cbd135ca0ef48d1dbe4ca4ddf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 26fcaeb2d30f710bc1b9ce0b93fc6214ff4caa16411fbdcabb8053276b222c4f
MD5 566875267c505526b7e7f0f2484620df
BLAKE2b-256 1dfe425bb80fe3ad380e1cadf18ac244566587b1342e443ee21f29aae900f97d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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.3-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: dbcrust-0.23.3-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.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 85da96d92229a1e9769306f48817075730a3dfdee04466186346132201496426
MD5 ac96ec9a35833ffa19611028b58c6719
BLAKE2b-256 f169b325d9e218955f048b614d727417554d0b6adb63dc5a19b983750bfe0c18

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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.3-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.3-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7847bbe4608da022a2ff1876aef2b816c94b5bf6ad5fae0d6801b4afdcc180ca
MD5 052b26182ec4f0ecfa5e22657595c951
BLAKE2b-256 28db53d55831291ac4ac592dbe629f2677fe87cb4212941b08bf597a19a3f42c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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.3-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.3-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 86c80d79c9ba73ea63bade7a77b0ca9fa7436183d0663ae8414e583f24b6b90e
MD5 0231b5c496910842f25838874a4e051f
BLAKE2b-256 d45204f5f1a3d2bfe7165e0c3695faed3ef262168e7adb686aecfd43932a882c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d67d50e020e7de06ce1b7c1670d2e068d6a369244ff872980f89dbd8d0eac341
MD5 96a9d0da3ef8445db87ba4f16d58d124
BLAKE2b-256 1353c1c1b61a3cb9e361f3ce1b7e99cb3aa0fa5f76a27ab0400f5eafdece06c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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.3-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.3-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 a061acdd1f92b3032d7d87ce7997bd0165e4ed46508eda5b33fc73647545ac7c
MD5 c4805fd4fa0c6b6c0f9e901e2c2dc400
BLAKE2b-256 94f558fa91ac9fc6bea0e0fd8b901c559af5dcfc9437742971f517ec55fb1280

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 21d7c28051f2e904a6efee10604f8cad6a5643e8b61add309da522576510a4f5
MD5 2aaa74df6b4efb3d4a7a99158888745d
BLAKE2b-256 9d1fc002bc60e4d8466f136a5d70a34974f9956ef76e18bf8318463bc6204c97

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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.3-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76a7e1318e63ad3d5917f08d9fc394a4f27c9e3847a11bd9ef7b23faa8ef1c31
MD5 fc314bcf605c179a5334cbc270981a69
BLAKE2b-256 d03ca25b08a34e91975f1a1f5ea5879a52b60c8d849bcdb0261b6ea8d6488252

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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.3-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dbcrust-0.23.3-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9a7725862a398fef5afd63035899e2b33760293c8748f6efcbaf41aabd01d454
MD5 61864e98f51b5f655ffb1a2e27147f2c
BLAKE2b-256 c25aa75eb77abda97ce0640373ada95d2fbb90498223796dfccbf5692f505e54

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbcrust-0.23.3-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