multi-db-cli v1.0.1
š multi-db-cli Documentation š
š A CLI tool for managing multiple databases with ease.
šØāš» Developed by Omindu Dissanayaka
š A CLI tool for managing multiple databases with ease.
š¦ Installation
To install multi-db-cli
, run the following command:
npm install -g multi-db-cli
š» Usage
Use the following commands to interact with your databases:
š Create a Project
To create a new project and configure a database, use:
multi-db create <project-name> <db-name>
Replace <project-name>
with the desired project name and <db-name>
with the database name (e.g., mongodb
, mysql
, postgresql
, etc.).
š Import Configuration
To import an existing database configuration, use:
multi-db import <db-name>
Replace <db-name>
with the database name for which you want to import the configuration.
š Supported Databases
- š MongoDB: Document-based NoSQL database.
- š¬ MySQL: Relational database management system.
- š PostgreSQL: Advanced relational database system.
- š¶ Oracle: Relational database system developed by Oracle Corporation.
- š“ Redis: In-memory data structure store, used as a database, cache, and message broker.
- š ArangoDB: Multi-model database with support for document, key/value, and graph data models.
- š SQLite: Lightweight relational database management system.
- šļø DynamoDB: Managed NoSQL database service provided by Amazon Web Services (AWS).
āļø Configuration
Your database configurations should be set up in the lib/config.js
file. The configuration format varies based on the database:
{
mongodb: {
uri: 'mongodb://localhost:27017'
},
mysql: {
host: 'localhost',
user: 'root',
database: 'test'
},
postgresql: {
host: 'localhost',
user: 'postgres',
database: 'test',
password: 'password'
},
oracle: {
user: 'oracle_user',
password: 'oracle_password',
connectString: 'localhost/XEPDB1'
},
redis: {
host: 'localhost',
port: 6379
},
arango: {
url: 'http://localhost:8529'
},
sqlite: {
file: './database.db'
},
dynamodb: {
region: 'us-west-2'
}
}
Developed by Omindu Dissanayaka š