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
# View database connection details
clidb info mydb
# Reset database password
clidb info mydb --reset-password
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:
- Setting the webhook URL in command:
clidb create mydb --discord-webhook "YOUR_WEBHOOK_URL"
- Or using environment variable:
export CLIDB_DISCORD_WEBHOOK="YOUR_WEBHOOK_URL"
Configuration
Environment variables:
CLIDB_DISCORD_WEBHOOK: Discord webhook URLCLIDB_HOST_IP: Override auto-detected IP addressCLIDB_DEFAULT_DB: Default database type (defaults to "postgres")CLIDB_DEFAULT_PORT: Default port for the database
Security
Credential Storage
- Database credentials are stored in
~/.config/clidb/credentials.json - The directory has 700 permissions (only owner can access)
- The credentials file has 600 permissions (only owner can read/write)
- Credentials are stored locally on your VPS
Best Practices
For secure operation, ensure your VPS follows these security practices:
- Use SSH key-based authentication (disable password authentication)
- Disable root SSH login
- Keep your system and packages updated
- Use strong passwords for all services
- Configure your firewall properly
- Regularly monitor system logs
Credential Management
- Use
clidb infoto safely view stored credentials - Use
--reset-passwordto change database passwords - Credentials are automatically removed when using
clidb remove - Never share or backup the credentials file in unsecured locations
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
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
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.6.2.tar.gz.
File metadata
- Download URL: clidbs-0.6.2.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc3aecfe8e8f7fc6b38bab02c49b81f383647ea9dbf424a015fff1f12e92d947
|
|
| MD5 |
9ad55dae16a3b61281c20cd7ce14a853
|
|
| BLAKE2b-256 |
bcdcd9a2cd0df0948e27b56652e7b7d3555b96188be1902f0098b3f7143d24c5
|
File details
Details for the file clidbs-0.6.2-py3-none-any.whl.
File metadata
- Download URL: clidbs-0.6.2-py3-none-any.whl
- Upload date:
- Size: 9.9 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 |
d02823284a540c12f3a1dd35666bbc826f1065fdc0993c5abdfafd0b9355c3b1
|
|
| MD5 |
0e2cb9e893f37632314f46332ea72f3c
|
|
| BLAKE2b-256 |
43d09b101296964ec60db27ceec1fde5edb8989c3c9b7b7fa46b2137b4fe2716
|