Skip to content

Repository files navigation

dbvr Community, CLI from DBeaver

Build License

dbvr Community, a universal CLI for database querying, is a command-line interface for working with databases. It can act as a standalone CLI application or in 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.

Why dbvr Community is useful

  • 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

Features

  • project commands for creating, listing, renaming, deleting, and selecting default projects
  • datasource commands for creating, viewing, listing, updating, moving, and deleting data sources
  • sql command to execute SQL from a literal query, a file, or standard input
  • meta commands for working with database, schema, and table information

Run the CLI

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 --help

Usage examples

Show top-level help

dbvr --help

Execute SQL

Run 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 json

Write results to a file:

dbvr sql -ds my-datasource-id -format csv -output-file result.csv "select * from my_table"

Explore metadata

Examples of supported metadata operations include listing databases, listing tables, and getting DDL for database objects.

dbvr meta database list -ds my-datasource-id 
# or
# dbvr meta schema list -ds my-datasource-id ...
# dbvr meta table ddl -ds my-datasource-id -sn=public -tn=orders ...

Exact options and available subcommands may vary by command. Use dbvr <command> --help to inspect the current CLI surface.

Work with projects

Create a project:

dbvr project create --name MyProject --description "This is my project"

List projects:

dbvr project list

Set the default project:

dbvr project default MyProject

Inspect available drivers

dbvr driver list

Show driver properties:

dbvr driver list --show-properties

Where to get help

Maintainers

This project is maintained by the DBeaver team and contributors.

License

Licensed under the Apache License 2.0.

About

DBeaver CLI

Resources

Security policy

Stars

53 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages