# 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

**--namespace-id \<namespace\_id>**

Namespace id

**Arguments**

**API\_TOKEN**

Required argument

**Environment variables**

**DBNL\_API\_TOKEN**

> Provide a default for `API_TOKEN`

**DBNL\_API\_URL**

> Provide a default for `--api-url`

**DBNL\_APP\_URL**

> Provide a default for `--app-url`

**DBNL\_NAMESPACE\_ID**

> Provide a default for `--namespace-id`

### 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]
```

#### 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>**

**Required** Registry password

**--registry**

Registry

* **Default:**`'us-docker.pkg.dev/dbnlai/images'`

**--version**

Sandbox version

* **Default:**`'0.23'`

**--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]
```
