DoltHub CLI#
dh is the command-line interface for DoltHub. Use it to query databases, upload data, manage pull requests, and automate DoltHub workflows from your terminal.
Install dh, then follow Getting Started to create and query a small database.
dh and dolt#
| Tool | Use it for |
|---|---|
dh | Work with databases hosted on DoltHub through its API: SQL, imports, forks, pull requests, tags, and releases. |
dolt | Run the database locally, start a SQL server, and clone, commit, push, or pull database changes. |
You can use dh without a local clone or a running SQL server. If you already have a Dolt repository, dh can discover its DoltHub database from the local remotes. Logging in to dh and configuring Dolt credentials are separate steps.
Choose a workflow#
- Query and write SQL: query a branch, tag, or commit, or write changes to a branch.
- Import a table: upload CSV, PSV, XLSX, or JSON data.
- Review changes with pull requests: make a change on a branch and merge it after review.
- Tag data and create releases: name a dataset version and describe it for other users.
- Automate with dh: use tokens, structured output, and asynchronous jobs in scripts.
- Run in Docker: run the CLI in a container with mounted input files.
Reference and help#
The command reference contains every command and subcommand on a single page. For help matching your installed binary, run:
dh version
dh --help
dh pr create --help
See Authentication, Configuration, or Troubleshooting for setup and common errors. Source and issue reporting are in dolthub/cli; available downloads and release notes are on GitHub Releases.