Metadata-Version: 2.4
Name: thingsboard-cli
Version: 4.4.0.1
Summary: CLI tool for managing ThingsBoard resources
Project-URL: Homepage, https://github.com/thingsboard/thingsboard-cli
Project-URL: Source, https://github.com/thingsboard/thingsboard-cli
Project-URL: Issues, https://github.com/thingsboard/thingsboard-cli/issues
Requires-Python: <3.15,>=3.11
Requires-Dist: click<9.0,>=8.1
Requires-Dist: filelock<4.0,>=3.13
Requires-Dist: httpx<1.0,>=0.28
Requires-Dist: packaging>=24.0
Requires-Dist: pydantic-settings<3.0,>=2.13
Requires-Dist: pydantic<3.0,>=2.12
Requires-Dist: questionary<3.0,>=2.0
Requires-Dist: rich<15.0,>=14.0
Requires-Dist: tb-pe-client==4.4.0
Requires-Dist: textual<2.0,>=0.83
Requires-Dist: typer<1.0,>=0.24.1
Requires-Dist: tzdata>=2024.1
Description-Content-Type: text/markdown

# ThingsBoard CLI

CLI tool for managing ThingsBoard resources from the terminal.

## Installation

Run one command. It installs [uv](https://docs.astral.sh/uv/) if it is missing, installs the CLI, and starts the guided setup:

```bash
# macOS and Linux
curl -LsSf https://thingsboard.io/cli/install.sh | sh
```

```powershell
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://thingsboard.io/cli/install.ps1 | iex"
```

Or install with uv yourself:

```bash
uv tool install thingsboard-cli
```

### Upgrading

The CLI checks for updates automatically on launch and prompts to upgrade. You can also upgrade manually:

```bash
tb update
```

### Shell Completion

```bash
# Bash
tb --install-completion bash

# Zsh
tb --install-completion zsh

# Fish
tb --install-completion fish
```

Restart your terminal after installing completion.

## Usage

```bash
tb init my-project      # create a project, connect to ThingsBoard, and see the next steps
tb config               # connect to ThingsBoard (add --browser when an AI agent runs it)
tb device list
tb --help
```

## Environment Variables

| Variable | Purpose |
|---|---|
| `TB_URL` | ThingsBoard URL. Overrides the URL of the active profile. |
| `TB_API_KEY` | API key. Overrides the credentials of the active profile. Use it with `TB_URL` in CI. |
| `TB_PROFILE` | Name of the profile to use, the same as `--profile`. |
| `TB_CONFIG_HOME` | Folder for profiles and settings. Default: `~/.thingsboard`. |
| `TB_DEBUG` | Set to `1` to print every HTTP request and response, the same as `--debug`. |

Example for CI:

```bash
TB_URL=https://thingsboard.cloud TB_API_KEY=$TB_API_KEY tb push my-solution
```

## Verbose Help

Use `-H` or `--help-verbose` on any command to see detailed API documentation, JSON schemas, and field descriptions:

```bash
tb device create -H
tb dashboard save -H
```

## Contributing

For local development setup, editable installs, regenerating help text, and publishing, see [CONTRIBUTING.md](https://github.com/thingsboard/thingsboard-cli/blob/master/CONTRIBUTING.md).
