A CLI client for accessing and automating DevDB
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
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.
- Get an API key from your account at https://devdb.cloud/
- Install the command line client with NPM
sudo npm i -g devdb-cli@latest
- Export the DEVDB_API_KEY environment variable
export DEVDB_API_KEY=ENTER_API_KEY_HERE
- Start creating databases!
The DevDB CLI provides several useful commands to manage your DevDB databases, snapshots, and images.
Aliases: create
, up
Description: Launch a database.
Usage:
create-database --type <databaseType> [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.
Aliases: ld
, list
Description: List databases.
Usage:
list-databases
Description: Get available database types.
Usage:
get-database-types
Aliases: delete
, rm
Description: Delete database.
Usage:
delete-database <databaseId>
Aliases: snapshot
Description: Create a snapshot from an existing database.
Usage:
create-snapshot <databaseId> [snapshotName]
Options:
-n, --snapshotName
: Name of the created snapshot.
Aliases: ci
Description: Create image from running database.
Usage:
create-image <databaseId> [snapshotName]
Options:
-n, --snapshotName
: Name of the created image. This option is required.
Aliases: ls
Description: List all snapshots.
Usage:
list-snapshots <databaseId>
Aliases: li
Description: List all images.
Usage:
list-images
Aliases: rms
Description: Delete snapshot from DevDB.
Usage:
delete-snapshot <snapshotId>
Aliases: rms
Description: Delete image from DevDB.
Usage:
delete-image <imageId>
Aliases: rb
, rollback
Description: Rollback database.
Usage:
rollback-database <databaseId> [snapshotId]
Options:
--snapshotId, --snapshot
: ID of the snapshot to rollback to. Defaults to the most recent snapshot.
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.
Distributed under the Mozilla Public License Version 2.0. See LICENSE.md
for more information.
Please let us know of any issues with this at [email protected], and we will be happy to help!