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:
- Set the webhook URL when running commands:
clidb create postgres public --discord-webhook "YOUR_WEBHOOK_URL"
- 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 notificationsCLIDB_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
Release history Release notifications | RSS feed
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.5.0.tar.gz
(6.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clidbs-0.5.0.tar.gz.
File metadata
- Download URL: clidbs-0.5.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ddcf3f9135ce0dc761b984b43986e127f622a91b3fc3b9b926aeaea6cef816c
|
|
| MD5 |
d28a76f176b4bfbac356a2102c9d14e0
|
|
| BLAKE2b-256 |
0da6615c15b60b2786f1749722062bf02d481275dd02e48901c6a5c8821c4019
|
File details
Details for the file clidbs-0.5.0-py3-none-any.whl.
File metadata
- Download URL: clidbs-0.5.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d296e67ed6a73a7595dd8790ab47a711c9a4c424b3fd03044ce1847110ba7bfe
|
|
| MD5 |
a6b8c084f700808dcd943f6c995104d7
|
|
| BLAKE2b-256 |
a11e2625cbe2650ab7c9660550967fed39d221fa32a1a28c99bd4e0bb06dde87
|