Skip to main content

A CLI tool for managing databases on VPS systems

Project description

CLIDB - Simple Database Management CLI

A command-line tool for managing databases (currently PostgreSQL) on VPS systems using Docker containers.

Prerequisites

  • Python 3.8 or higher
  • Docker installed and running
  • pip (Python package installer)

Installation

pip install clidbs

Usage

Create a new PostgreSQL database

# Create a public PostgreSQL database
clidb create postgres public --db-name mydb --user myuser --port 5432

# Create a private PostgreSQL database
clidb create postgres private --db-name mydb --user myuser

Stop a database container

clidb stop clidb-postgres-mydb

Start a database container

clidb start clidb-postgres-mydb

Discord Notifications

To enable Discord notifications, you can either:

  1. Set the webhook URL when running commands:
clidb create postgres public --discord-webhook "YOUR_WEBHOOK_URL"
  1. Set it as an environment variable:
export CLIDB_DISCORD_WEBHOOK="YOUR_WEBHOOK_URL"

Configuration

The CLI can be configured using environment variables:

  • CLIDB_DISCORD_WEBHOOK: Discord webhook URL for notifications
  • CLIDB_DEFAULT_DB: Default database type (defaults to "postgres")
  • CLIDB_DEFAULT_PORT: Default port (defaults to 5432)

Security

  • Passwords are automatically generated and displayed only once at creation
  • Private mode uses host networking for better security
  • Public mode exposes ports for remote access

License

MIT License

Project details


Download files

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

Source Distribution

clidbs-0.4.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

clidbs-0.4.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file clidbs-0.4.0.tar.gz.

File metadata

  • Download URL: clidbs-0.4.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for clidbs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b5fe72a2f23f78bf74e50b26fc9f5783ad098417515a9e7c071dbfcf1cfef70e
MD5 2460f5594310205a56722a3d0e66e4e0
BLAKE2b-256 cf2e4c2376d4b9e6b9eeb2c982bb73603c20a765ed2fe808e575b4e4ed045355

See more details on using hashes here.

File details

Details for the file clidbs-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: clidbs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for clidbs-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4704b01fd11b31559ac5732cd71bd0f0529aed9b2b6960e34319e16b00c0f357
MD5 9503a1a15889cff800ff9647ac66976a
BLAKE2b-256 ee94eab69a4b95505e6bfca544449b857e39367789529145d11d41678400cbcb

See more details on using hashes here.

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