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

Uploaded PyPymanylinux: glibc 2.17+ ARM64

dbcrust-0.23.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.0 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.8+Windows x86-64

dbcrust-0.23.1-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.1-cp38-abi3-musllinux_1_2_aarch64.whl (15.2 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

dbcrust-0.23.1-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.1-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (15.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ i686

dbcrust-0.23.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.0 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

dbcrust-0.23.1-cp38-abi3-macosx_11_0_arm64.whl (12.1 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

dbcrust-0.23.1-cp38-abi3-macosx_10_12_x86_64.whl (11.9 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for dbcrust-0.23.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 aa8e5af3018728deda60058ad6ecde9c8644fad1fa4702339cdbfd768416f5db
MD5 2670cc799e68dc0f1d914371d9ce389b
BLAKE2b-256 b7ee36f760570c7639d899b7166f58fdf192f093ae17f91467e0577dd4e04119

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbcrust-0.23.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 db45aa267e683759a9ffa1603c4d40a4ed3300347791fff5d2ea131098855a9b
MD5 7bdacd0bdca918ddd3d744ad4d6e9660
BLAKE2b-256 85d0b6416f8ef621b68354a49772453c1b10b4eea8f9ee5947a3e4807ff49285

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dbcrust-0.23.1-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.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 de2e47d80902a1f99f6eda741f4847ff7a8227c13ac5ca1bb1a364432ac3e589
MD5 050a942e356a26b61ca34617aea691d7
BLAKE2b-256 413122c2be523084bf0db511acd69db371ee8f2b8288a976a4b259913c0b49f6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbcrust-0.23.1-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6e538a1ac3fe7f12e71dceef21d38abcc6eb955193d85a763a29407cfd32617d
MD5 04715dc52e59f666574c64c2b83c5895
BLAKE2b-256 9da4954be7191446e9e4d7e76827fb750af5dcb604493b956a4fb0b86667de17

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbcrust-0.23.1-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 59c10c6ce8956004ca4e5ad31723ad938341614e1615cbc4e29e9164080e7f9b
MD5 1e5db1932a4a44a384595bc2822e6bec
BLAKE2b-256 4de98366734d3b6278ec9418cf94f99766f501773467540e9b97db9fd9f4de9e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbcrust-0.23.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0cae22669505dd8092254524828638e8cf89516b89116ad9df0360b995b97202
MD5 b7ec66fa8994b3fb333af14c6e315a0a
BLAKE2b-256 86422673b444cf364297ebe5724e5d07c3cbd024c2b86b810fa9e2c8e01c4edc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbcrust-0.23.1-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 fac3f25441b973824b1a184ede886e6d90fcb84eb70b02102e14497c0dfd0364
MD5 604e905546310cfd4b3af405b16fe314
BLAKE2b-256 87e798f81470b08566945bb0891b758a8c6325389dedfc935c2a9624ec9c6122

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbcrust-0.23.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e3db08f582035529c19bdf7336461ad6eb3d2531df99db658dcd852194f21eb3
MD5 9cc2b3a315995d44f05fb96d4e06a7a7
BLAKE2b-256 06eedfb423c9306f866490e2686689c1f9d5310042843b8c2f5c3eb97168a196

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbcrust-0.23.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c54e42f494867d88532637f0b874947f24104aeb08f3f2dc8c2746f899200779
MD5 6027f87d1c81b553f94a7d5251f90cdd
BLAKE2b-256 5965faf77ec718407c12ecfb297b368e9edbd6c0b44126cd34a131534a7323dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbcrust-0.23.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5550e0333c1e8fd5b4f72c070452c7cba31634c5feed9ded20e662627ee57009
MD5 80b7f899d348d00922e998201e3564eb
BLAKE2b-256 71dbb22fdea90f8b931f49a633d42864bf0d295ce5eb3d24013eab1946fc8534

See more details on using hashes here.

Provenance

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