https://github.com/rorylshanks/devdb-client
This is the repository for the official command line client for DevDB (https://devdb.cloud)
https://github.com/rorylshanks/devdb-client
cloud data database-management development
Last synced: 23 days ago
JSON representation
This is the repository for the official command line client for DevDB (https://devdb.cloud)
- Host: GitHub
- URL: https://github.com/rorylshanks/devdb-client
- Owner: rorylshanks
- License: mpl-2.0
- Created: 2022-05-08T11:23:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-09T16:20:14.000Z (over 1 year ago)
- Last Synced: 2025-08-09T04:35:59.929Z (11 months ago)
- Topics: cloud, data, database-management, development
- Language: JavaScript
- Homepage: https://devdb.cloud
- Size: 1.27 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
DevDB Command Line Client
A CLI client for accessing and automating DevDB
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
## About The Project

This is the CLI component for DevDB - a developer-focused database management platform. With DevDB you can quickly create databases for development and testing purposes, without the complexity of maintaining shared databases or Docker images.
### Installation
1. Get an API key from your account at https://devdb.cloud/
2. Install the command line client with NPM
```
sudo npm i -g devdb-cli@latest
```
3. Export the DEVDB_API_KEY environment variable
```
export DEVDB_API_KEY=ENTER_API_KEY_HERE
```
4. Start creating databases!
## Usage
# DevDB CLI Documentation
The DevDB CLI provides several useful commands to manage your DevDB databases, snapshots, and images.
## Commands
### create-database
**Aliases**: `create`, `up`
**Description**: Launch a database.
**Usage**:
```bash
create-database --type [options]
```
**Options**:
* `-t, --type`: The type of database you want to create in DevDB. This option is required.
* `-n, --name`: Name of the created database.
* `-i, --image`: Image to create the database from.
* `-p, --proxy`: Start DevDB client in proxy mode (requires socat to be installed, unless running in Docker).
* `--proxyPort`: Local port to listen on for proxy mode.
* `--username`: Desired username to use for the database. When unset a random username will be generated.
* `--password`: Desired password to use for the database. When unset a random password will be generated.
* `--reconnect`: Reconnect to the database with the specified name, if it exists. If it doesn't exist, it will create normally.
---
### list-databases
**Aliases**: `ld`, `list`
**Description**: List databases.
**Usage**:
```bash
list-databases
```
---
### get-database-types
**Description**: Get available database types.
**Usage**:
```bash
get-database-types
```
---
### delete-database
**Aliases**: `delete`, `rm`
**Description**: Delete database.
**Usage**:
```bash
delete-database
```
---
### create-snapshot
**Aliases**: `snapshot`
**Description**: Create a snapshot from an existing database.
**Usage**:
```bash
create-snapshot [snapshotName]
```
**Options**:
* `-n, --snapshotName`: Name of the created snapshot.
---
### create-image
**Aliases**: `ci`
**Description**: Create image from running database.
**Usage**:
```bash
create-image [snapshotName]
```
**Options**:
* `-n, --snapshotName`: Name of the created image. This option is required.
---
### list-snapshots
**Aliases**: `ls`
**Description**: List all snapshots.
**Usage**:
```bash
list-snapshots
```
---
### list-images
**Aliases**: `li`
**Description**: List all images.
**Usage**:
```bash
list-images
```
---
### delete-snapshot
**Aliases**: `rms`
**Description**: Delete snapshot from DevDB.
**Usage**:
```bash
delete-snapshot
```
---
### delete-image
**Aliases**: `rms`
**Description**: Delete image from DevDB.
**Usage**:
```bash
delete-image
```
---
### rollback-database
**Aliases**: `rb`, `rollback`
**Description**: Rollback database.
**Usage**:
```bash
rollback-database [snapshotId]
```
**Options**:
* `--snapshotId, --snapshot`: ID of the snapshot to rollback to. Defaults to the most recent snapshot.
---
### Global options
**Options**:
* `-k, --apikey`: API Key to access DevDB (or from env var DEVDB_API_KEY).
* `--manifest`: Write a JSON output manifest file with the detailed results of the requested command.
---
To get help for any command, you can use the `--help` flag after the command.
## License
Distributed under the Mozilla Public License Version 2.0. See `LICENSE.md` for more information.
## Contact
Please let us know of any issues with this at support@devdb.cloud, and we will be happy to help!