> For the complete documentation index, see [llms.txt](https://docs.dbnl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dbnl.com/v0.31.x/reference/cli.md).

# CLI

Installing and using the DBNL Command Line Interface (CLI)

The dbnl CLI is installed as part of the SDK and allows for interacting with the dbnl platform from the command line.

To install the SDK, run:

```shell
pip install dbnl
```

## `dbnl`

The dbnl CLI.

```shell
dbnl [OPTIONS] COMMAND [ARGS]...
```

* **Options**
  * **`--version`** - Show the version and exit.

### `info`

Info about SDK and API.

```shell
dbnl info [OPTIONS]
```

### `login`

Login to dbnl.

```shell
dbnl login [OPTIONS] API_TOKEN
```

* **Options**
  * **`--api-url <api_url>`** - API url
  * **`--app-url <app_url>`** - App url
* **Arguments**
  * **`API_TOKEN`** - Required argument
* **(Optional) Environment variables**
  * **`DBNL_API_TOKEN`** - Provide a default for `API_TOKEN`
  * **`DBNL_API_URL`** - > Provide a default for [`--api-url`](#cmdoption-dbnl-login-api-url)
  * **`DBNL_APP_URL`** - > Provide a default for [`--app-url`](#cmdoption-dbnl-login-app-url)

### `logout`

Logout of dbnl.

```shell
dbnl logout [OPTIONS]
```

### `sandbox`

Subcommand to interact with the sandbox.

```shell
dbnl sandbox [OPTIONS] COMMAND [ARGS]...
```

#### `delete`

Delete sandbox data.

```shell
dbnl sandbox delete [OPTIONS]
```

* **Options**
  * **`-f, --force`** - Force delete

#### `exec`

Exec a command on the sandbox.

```shell
dbnl sandbox exec [OPTIONS] [COMMAND]...
```

* **Arguments**
  * **`COMMAND`** - Optional argument(s)

#### `logs`

Tail the sandbox logs.

```shell
dbnl sandbox logs [OPTIONS]
```

#### `start`

Start the sandbox.

```shell
dbnl sandbox start [OPTIONS]
```

* **Options**
  * **`-u, --registry-username <registry_username>`** - Registry username
  * **`-p, --registry-password <registry_password>`** - Registry password
  * **`--registry <registry>`** - Registry
  * **`--version <version>`** - Sandbox version
    * Default: `'0.28'`
  * **`--base-url <base_url>`** - Sandbox base url
    * Default: `'http://localhost:8080'`

#### `status`

Get sandbox status.

```shell
dbnl sandbox status [OPTIONS]
```

#### `stop`

Stop the sandbox.

```shell
dbnl sandbox stop [OPTIONS]
```
