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 on VPS systems using Docker containers. Supports multiple database types and provides ready-to-use connection strings.

Supported Databases

  • PostgreSQL (versions 11-16)
  • MySQL (8.0, 5.7)
  • MariaDB (11.0, 10.11, 10.10)
  • Redis (7.2, 7.0, 6.2)
  • MongoDB (7.0, 6.0, 5.0)
  • Neo4j (5, 4.4)

Prerequisites

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

Installation

pip install clidbs

Usage

Create a Database

# Create a PostgreSQL database (latest version)
clidb create mydb

# Create a specific version
clidb create mydb --type postgres --version 16

# Create other database types
clidb create myredis --type redis --version 7.2
clidb create mymongo --type mongo
clidb create mysql1 --type mysql --version 8.0

The tool will output connection details including:

  • Connection string (ready to copy/paste)
  • CLI command with credentials
  • Host/IP address (automatically detected)
  • Port, user, and password

Manage Databases

# List all databases
clidb list

# Stop a database
clidb stop mydb

# Start a database
clidb start mydb

# Remove a database
clidb remove mydb

# See supported databases and versions
clidb supported

Public vs Private Access

# Create with public access (default)
clidb create mydb --access public

# Create with private access (localhost only)
clidb create mydb --access private

Discord Notifications

Enable notifications by:

  1. Setting the webhook URL in command:
clidb create mydb --discord-webhook "YOUR_WEBHOOK_URL"
  1. Or using environment variable:
export CLIDB_DISCORD_WEBHOOK="YOUR_WEBHOOK_URL"

Configuration

Environment variables:

  • CLIDB_DISCORD_WEBHOOK: Discord webhook URL
  • CLIDB_HOST_IP: Override auto-detected IP address
  • CLIDB_DEFAULT_DB: Default database type (defaults to "postgres")
  • CLIDB_DEFAULT_PORT: Default port for the database

Security

  • Secure random passwords generated for each database
  • Private mode uses host networking for better security
  • Public mode exposes ports for remote access
  • Connection strings provided with proper credentials
  • Discord notifications exclude sensitive information

License

MIT License

Create different types of databases

clidb create mypostgres --type postgres --version 16 clidb create mymongo --type mongo --version 7.0 clidb create myredis --type redis clidb create mysql1 --type mysql --version 8.0

List all databases

clidb list

See supported databases and versions

clidb supported

Start/stop any database

clidb stop mypostgres clidb start mymongo

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.6.1.tar.gz (8.5 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.6.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for clidbs-0.6.1.tar.gz
Algorithm Hash digest
SHA256 516a1dbdc876f7b4ac533e0c1aafc630e9f9d608d180af8487e9acea847b1677
MD5 441833c8e6a6f07aca9957c00b3b2364
BLAKE2b-256 4dc0e1894722418a9bde243dec0e37ee5837964556d2e0a2df33230f98ce435a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: clidbs-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 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.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd25c03a25a1d86d7bce4c2ff4e4378e735cdfdb1936a0151648dd9fae4addd4
MD5 863edab810dc4b8111716918e9f00e11
BLAKE2b-256 e0d1c2afc66ee276035608df6a2e62ebc52c71eb03fa771cc6d4c5348d81ebd1

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