---
title: "DoltHub CLI command reference"
description: "Commands, flags, examples, and output formats for dh."
---

<!-- Generated by dh generate-docs (renderer 2). Do not edit.
Provenance: {"cli_version":"dev","source_commit":"cc99d68b3d592b68d2cfaf51e801f1aa033b34ea","source_dirty":true,"publication_ready":false}
Regenerate with: dh generate-docs --output DIRECTORY
-->

Reference for dh <code>dev</code>.

Development reference; this bundle is not stamped for publication.

Use `dh --help`, `dh <command> --help`, or `dh help <command>` to explore commands in the terminal.

## dh {#dh}

Work with DoltHub from the command line.

### Usage

```text
dh [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for dh |

### Related commands

- [dh api](/products/dolthub/cli/commands#dh-api)
- [dh auth](/products/dolthub/cli/commands#dh-auth)
- [dh branch](/products/dolthub/cli/commands#dh-branch)
- [dh browse](/products/dolthub/cli/commands#dh-browse)
- [dh completion](/products/dolthub/cli/commands#dh-completion)
- [dh config](/products/dolthub/cli/commands#dh-config)
- [dh db](/products/dolthub/cli/commands#dh-db)
- [dh job](/products/dolthub/cli/commands#dh-job)
- [dh pr](/products/dolthub/cli/commands#dh-pr)
- [dh release](/products/dolthub/cli/commands#dh-release)
- [dh sql](/products/dolthub/cli/commands#dh-sql)
- [dh table](/products/dolthub/cli/commands#dh-table)
- [dh tag](/products/dolthub/cli/commands#dh-tag)
- [dh version](/products/dolthub/cli/commands#dh-version)

## All commands

| Command | Purpose |
| --- | --- |
| [dh api](/products/dolthub/cli/commands#dh-api) | Make an authenticated DoltHub API request |
| [dh auth](/products/dolthub/cli/commands#dh-auth) | Authenticate dh with DoltHub |
| [dh auth login](/products/dolthub/cli/commands#dh-auth-login) | Log in to DoltHub in a web browser |
| [dh auth logout](/products/dolthub/cli/commands#dh-auth-logout) | Log out of DoltHub |
| [dh auth status](/products/dolthub/cli/commands#dh-auth-status) | View authentication status |
| [dh branch](/products/dolthub/cli/commands#dh-branch) | Work with database branches |
| [dh branch create](/products/dolthub/cli/commands#dh-branch-create) | Create a database branch |
| [dh browse](/products/dolthub/cli/commands#dh-browse) | Open a database repository in the browser |
| [dh completion](/products/dolthub/cli/commands#dh-completion) | Generate shell completion scripts |
| [dh config](/products/dolthub/cli/commands#dh-config) | Manage dh configuration |
| [dh config get](/products/dolthub/cli/commands#dh-config-get) | Get a configuration value |
| [dh config list](/products/dolthub/cli/commands#dh-config-list) | List configuration values |
| [dh config set](/products/dolthub/cli/commands#dh-config-set) | Set a configuration value |
| [dh db](/products/dolthub/cli/commands#dh-db) | Work with DoltHub database repositories |
| [dh db create](/products/dolthub/cli/commands#dh-db-create) | Create a database repository |
| [dh db fork](/products/dolthub/cli/commands#dh-db-fork) | Fork a database repository |
| [dh db view](/products/dolthub/cli/commands#dh-db-view) | View a database repository |
| [dh job](/products/dolthub/cli/commands#dh-job) | Work with asynchronous jobs |
| [dh job list](/products/dolthub/cli/commands#dh-job-list) | List database jobs |
| [dh job view](/products/dolthub/cli/commands#dh-job-view) | View an asynchronous job |
| [dh job watch](/products/dolthub/cli/commands#dh-job-watch) | Watch an asynchronous job |
| [dh pr](/products/dolthub/cli/commands#dh-pr) | Work with pull requests |
| [dh pr close](/products/dolthub/cli/commands#dh-pr-close) | Close a pull request |
| [dh pr comment](/products/dolthub/cli/commands#dh-pr-comment) | Add a pull request comment |
| [dh pr create](/products/dolthub/cli/commands#dh-pr-create) | Create a pull request |
| [dh pr edit](/products/dolthub/cli/commands#dh-pr-edit) | Edit a pull request |
| [dh pr list](/products/dolthub/cli/commands#dh-pr-list) | List pull requests |
| [dh pr merge](/products/dolthub/cli/commands#dh-pr-merge) | Merge a pull request |
| [dh pr reopen](/products/dolthub/cli/commands#dh-pr-reopen) | Reopen a pull request |
| [dh pr view](/products/dolthub/cli/commands#dh-pr-view) | View a pull request |
| [dh release](/products/dolthub/cli/commands#dh-release) | Work with database releases |
| [dh release create](/products/dolthub/cli/commands#dh-release-create) | Create a database release |
| [dh release list](/products/dolthub/cli/commands#dh-release-list) | List database releases |
| [dh release view](/products/dolthub/cli/commands#dh-release-view) | View a database release |
| [dh sql](/products/dolthub/cli/commands#dh-sql) | Run SQL against a database |
| [dh table](/products/dolthub/cli/commands#dh-table) | Work with DoltHub tables |
| [dh table import](/products/dolthub/cli/commands#dh-table-import) | Import a local data file into a DoltHub table |
| [dh tag](/products/dolthub/cli/commands#dh-tag) | Work with database tags |
| [dh tag create](/products/dolthub/cli/commands#dh-tag-create) | Create a database tag |
| [dh version](/products/dolthub/cli/commands#dh-version) | Show dh version information |

## dh api {#dh-api}

Make an authenticated DoltHub API request

### Usage

```text
dh api ENDPOINT [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>ENDPOINT</code> | false | false | API endpoint relative to /api/v2/, optionally with a query string. Absolute URLs and paths outside this prefix are rejected. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--field</code> | <code>-F</code> | stringArray | <code>&#91;&#93;</code> | Add a typed parameter in key=value format |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for api |
| <code>--hostname</code> |  | string | <code>""</code> | DoltHub hostname |
| <code>--include</code> | <code>-i</code> | bool | <code>false</code> | Include HTTP response status and headers |
| <code>--input</code> |  | string | <code>""</code> | File to use as request body (use - for stdin) |
| <code>--jq</code> | <code>-q</code> | string | <code>""</code> | Query to select values from the response using jq syntax |
| <code>--method</code> | <code>-X</code> | string | <code>""</code> | HTTP method |
| <code>--paginate</code> |  | bool | <code>false</code> | Make additional requests to fetch all pages |
| <code>--raw-field</code> | <code>-f</code> | stringArray | <code>&#91;&#93;</code> | Add a string parameter in key=value format |
| <code>--silent</code> |  | bool | <code>false</code> | Do not print the response body |
| <code>--slurp</code> |  | bool | <code>false</code> | Wrap paginated JSON responses in an array |
| <code>--template</code> | <code>-t</code> | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- Defaults to GET, or POST when the request body is nonempty; --method overrides this.
- --raw-field builds string JSON values; --field recognizes booleans, null, and signed integers; other values stay strings. --input reads the request body from a file (or - for stdin); additional fields then become query parameters.
- --paginate follows next-page tokens. --slurp requires --paginate and wraps complete page responses in an array. --jq and --template are mutually exclusive.

### Output

Prints the raw API response body by default. --include also prints HTTP status and headers; --silent suppresses the body. --jq or --template formats the response directly, without --json.

### Examples

```bash
dh api user
dh api databases/OWNER/DATABASE --jq .
```

### Related commands

- [dh](/products/dolthub/cli/commands#dh)

## dh auth {#dh-auth}

Authenticate dh with DoltHub

### Usage

```text
dh auth [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for auth |

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
- [dh auth login](/products/dolthub/cli/commands#dh-auth-login)
- [dh auth logout](/products/dolthub/cli/commands#dh-auth-logout)
- [dh auth status](/products/dolthub/cli/commands#dh-auth-status)

## dh auth login {#dh-auth-login}

Log in to DoltHub in a web browser

### Usage

```text
dh auth login [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for login |
| <code>--hostname</code> |  | string | <code>""</code> | DoltHub hostname |

### Constraints

- Unset DH_TOKEN before browser login. The default production host includes a public OAuth client ID; custom hosts require DH_OAUTH_CLIENT_ID. --hostname overrides DH_HOST and saved host configuration for login.

### Output

Opens browser authentication using OAuth PKCE, saves credentials, and prints the signed-in identity. Access tokens refresh automatically during authenticated requests. The system keyring is preferred; an unavailable keyring falls back to a user credential file with a notice.

### Examples

```bash
dh auth login
dh auth login --hostname www.dolthub.com
```

### Related commands

- [dh auth](/products/dolthub/cli/commands#dh-auth)

## dh auth logout {#dh-auth-logout}

Log out of DoltHub

### Usage

```text
dh auth logout [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for logout |
| <code>--hostname</code> |  | string | <code>""</code> | DoltHub hostname |
| <code>--yes</code> | <code>-y</code> | bool | <code>false</code> | Skip confirmation |

### Constraints

- If DH_TOKEN is set, unset the environment variable instead. Logout does not clear that variable.

### Output

Removes the saved active identity and its local credential for the selected host, then prints confirmation. Interactive use asks for confirmation unless --yes is set.

### Examples

```bash
dh auth logout --yes
```

### Related commands

- [dh auth](/products/dolthub/cli/commands#dh-auth)

## dh auth status {#dh-auth-status}

View authentication status

### Usage

```text
dh auth status [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for status |

### Output

Checks the configured host and reports the active identity and credential source without printing the token. Returns an authentication error when credentials are missing or invalid.

### Examples

```bash
dh auth status
```

### Related commands

- [dh auth](/products/dolthub/cli/commands#dh-auth)

## dh branch {#dh-branch}

Work with database branches

### Usage

```text
dh branch [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for branch |

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
- [dh branch create](/products/dolthub/cli/commands#dh-branch-create)

## dh branch create {#dh-branch-create}

Create a database branch

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh branch create NAME [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>NAME</code> | false | false | New branch name. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--from-branch</code> |  | string | <code>""</code> | Source branch |
| <code>--from-commit</code> |  | string | <code>""</code> | Source commit SHA |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for create |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- Exactly one of --from-branch or --from-commit is required.

### JSON fields

<code>head&#95;commit&#95;sha</code>, <code>last&#95;updated&#95;at</code>, <code>name</code>

### Output

Prints the created branch and commit, or selected JSON fields.

### Examples

```bash
dh branch create feature/people --db OWNER/people --from-branch main
```

### Related commands

- [dh branch](/products/dolthub/cli/commands#dh-branch)

## dh browse {#dh-browse}

Open a database repository in the browser

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

### Usage

```text
dh browse [NUMBER] [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>NUMBER</code> | true | false | Positive pull request number; omit to open the database or use a flag selector. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--branch</code> |  | string | <code>""</code> | Open a branch |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for browse |
| <code>--pull</code> |  | int | <code>0</code> | Open a pull request by number |

### Constraints

- Positional NUMBER, --pull, and --branch are mutually exclusive selectors.

### Output

Opens the selected database, branch, or pull request in a browser.

### Examples

```bash
dh browse --db OWNER/people
dh browse 1 --db OWNER/people
```

### Related commands

- [dh](/products/dolthub/cli/commands#dh)

## dh completion {#dh-completion}

Generate shell completion scripts

### Usage

```text
dh completion {bash|fish|powershell|zsh} [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>SHELL</code> | false | false | One of bash, fish, powershell, or zsh. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for completion |

### Output

Writes a shell completion script to stdout. Save or source it using your shell's completion setup; this command does not install the script.

### Examples

```bash
dh completion bash > dh.bash
dh completion zsh > _dh
```

### Related commands

- [dh](/products/dolthub/cli/commands#dh)

## dh config {#dh-config}

Manage dh configuration

### Usage

```text
dh config [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for config |

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
- [dh config get](/products/dolthub/cli/commands#dh-config-get)
- [dh config list](/products/dolthub/cli/commands#dh-config-list)
- [dh config set](/products/dolthub/cli/commands#dh-config-set)

## dh config get {#dh-config-get}

Get a configuration value

### Usage

```text
dh config get KEY [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>KEY</code> | false | false | Supported configuration key: host or db; repo remains accepted as an alias for db. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for get |

### Output

Prints the effective configuration value, including DH_HOST or DH_DB overrides. An unset database produces no output and exits successfully.

### Examples

```bash
dh config get db
```

### Related commands

- [dh config](/products/dolthub/cli/commands#dh-config)

## dh config list {#dh-config-list}

List configuration values

### Usage

```text
dh config list [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for list |

### Output

Prints KEY, VALUE, and SOURCE for host and db, showing DH_HOST/DH_DB, saved configuration, or default/unset values. It does not discover local remotes.

### Examples

```bash
dh config list
```

### Related commands

- [dh config](/products/dolthub/cli/commands#dh-config)

## dh config set {#dh-config-set}

Set a configuration value

### Usage

```text
dh config set KEY VALUE [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>KEY</code> | false | false | Supported configuration key: host or db; repo remains accepted as an alias for db. |
| <code>VALUE</code> | false | false | Hostname for host, or &#91;HOST/&#93;OWNER/DB for db. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for set |

### Constraints

- Values must not be empty. Config is saved under the platform user config directory in dh/config.json.

### Output

Saves the configuration without printing a success message. DH_HOST and DH_DB overrides still take precedence.

### Examples

```bash
dh config set db OWNER/DATABASE
dh config set host www.dolthub.com
```

### Related commands

- [dh config](/products/dolthub/cli/commands#dh-config)

## dh db {#dh-db}

Work with DoltHub database repositories

### Usage

```text
dh db [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for db |

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
- [dh db create](/products/dolthub/cli/commands#dh-db-create)
- [dh db fork](/products/dolthub/cli/commands#dh-db-fork)
- [dh db view](/products/dolthub/cli/commands#dh-db-view)

## dh db create {#dh-db-create}

Create a database repository

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh db create [OWNER/]NAME [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>&#91;OWNER/&#93;NAME</code> | true | false | Database name; owner defaults to the authenticated user. Interactive use can prompt for the name. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--description</code> | <code>-d</code> | string | <code>""</code> | Description of the database |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for create |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--private</code> |  | bool | <code>false</code> | Make the database private |
| <code>--public</code> |  | bool | <code>false</code> | Make the database public |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- --public and --private are mutually exclusive. Noninteractive use requires a name and one visibility flag. Interactive use prompts for missing name, visibility, and optionally description.

### JSON fields

<code>description</code>, <code>fork&#95;network&#95;count</code>, <code>last&#95;write&#95;at</code>, <code>name</code>, <code>network&#95;root</code>, <code>owner</code>, <code>parent</code>, <code>size&#95;bytes</code>, <code>star&#95;count</code>, <code>visibility</code>

### Output

Prints the created database identifier and browser URL, or the selected database fields with --json.

### Examples

```bash
dh db create OWNER/people --private
```

### Related commands

- [dh db](/products/dolthub/cli/commands#dh-db)

## dh db fork {#dh-db-fork}

Fork a database repository

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh db fork [DATABASE] [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>DATABASE</code> | true | false | Database in &#91;HOST/&#93;OWNER/DB form; when omitted, use --db, DH&#95;DB, a saved database, or local Dolt remotes. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for fork |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--no-wait</code> |  | bool | <code>false</code> | Return after the fork is accepted |
| <code>--org</code> |  | string | <code>""</code> | Organization or user to own the fork |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- A positional DATABASE and --db cannot be combined. --org selects the owner of the new fork; when omitted, the authenticated user owns it.

### JSON fields

<code>cancelable</code>, <code>created&#95;at</code>, <code>error</code>, <code>href</code>, <code>id</code>, <code>result</code>, <code>status</code>, <code>type</code>

### Output

Waits for completion and prints job details by default. Progress goes to stderr. --json selects job fields. With --no-wait, prints the accepted ID and HREF instead; use --json id,href for structured acceptance. Acceptance is not completion. A failed job returns a nonzero exit status. Interrupting the local wait does not cancel the remote job.

### Examples

```bash
dh db fork OWNER/people --org MY_USER
```

### Related commands

- [dh db](/products/dolthub/cli/commands#dh-db)

## dh db view {#dh-db-view}

View a database repository

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh db view [DATABASE] [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>DATABASE</code> | true | false | Database in &#91;HOST/&#93;OWNER/DB form; when omitted, use --db, DH&#95;DB, a saved database, or local Dolt remotes. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--forks</code> |  | bool | <code>false</code> | Include immediate forks |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for view |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |
| <code>--web</code> | <code>-w</code> | bool | <code>false</code> | Open the database in a browser |

### Constraints

- A positional DATABASE and --db cannot be combined. --web cannot be combined with structured output. --forks requests immediate forks; it does not recursively traverse the fork network.

### JSON fields

<code>description</code>, <code>fork&#95;network&#95;count</code>, <code>forks</code>, <code>last&#95;write&#95;at</code>, <code>name</code>, <code>network&#95;root</code>, <code>owner</code>, <code>parent</code>, <code>size&#95;bytes</code>, <code>star&#95;count</code>, <code>visibility</code>

### Output

Prints database details, optionally including immediate forks. --json selects fields; --web opens the browser instead.

### Examples

```bash
dh db view OWNER/people
dh db view OWNER/people --json name,visibility
```

### Related commands

- [dh db](/products/dolthub/cli/commands#dh-db)

## dh job {#dh-job}

Work with asynchronous jobs

### Usage

```text
dh job [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for job |

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
- [dh job list](/products/dolthub/cli/commands#dh-job-list)
- [dh job view](/products/dolthub/cli/commands#dh-job-view)
- [dh job watch](/products/dolthub/cli/commands#dh-job-watch)

## dh job list {#dh-job-list}

List database jobs

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh job list [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for list |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--limit</code> |  | int | <code>30</code> | Maximum number of jobs |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- --limit must be positive.

### JSON fields

<code>cancelable</code>, <code>created&#95;at</code>, <code>error</code>, <code>id</code>, <code>result</code>, <code>status</code>, <code>type</code>

### Output

Prints jobs for the selected database, or a JSON array of selected fields, fetching pages up to --limit.

### Examples

```bash
dh job list --db OWNER/people
```

### Related commands

- [dh job](/products/dolthub/cli/commands#dh-job)

## dh job view {#dh-job-view}

View an asynchronous job

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh job view ID [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>ID</code> | false | false | Job ID returned by an asynchronous command; resolved on the configured host. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for view |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- Authentication is required. Uses DH_HOST or saved/default host configuration, not a database selector.

### JSON fields

<code>cancelable</code>, <code>created&#95;at</code>, <code>error</code>, <code>id</code>, <code>result</code>, <code>status</code>, <code>type</code>

### Output

Prints current job details or selected JSON fields. This is a snapshot; use dh job watch to wait for completion.

### Examples

```bash
dh job view JOB_ID
```

### Related commands

- [dh job](/products/dolthub/cli/commands#dh-job)

## dh job watch {#dh-job-watch}

Watch an asynchronous job

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh job watch ID [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>ID</code> | false | false | Job ID returned by an asynchronous command; resolved on the configured host. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for watch |
| <code>--interval</code> |  | duration | <code>1s</code> | Initial polling interval |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- Authentication is required. --interval must be positive; it sets the initial polling interval. Uses the configured host.

### JSON fields

<code>cancelable</code>, <code>created&#95;at</code>, <code>error</code>, <code>id</code>, <code>result</code>, <code>status</code>, <code>type</code>

### Output

Polls until the job finishes and prints its details or selected JSON fields. Progress goes to stderr; failed or canceled jobs return a nonzero exit status. Stopping the local wait does not cancel remote work.

### Examples

```bash
dh job watch JOB_ID --json id,status,result
```

### Related commands

- [dh job](/products/dolthub/cli/commands#dh-job)

## dh pr {#dh-pr}

Work with pull requests

### Usage

```text
dh pr [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for pr |

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
- [dh pr close](/products/dolthub/cli/commands#dh-pr-close)
- [dh pr comment](/products/dolthub/cli/commands#dh-pr-comment)
- [dh pr create](/products/dolthub/cli/commands#dh-pr-create)
- [dh pr edit](/products/dolthub/cli/commands#dh-pr-edit)
- [dh pr list](/products/dolthub/cli/commands#dh-pr-list)
- [dh pr merge](/products/dolthub/cli/commands#dh-pr-merge)
- [dh pr reopen](/products/dolthub/cli/commands#dh-pr-reopen)
- [dh pr view](/products/dolthub/cli/commands#dh-pr-view)

## dh pr close {#dh-pr-close}

Close a pull request

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh pr close NUMBER [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>NUMBER</code> | false | false | Positive pull request number in the selected database. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for close |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### JSON fields

<code>created&#95;at</code>, <code>creator</code>, <code>description</code>, <code>from&#95;branch</code>, <code>pull&#95;number</code>, <code>state</code>, <code>title</code>, <code>to&#95;branch</code>

### Output

Prints the updated pull request, or selected JSON fields.

### Examples

```bash
dh pr close 1 --db OWNER/people
```

### Related commands

- [dh pr](/products/dolthub/cli/commands#dh-pr)

## dh pr comment {#dh-pr-comment}

Add a pull request comment

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh pr comment NUMBER [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>NUMBER</code> | false | false | Positive pull request number in the selected database. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--body</code> | <code>-b</code> | string | <code>""</code> | Comment body |
| <code>--body-file</code> | <code>-F</code> | string | <code>""</code> | Read comment body from file |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for comment |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- Comment body must not be empty. Noninteractive use requires --body or --body-file; interactive use can prompt. The flags are mutually exclusive. --body-file - reads stdin.

### JSON fields

<code>author</code>, <code>body</code>, <code>comment&#95;id</code>, <code>created&#95;at</code>, <code>updated&#95;at</code>

### Output

Prints the comment author, creation time, and body, or selected JSON fields.

### Examples

```bash
dh pr comment 1 --db OWNER/people --body "Ready for review"
```

### Related commands

- [dh pr](/products/dolthub/cli/commands#dh-pr)

## dh pr create {#dh-pr-create}

Create a pull request

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh pr create [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--base</code> | <code>-B</code> | string | <code>""</code> | Target branch |
| <code>--body</code> | <code>-b</code> | string | <code>""</code> | Pull request body |
| <code>--body-file</code> | <code>-F</code> | string | <code>""</code> | Read pull request body from file |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--head</code> | <code>-H</code> | string | <code>""</code> | Source &#91;OWNER/DB:&#93;BRANCH |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for create |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |
| <code>--title</code> | <code>-t</code> | string | <code>""</code> | Pull request title |

### Constraints

- Noninteractive use requires --title, --head, and --base; interactive use prompts for missing values.
- --head accepts BRANCH or OWNER/DB:BRANCH for a cross-database source. --base is a branch in the selected target database.
- --body and --body-file are mutually exclusive; --body-file - reads stdin.

### JSON fields

<code>created&#95;at</code>, <code>creator</code>, <code>description</code>, <code>from&#95;branch</code>, <code>pull&#95;number</code>, <code>state</code>, <code>title</code>, <code>to&#95;branch</code>

### Output

Prints the created pull request number, title, state, and source/target branches, or selected JSON fields.

### Examples

```bash
dh pr create --db OWNER/people --head feature/people --base main --title "Update people"
```

### Related commands

- [dh pr](/products/dolthub/cli/commands#dh-pr)

## dh pr edit {#dh-pr-edit}

Edit a pull request

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh pr edit NUMBER [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>NUMBER</code> | false | false | Positive pull request number in the selected database. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--body</code> | <code>-b</code> | string | <code>""</code> | Set the pull request body |
| <code>--body-file</code> | <code>-F</code> | string | <code>""</code> | Read the pull request body from file |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for edit |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |
| <code>--title</code> | <code>-t</code> | string | <code>""</code> | Set the pull request title |

### Constraints

- At least one of --title, --body, or --body-file is required. --body and --body-file are mutually exclusive; --body-file - reads stdin.

### JSON fields

<code>created&#95;at</code>, <code>creator</code>, <code>description</code>, <code>from&#95;branch</code>, <code>pull&#95;number</code>, <code>state</code>, <code>title</code>, <code>to&#95;branch</code>

### Output

Prints the updated pull request, or selected JSON fields.

### Examples

```bash
dh pr edit 1 --db OWNER/people --title "Update people data"
```

### Related commands

- [dh pr](/products/dolthub/cli/commands#dh-pr)

## dh pr list {#dh-pr-list}

List pull requests

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh pr list [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for list |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--limit</code> |  | int | <code>30</code> | Maximum number of pull requests |
| <code>--state</code> |  | string | <code>"open"</code> | Filter by state: open, closed, merged, or all |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- --state must be open, closed, merged, or all. --limit must be positive.

### JSON fields

<code>created&#95;at</code>, <code>creator</code>, <code>description</code>, <code>pull&#95;number</code>, <code>state</code>, <code>title</code>

### Output

Prints pull request rows, or a JSON array of selected fields. Fetches additional API pages up to --limit.

### Examples

```bash
dh pr list --db OWNER/people --state open
```

### Related commands

- [dh pr](/products/dolthub/cli/commands#dh-pr)

## dh pr merge {#dh-pr-merge}

Merge a pull request

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh pr merge NUMBER [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>NUMBER</code> | false | false | Positive pull request number in the selected database. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for merge |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--no-wait</code> |  | bool | <code>false</code> | Return after the merge is accepted |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### JSON fields

<code>cancelable</code>, <code>created&#95;at</code>, <code>error</code>, <code>href</code>, <code>id</code>, <code>result</code>, <code>status</code>, <code>type</code>

### Output

Waits for completion and prints job details by default. Progress goes to stderr. --json selects job fields. With --no-wait, prints the accepted ID and HREF instead; use --json id,href for structured acceptance. Acceptance is not completion. A failed job returns a nonzero exit status. Interrupting the local wait does not cancel the remote job.

### Examples

```bash
dh pr merge 1 --db OWNER/people
```

### Related commands

- [dh pr](/products/dolthub/cli/commands#dh-pr)

## dh pr reopen {#dh-pr-reopen}

Reopen a pull request

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh pr reopen NUMBER [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>NUMBER</code> | false | false | Positive pull request number in the selected database. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for reopen |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### JSON fields

<code>created&#95;at</code>, <code>creator</code>, <code>description</code>, <code>from&#95;branch</code>, <code>pull&#95;number</code>, <code>state</code>, <code>title</code>, <code>to&#95;branch</code>

### Output

Prints the updated pull request, or selected JSON fields.

### Examples

```bash
dh pr reopen 1 --db OWNER/people
```

### Related commands

- [dh pr](/products/dolthub/cli/commands#dh-pr)

## dh pr view {#dh-pr-view}

View a pull request

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh pr view NUMBER [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>NUMBER</code> | false | false | Positive pull request number in the selected database. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--comments</code> | <code>-c</code> | bool | <code>false</code> | View pull request comments |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for view |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |
| <code>--web</code> | <code>-w</code> | bool | <code>false</code> | Open the pull request in a browser |

### Constraints

- --web cannot be combined with structured output.

### JSON fields

<code>comments</code>, <code>created&#95;at</code>, <code>creator</code>, <code>description</code>, <code>from&#95;branch</code>, <code>pull&#95;number</code>, <code>state</code>, <code>title</code>, <code>to&#95;branch</code>

### Output

Prints pull request details, optionally including comments; --json selects fields and --web opens the browser.

### Examples

```bash
dh pr view 1 --db OWNER/people --comments
```

### Related commands

- [dh pr](/products/dolthub/cli/commands#dh-pr)

## dh release {#dh-release}

Work with database releases

### Usage

```text
dh release [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for release |

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
- [dh release create](/products/dolthub/cli/commands#dh-release-create)
- [dh release list](/products/dolthub/cli/commands#dh-release-list)
- [dh release view](/products/dolthub/cli/commands#dh-release-view)

## dh release create {#dh-release-create}

Create a database release

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh release create TAG [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>TAG</code> | false | false | Release tag name. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--create-tag</code> |  | bool | <code>false</code> | Create the tag if it does not exist |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for create |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--notes</code> | <code>-n</code> | string | <code>""</code> | Release notes |
| <code>--notes-file</code> | <code>-F</code> | string | <code>""</code> | Read release notes from file |
| <code>--target</code> |  | string | <code>""</code> | Exact target commit SHA |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |
| <code>--title</code> | <code>-t</code> | string | <code>""</code> | Release title |

### Constraints

- --title and --target are required. --target is an exact commit SHA. Use --create-tag if the tag does not yet exist.
- --notes and --notes-file are mutually exclusive; --notes-file - reads stdin.

### JSON fields

<code>commit&#95;sha</code>, <code>created&#95;at</code>, <code>description</code>, <code>tag</code>, <code>title</code>, <code>updated&#95;at</code>

### Output

Prints the release tag, title, and commit, or selected JSON fields.

### Examples

```bash
dh release create v1 --db OWNER/people --title "First dataset" --target COMMIT_SHA --create-tag
```

### Related commands

- [dh release](/products/dolthub/cli/commands#dh-release)

## dh release list {#dh-release-list}

List database releases

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh release list [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for list |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--limit</code> |  | int | <code>30</code> | Maximum number of releases |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- --limit must be positive.

### JSON fields

<code>commit&#95;sha</code>, <code>created&#95;at</code>, <code>description</code>, <code>tag</code>, <code>title</code>, <code>updated&#95;at</code>

### Output

Prints releases, or a JSON array of selected fields. Fetches additional API pages up to --limit.

### Examples

```bash
dh release list --db OWNER/people
```

### Related commands

- [dh release](/products/dolthub/cli/commands#dh-release)

## dh release view {#dh-release-view}

View a database release

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh release view TAG [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>TAG</code> | false | false | Release tag name. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for view |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |
| <code>--web</code> | <code>-w</code> | bool | <code>false</code> | Open the release in a browser |

### Constraints

- --web cannot be combined with structured output.

### JSON fields

<code>commit&#95;sha</code>, <code>created&#95;at</code>, <code>description</code>, <code>tag</code>, <code>title</code>, <code>updated&#95;at</code>

### Output

Prints release details or selected JSON fields. --web opens the release in the browser.

### Examples

```bash
dh release view v1 --db OWNER/people
```

### Related commands

- [dh release](/products/dolthub/cli/commands#dh-release)

## dh sql {#dh-sql}

Run SQL against a database

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh sql [QUERY] [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>QUERY</code> | true | false | SQL text. If omitted, use --file or pipe SQL through stdin. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--branch</code> |  | string | <code>""</code> | Branch on which to run a read or write query |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--file</code> |  | string | <code>""</code> | Read SQL from &#96;file&#96; (use - for stdin) |
| <code>--from-branch</code> |  | string | <code>""</code> | Base branch for a write query (defaults to --branch) |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for sql |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--limit</code> |  | int | <code>0</code> | Maximum rows to return |
| <code>--no-wait</code> |  | bool | <code>false</code> | Return after a write query is accepted |
| <code>--ref</code> |  | string | <code>""</code> | Branch, tag, or commit for a read query |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |
| <code>--timeout</code> |  | duration | <code>0s</code> | Server-side query timeout |
| <code>--write</code> |  | bool | <code>false</code> | Run an asynchronous write query |

### Constraints

- Provide only one SQL source: argument, --file, or stdin. --file - reads stdin. Empty queries are rejected.
- --jq and --template require --json. JSON fields must be valid for the selected read/write mode.

### Read queries

Requires --branch with a branch, or --ref with a branch, tag, or commit. --branch and --ref are mutually exclusive. --limit must be positive when supplied; --timeout must be between 1ms and 60s in whole milliseconds. --from-branch and --no-wait require write mode.

JSON fields: <code>columns</code>, <code>message</code>, <code>rows</code>, <code>status</code>, <code>warnings</code>.

### Write queries

Requires --write and --branch. --from-branch defaults to --branch and supplies the source branch. --ref, --limit, and --timeout are read-only flags. Acceptance does not imply successful completion; watch the returned job ID.

JSON fields: <code>cancelable</code>, <code>created&#95;at</code>, <code>error</code>, <code>href</code>, <code>id</code>, <code>result</code>, <code>status</code>, <code>type</code>.

### JSON fields

<code>cancelable</code>, <code>columns</code>, <code>created&#95;at</code>, <code>error</code>, <code>href</code>, <code>id</code>, <code>message</code>, <code>result</code>, <code>rows</code>, <code>status</code>, <code>type</code>, <code>warnings</code>

### Output

Reads print rows to stdout and warnings to stderr, or selected JSON fields. Unsuccessful query status returns a nonzero exit code. Writes wait for a job and print its details; --no-wait prints ID/HREF after acceptance. For acceptance JSON use --json id,href.

### Examples

```bash
dh sql --db OWNER/people --branch main "select * from people limit 10"
dh sql --write --db OWNER/people --branch feature/people --from-branch main --file update.sql
```

### Related commands

- [dh](/products/dolthub/cli/commands#dh)

## dh table {#dh-table}

Work with DoltHub tables

### Usage

```text
dh table [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for table |

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
- [dh table import](/products/dolthub/cli/commands#dh-table-import)

## dh table import {#dh-table-import}

Upload a CSV, PSV, XLSX, or JSON file and import it into a table.
Creates a table by default. JSON requires --update or --replace.
Files must be regular, nonempty files of at most 1 GiB. Upload URLs expire
after 10 minutes; failed uploads must be restarted. Keep the file unchanged
until uploading finishes. --no-wait still waits for the file upload.

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh table import <table> <file> [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>table</code> | false | false | Destination table name. |
| <code>file</code> | false | false | Regular, nonempty local CSV, PSV, XLSX, or JSON file, up to 1 GiB; stdin is not supported. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--branch</code> |  | string | <code>""</code> | Target branch (required) |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--file-type</code> |  | string | <code>""</code> | File format: csv, psv, xlsx, json (default: file extension) |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for import |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--message</code> |  | string | <code>""</code> | Import commit message |
| <code>--no-wait</code> |  | bool | <code>false</code> | Return after the import is accepted |
| <code>--overwrite</code> |  | bool | <code>false</code> | Overwrite an existing table |
| <code>--primary-key</code> |  | stringSlice | <code>&#91;&#93;</code> | Primary key columns (comma-separated or repeated) |
| <code>--replace</code> |  | bool | <code>false</code> | Replace rows in an existing table |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |
| <code>--update</code> |  | bool | <code>false</code> | Update an existing table |

### Constraints

- --branch is required. Default mode creates a table. --overwrite, --update, and --replace target an existing table and are mutually exclusive. JSON requires --update or --replace.
- File format comes from the extension unless --file-type is given. Primary keys may be comma-separated or repeated; empty primary-key names are rejected.
- Keep the file unchanged during upload. Storage URLs expire after ten minutes; failed uploads must restart, with no resume or URL refresh. Ctrl+C does not abort the storage session or cancel a submitted import.

### JSON fields

<code>cancelable</code>, <code>created&#95;at</code>, <code>error</code>, <code>href</code>, <code>id</code>, <code>result</code>, <code>status</code>, <code>type</code>

### Output

Waits for completion and prints job details by default. Progress goes to stderr. --json selects job fields. With --no-wait, prints the accepted ID and HREF instead; use --json id,href for structured acceptance. Acceptance is not completion. A failed job returns a nonzero exit status. Interrupting the local wait does not cancel the remote job. --no-wait still waits for the entire upload. On an ambiguous submission error, check dh job list before retrying.

### Examples

```bash
dh table import people people.csv --db OWNER/people --branch main --primary-key id
dh table import people changes.json --db OWNER/people --branch main --update
```

### Related commands

- [dh table](/products/dolthub/cli/commands#dh-table)

## dh tag {#dh-tag}

Work with database tags

### Usage

```text
dh tag [command] [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for tag |

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
- [dh tag create](/products/dolthub/cli/commands#dh-tag-create)

## dh tag create {#dh-tag-create}

Create a database tag

Select a database with --db, then DH_DB, saved database configuration, or local Dolt remotes (in that order). Use dh config set db OWNER/DB to save a default. Multiple remotes prompt interactively; scripts must select a database explicitly when discovery is ambiguous.

Use --json with a comma-separated list of fields for structured output. --jq and --template transform the selected JSON and require --json.

### Usage

```text
dh tag create NAME [flags]
```

### Arguments

| Argument | Optional | Repeated | Description |
| --- | --- | --- | --- |
| <code>NAME</code> | false | false | New tag name. |

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--db</code> | <code>-R</code> | string | <code>""</code> | Select a database using &#91;HOST/&#93;OWNER/DB |
| <code>--from-branch</code> |  | string | <code>""</code> | Source branch |
| <code>--from-commit</code> |  | string | <code>""</code> | Source commit SHA |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for create |
| <code>--jq</code> |  | string | <code>""</code> | Filter JSON output using a jq &#96;expression&#96; |
| <code>--json</code> |  | stringSlice | <code>&#91;&#93;</code> | Output JSON with the specified &#96;fields&#96; |
| <code>--message</code> | <code>-m</code> | string | <code>""</code> | Tag annotation message |
| <code>--template</code> |  | string | <code>""</code> | Format JSON output using a Go template |

### Constraints

- Exactly one of --from-branch or --from-commit is required. --message supplies an annotation.

### JSON fields

<code>commit&#95;sha</code>, <code>message</code>, <code>name</code>, <code>tagged&#95;at</code>

### Output

Prints the created tag and commit, or selected JSON fields.

### Examples

```bash
dh tag create v1 --db OWNER/people --from-branch main --message "First dataset"
```

### Related commands

- [dh tag](/products/dolthub/cli/commands#dh-tag)

## dh version {#dh-version}

Show dh version information

### Usage

```text
dh version [flags]
```

### Flags

| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <code>--help</code> | <code>-h</code> | bool | <code>false</code> | help for version |
| <code>--short</code> |  | bool | <code>false</code> | Print only the version number |

### Output

Prints dh version followed by the build version. --short prints only the version.

### Examples

```bash
dh version
dh version --short
```

### Related commands

- [dh](/products/dolthub/cli/commands#dh)
