dbcrust


Namedbcrust JSON
Version 0.17.0 PyPI version JSON
download
home_pageNone
SummaryHigh-performance database CLI engineered for Django developers β€” Advanced ORM analysis, performance optimization, SSH tunneling, and seamless multi-database support (PostgreSQL, MySQL, SQLite)
upload_time2025-08-08 12:18:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords dbcrust database postgres mysql sqlite cli interactive sql postgresql mysql sqlite ssh-tunnel vault docker django orm python-library performance-analysis n-plus-one
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://claude.ai/code) β€” where AI meets thoughtful development.*

[![Rust](https://img.shields.io/badge/rust-2024-orange.svg)](https://www.rust-lang.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Documentation](https://img.shields.io/badge/docs-mkdocs-blue.svg)](https://clement-tourriere.github.io/dbcrust/)
[![PyPI](https://img.shields.io/pypi/v/dbcrust.svg)](https://pypi.org/project/dbcrust/)

## 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 Support** - PostgreSQL, MySQL, SQLite with container auto-discovery
- **⚑ 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

```bash
# 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

```bash
# Database connections with intelligent autocompletion
dbcrust postgres://user:pass@localhost/mydb
dbcrust docker://postgres-container  # Container auto-discovery
dbcrust session://production_db      # Saved sessions
dbc pos[TAB] β†’ postgres://           # Smart completions
```

## Essential Commands

```bash
# Multi-database connections
dbcrust postgres://postgres:pass@localhost/myapp
dbcrust docker://my-postgres-container
dbcrust session://production_db  # Saved sessions

# 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

```bash
# 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

```python
# 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 β†’**](https://clement-tourriere.github.io/dbcrust/django-analyzer/)

## Python API

```python
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 β†’**](https://clement-tourriere.github.io/dbcrust/python-api/)

## Documentation & Support

- **[πŸ“š Complete Documentation](https://clement-tourriere.github.io/dbcrust/)** - Installation, usage guides, and API reference
- **[πŸ”§ Command Reference](https://clement-tourriere.github.io/dbcrust/reference/backslash-commands/)** - All 40+ interactive commands
- **[🐍 Django Integration](https://clement-tourriere.github.io/dbcrust/django-analyzer/)** - ORM performance analysis
- **[πŸ› Issues & Support](https://github.com/clement-tourriere/dbcrust/issues)** - Bug reports and questions
- **[πŸ“¦ PyPI Package](https://pypi.org/project/dbcrust/)** - Python package information

---

**Built with ❀️ using [Rust](https://www.rust-lang.org/) β€’ Modern database CLI β€’ Security-first architecture**


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dbcrust",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "dbcrust, database, postgres, mysql, sqlite, cli, interactive, sql, postgresql, mysql, sqlite, ssh-tunnel, vault, docker, django, orm, python-library, performance-analysis, n-plus-one",
    "author": null,
    "author_email": "Cl\u00e9ment Tourri\u00e8re <clement.tourriere@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "# DBCrust\n\n**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.**\n\n*\ud83e\udd16 Proudly crafted with [Claude Code](https://claude.ai/code) \u2014 where AI meets thoughtful development.*\n\n[![Rust](https://img.shields.io/badge/rust-2024-orange.svg)](https://www.rust-lang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Documentation](https://img.shields.io/badge/docs-mkdocs-blue.svg)](https://clement-tourriere.github.io/dbcrust/)\n[![PyPI](https://img.shields.io/pypi/v/dbcrust.svg)](https://pypi.org/project/dbcrust/)\n\n## Why DBCrust?\n\nDBCrust 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.\n\n## \ud83d\ude80 Key Features\n\n- **\ud83d\udc33 Multi-Database Support** - PostgreSQL, MySQL, SQLite with container auto-discovery\n- **\u26a1 Intelligent CLI** - Context-aware autocompletion, syntax highlighting, and external editor support\n- **\ud83d\udd10 Enterprise Ready** - SSH tunneling, HashiCorp Vault integration, and encrypted connections\n- **\ud83d\udd0d Smart Performance Analysis** - Built-in EXPLAIN visualization and query optimization tools\n- **\ud83d\udc0d Django ORM Analyzer** - Real-time N+1 query detection, performance monitoring, and optimization recommendations\n- **\ud83d\udcca Python Library** - Complete programmatic access with unified CLI and Python APIs\n\n## Quick Start\n\n### Installation\n\n```bash\n# Native install (fastest, recommended)\ncurl -fsSL https://clement-tourriere.github.io/dbcrust/install.sh | sh  # Unix\n# irm https://clement-tourriere.github.io/dbcrust/install.ps1 | iex  # Windows\n\n# Or via uv (Python package manager)\nuvx dbcrust postgres://user:pass@localhost/mydb  # Run immediately\nuv tool install dbcrust  # Install as isolated tool (recommended)\n```\n\n### Basic Usage\n\n```bash\n# Database connections with intelligent autocompletion\ndbcrust postgres://user:pass@localhost/mydb\ndbcrust docker://postgres-container  # Container auto-discovery\ndbcrust session://production_db      # Saved sessions\ndbc pos[TAB] \u2192 postgres://           # Smart completions\n```\n\n## Essential Commands\n\n```bash\n# Multi-database connections\ndbcrust postgres://postgres:pass@localhost/myapp\ndbcrust docker://my-postgres-container\ndbcrust session://production_db  # Saved sessions\n\n# Interactive commands (once connected)\n\\dt                               # List tables\n\\d users                         # Describe table\n\\e                               # Toggle EXPLAIN mode\n\\cs                              # Column selection for wide results\n\\ss production_db                # Save current connection\n```\n\n## Advanced Features\n\n```bash\n# EXPLAIN visualization - toggle with \\e\nSELECT * FROM users WHERE email = 'user@example.com';\n# \u25cb Execution Time: 1.23 ms \u2022 Planning Time: 0.15 ms\n# Index Scan using email_idx (Cost: 4, Rows: 1)\n\n# SSH tunneling for secure connections\ndbcrust postgres://user:pass@db.internal.com/myapp --ssh-tunnel jumphost.com\n\n# HashiCorp Vault integration\ndbcrust vault://app-role@database/postgres-prod\n```\n\n## \ud83d\udc0d Django & Python Integration\n\n### Django ORM Performance Analysis\n\n```python\n# Real-time ORM analysis with middleware (fastest setup)\n# settings.py\nMIDDLEWARE = ['dbcrust.django.PerformanceAnalysisMiddleware', ...]\n\n# Or manual analysis\nfrom dbcrust.django import analyzer\nwith analyzer.analyze() as analysis:\n    books = Book.objects.all()\n    for book in books:\n        print(book.author.name)  # Detects N+1 automatically\n\nresults = analysis.get_results()  # Get optimization recommendations\n```\n\n**Perfect for Django teams:** N+1 detection, performance monitoring, CI/CD integration, and real-time optimization suggestions.\n\n[**\ud83d\udcd6 Complete Django Integration Guide \u2192**](https://clement-tourriere.github.io/dbcrust/django-analyzer/)\n\n## Python API\n\n```python\nimport dbcrust\n\n# Direct command execution\nresult = dbcrust.run_command(\"postgres://user:pass@localhost/mydb\", \"SELECT * FROM users LIMIT 10\")\n\n# Launch interactive CLI from Python\ndbcrust.run_cli(\"postgres://user:pass@localhost/mydb\")\n\n# PostgresClient class for object-oriented usage\nfrom dbcrust import PostgresClient\nclient = PostgresClient(host=\"localhost\", user=\"postgres\", dbname=\"myapp\")\ntables = client.list_tables()\n```\n\n[**\ud83d\udcd6 Complete Python API Documentation \u2192**](https://clement-tourriere.github.io/dbcrust/python-api/)\n\n## Documentation & Support\n\n- **[\ud83d\udcda Complete Documentation](https://clement-tourriere.github.io/dbcrust/)** - Installation, usage guides, and API reference\n- **[\ud83d\udd27 Command Reference](https://clement-tourriere.github.io/dbcrust/reference/backslash-commands/)** - All 40+ interactive commands\n- **[\ud83d\udc0d Django Integration](https://clement-tourriere.github.io/dbcrust/django-analyzer/)** - ORM performance analysis\n- **[\ud83d\udc1b Issues & Support](https://github.com/clement-tourriere/dbcrust/issues)** - Bug reports and questions\n- **[\ud83d\udce6 PyPI Package](https://pypi.org/project/dbcrust/)** - Python package information\n\n---\n\n**Built with \u2764\ufe0f using [Rust](https://www.rust-lang.org/) \u2022 Modern database CLI \u2022 Security-first architecture**\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "High-performance database CLI engineered for Django developers \u2014 Advanced ORM analysis, performance optimization, SSH tunneling, and seamless multi-database support (PostgreSQL, MySQL, SQLite)",
    "version": "0.17.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/clement-tourriere/dbcrust/issues",
        "Changelog": "https://github.com/clement-tourriere/dbcrust/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/clement-tourriere/dbcrust#readme",
        "Homepage": "https://github.com/clement-tourriere/dbcrust",
        "Repository": "https://github.com/clement-tourriere/dbcrust",
        "Source Code": "https://github.com/clement-tourriere/dbcrust"
    },
    "split_keywords": [
        "dbcrust",
        " database",
        " postgres",
        " mysql",
        " sqlite",
        " cli",
        " interactive",
        " sql",
        " postgresql",
        " mysql",
        " sqlite",
        " ssh-tunnel",
        " vault",
        " docker",
        " django",
        " orm",
        " python-library",
        " performance-analysis",
        " n-plus-one"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "054a1138ab7921a70cf74d9093567d91b893d0b338d1e0f81ed21d221e95fb23",
                "md5": "7213bdde214f6b618cff53059aa071d6",
                "sha256": "9cf9cfc0e8e55ebf09fd076f46b52df72f0b0e8d42c03cd61c60c51f84e87100"
            },
            "downloads": -1,
            "filename": "dbcrust-0.17.0-cp38-abi3-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "7213bdde214f6b618cff53059aa071d6",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.10",
            "size": 4648294,
            "upload_time": "2025-08-08T12:18:40",
            "upload_time_iso_8601": "2025-08-08T12:18:40.868043Z",
            "url": "https://files.pythonhosted.org/packages/05/4a/1138ab7921a70cf74d9093567d91b893d0b338d1e0f81ed21d221e95fb23/dbcrust-0.17.0-cp38-abi3-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5fc891894024c91c27293697ef7d8c4622946a4423d1adff5881076b91de279b",
                "md5": "0220f8d519017ab1946c8054e51e88b3",
                "sha256": "a95de9c65b356d0ee7ab3a5be1c44a726b93eb69c000edf25f4d464a59ea1ddf"
            },
            "downloads": -1,
            "filename": "dbcrust-0.17.0-cp38-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "0220f8d519017ab1946c8054e51e88b3",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.10",
            "size": 4242650,
            "upload_time": "2025-08-08T12:18:44",
            "upload_time_iso_8601": "2025-08-08T12:18:44.003536Z",
            "url": "https://files.pythonhosted.org/packages/5f/c8/91894024c91c27293697ef7d8c4622946a4423d1adff5881076b91de279b/dbcrust-0.17.0-cp38-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "50b01b0595af995b0fd4be3fbccd25c4858c998016f882c4ba0e8da18916b224",
                "md5": "bcf9885e53b925c47492680c2afe9867",
                "sha256": "cfed52b567fde70a27fdfe5024e6dc364b2c815ad48a7f3fa6d77a39a64e0822"
            },
            "downloads": -1,
            "filename": "dbcrust-0.17.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "bcf9885e53b925c47492680c2afe9867",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.10",
            "size": 4506228,
            "upload_time": "2025-08-08T12:18:45",
            "upload_time_iso_8601": "2025-08-08T12:18:45.727291Z",
            "url": "https://files.pythonhosted.org/packages/50/b0/1b0595af995b0fd4be3fbccd25c4858c998016f882c4ba0e8da18916b224/dbcrust-0.17.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b94bb44a1754a088b5a88d8ecab709022e2198d67177690510a5b4cde161ed26",
                "md5": "42ee5b30914464219d23e1dbcccac5f9",
                "sha256": "21b339c566f46699aacbb7b98b7377535611bc77fde3645da76e7209c0b03956"
            },
            "downloads": -1,
            "filename": "dbcrust-0.17.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "42ee5b30914464219d23e1dbcccac5f9",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.10",
            "size": 4873292,
            "upload_time": "2025-08-08T12:18:47",
            "upload_time_iso_8601": "2025-08-08T12:18:47.586482Z",
            "url": "https://files.pythonhosted.org/packages/b9/4b/b44a1754a088b5a88d8ecab709022e2198d67177690510a5b4cde161ed26/dbcrust-0.17.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3a91a936168be968593175cbc2c20ffd4c4c39e43e5c521e2261fbde352f63cc",
                "md5": "e1484b7f0a6bb4e0ea43a40b8acd978d",
                "sha256": "91f4ccdcc3bb23d55361b8ad8e8488b70bef3352f34d07f39042fbb3985a71d5"
            },
            "downloads": -1,
            "filename": "dbcrust-0.17.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e1484b7f0a6bb4e0ea43a40b8acd978d",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.10",
            "size": 4910281,
            "upload_time": "2025-08-08T12:18:49",
            "upload_time_iso_8601": "2025-08-08T12:18:49.072908Z",
            "url": "https://files.pythonhosted.org/packages/3a/91/a936168be968593175cbc2c20ffd4c4c39e43e5c521e2261fbde352f63cc/dbcrust-0.17.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "35fac9ab274bf442a487d752dda77e2754d0df29ac14912513cbb6a5ab297b9d",
                "md5": "750a37ed6d41a10d0cc8e3e8c5a33c3e",
                "sha256": "4545c8d8bdeb8a66ee06385ff1c3decf65a179b46b6b757f949a39a8efdafcfe"
            },
            "downloads": -1,
            "filename": "dbcrust-0.17.0-cp38-abi3-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "750a37ed6d41a10d0cc8e3e8c5a33c3e",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.10",
            "size": 4784842,
            "upload_time": "2025-08-08T12:18:50",
            "upload_time_iso_8601": "2025-08-08T12:18:50.612283Z",
            "url": "https://files.pythonhosted.org/packages/35/fa/c9ab274bf442a487d752dda77e2754d0df29ac14912513cbb6a5ab297b9d/dbcrust-0.17.0-cp38-abi3-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "20e38a0838433d06b1a2cfea355c26aef4df1158f1cccfd09dbd959cff293ea9",
                "md5": "b2fe6a4ba07fa8304da703b9bd76e917",
                "sha256": "1b7a67dcfc7832d2bd52ea9fddabb241ecf89a49c1c75ac693f4e9921b14d738"
            },
            "downloads": -1,
            "filename": "dbcrust-0.17.0-cp38-abi3-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b2fe6a4ba07fa8304da703b9bd76e917",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.10",
            "size": 5092211,
            "upload_time": "2025-08-08T12:18:52",
            "upload_time_iso_8601": "2025-08-08T12:18:52.202421Z",
            "url": "https://files.pythonhosted.org/packages/20/e3/8a0838433d06b1a2cfea355c26aef4df1158f1cccfd09dbd959cff293ea9/dbcrust-0.17.0-cp38-abi3-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "04146ae69b7f6f121da727d703f0d117c28c171271db30cbce7ec447e2d21f1a",
                "md5": "01135ca2a4a536472ae8706227c41dcf",
                "sha256": "3b1fc48b8be2e3ba918ce10a7ad1e0c01171aeb9599346f61ee00f5a9e24d627"
            },
            "downloads": -1,
            "filename": "dbcrust-0.17.0-cp38-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "01135ca2a4a536472ae8706227c41dcf",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.10",
            "size": 4499444,
            "upload_time": "2025-08-08T12:18:53",
            "upload_time_iso_8601": "2025-08-08T12:18:53.757915Z",
            "url": "https://files.pythonhosted.org/packages/04/14/6ae69b7f6f121da727d703f0d117c28c171271db30cbce7ec447e2d21f1a/dbcrust-0.17.0-cp38-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-08 12:18:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "clement-tourriere",
    "github_project": "dbcrust",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dbcrust"
}
        
Elapsed time: 0.86586s