DBeaver CLI (dbvr) is a command-line interface for working with databases.
It can act as as standalone CLI application or with conjunction with DBeaver and CloudBeaver.
It provides a scriptable way to manage database projects and data sources, inspect metadata, and execute SQL from the terminal.
- Automate database workflows with a terminal-first interface built on top of the DBeaver platform
- Manage projects and data sources without opening a GUI
- Run SQL scripts and ad-hoc queries against supported databases
- Inspect database metadata such as databases, schemas, tables, and DDL
- Integrate with CI/CD and shell scripts using standard command output and files
- Reuse DBeaver ecosystem support for drivers and data-source handling
projectcommands for creating, listing, renaming, deleting, and selecting default projectsdatasourcecommands for creating, viewing, listing, updating, moving, and deleting data sourcessqlcommand to execute SQL from a literal query, a file, or standard inputmetacommands for working with database, schema, and table information
To build this repository locally, you need:
- Java
- Maven
- Local sibling checkouts of dependencies referenced by
project.deps:dbeaver-commondbeaverdbeaver-jdbc-libsql
The root Maven build inherits from ../dbeaver, and the product aggregate also includes sibling modules from ../../../dbeaver-common and ../../../dbeaver.
git clone https://github.com/dbeaver/dbeaver-common.git
git clone https://github.com/dbeaver/dbeaver.git
git clone https://github.com/dbeaver/dbeaver-jdbc-libsql.git
git clone https://github.com/dbeaver/dbvr.gitArrange them as sibling directories so the relative paths in the Maven/Tycho build resolve correctly.
From the dbvr repository root:
mvn -f product/aggregate/pom.xml \
-Dheadless-platform \
-Pproduct-dbvr-ce \
-Dbuild.all-environments \
packageThis is the same aggregate build profile used by the repository CI workflow.
The packaged product creates a dbvr executable for Linux and Windows, and a dbvr.app bundle for macOS.
After building or downloading a packaged distribution, add the executable to your PATH and run:
dbvr --helpdbvr --helpCreate a project:
dbvr project create --name MyProject --description "This is my project"List projects:
dbvr project listSet the default project:
dbvr project default MyProjectdbvr driver listShow driver properties:
dbvr driver list --show-propertiesRun an inline query using an existing datasource:
dbvr sql -ds my-datasource-id --format csv "select * from my_table"Read SQL from a file or standard input:
dbvr sql -ds my-datasource-id --format json --input-file query.sql
cat query.sql | dbvr sql -ds my-datasource --format jsonWrite results to a file:
dbvr sql -ds my-datasource-id --format csv --output-file result.csv "select * from my_table"Examples of supported metadata operations include listing databases, listing tables, and getting DDL for database objects.
dbvr -ds my-datasource-id database list
# or
# dbvr -ds my-datasource-id schema list ...
# dbvr -ds my-datasource-id table ddl ...Exact options and available subcommands may vary by command. Use
dbvr <command> --helpto inspect the current CLI surface.
- Open an issue in this repository: https://github.com/dbeaver/dbvr/issues
- Browse DBeaver resources and related platform documentation: https://github.com/dbeaver
- Use command help locally with
dbvr --helpordbvr <command> --help
This project is maintained by the DBeaver team and contributors.
- Organization: dbeaver
- Repository: dbeaver/dbvr
Licensed under the Apache License 2.0.