Overview
DevDB also offers a command line interface (CLI) that allows developers to perform various actions related to databases from a programmatic interface. The CLI can be installed via npm by running the below command
With the DevDB CLI, developers can easily create and manage databases. Some of the actions that can be performed include:
- Creating a database
- Listing all databases
- Deleting a specific database
- Creating a snapshot (to create an image)
- Listing all snapshots
- Listing all images
- Deleting a specific snapshot or image
- Rolling back a database to a previous snapshot
Additionally, the DevDB CLI also supports a proxy mode, which allows for the tool to be used as a drop-in replacement for any database in a Docker compose stack. This mode allows the tool to listen on a standard database port and forward the connections to the far-end database automatically.
For added convenience, the DevDB CLI also supports specifying usernames and passwords for the created databases. This simplifies the integration of DevDB into your stack by eliminating the need to manually set up authentication for each new database.