Skip to main content

CLI tool for managing ThingsBoard resources

Project description

ThingsBoard CLI

CLI tool for managing ThingsBoard resources from the terminal.

Installation

Install uv if you don't have it:

curl -LsSf https://astral.sh/uv/install.sh | sh

Then install the CLI:

uv tool install thingsboard-cli

Upgrading

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

tb update

Local development

Editable install — changes take effect immediately:

uv tool install -e .

Note: uv tool install overwrites any previous installation. When switching between editable and published installs, uninstall first to avoid stale cache issues:

uv tool uninstall thingsboard-cli

Updating tb-pe-client

The tb-pe-client dependency is pulled from PyPI and updated frequently. To pick up a new version:

uv lock --refresh-package tb-pe-client && uv sync

Shell Completion

# Bash
tb --install-completion bash

# Zsh
tb --install-completion zsh

# Fish
tb --install-completion fish

Restart your terminal after installing completion.

Usage

tb --help
tb config set --url https://thingsboard.cloud --api-key YOUR_KEY
tb device list

Verbose Help

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

tb device create -H
tb dashboard save -H

Regenerating Help Text

After updating tb-pe-client, regenerate the help text from the API docs:

./scripts/generate-help.sh

This reads the markdown docs from ../thingsboard-java-client/pe/docs/ and generates Python modules in src/thingsboard_cli/help/_generated/.

Publishing

Requires twine for uploading and credentials configured in ~/.pypirc:

uv tool install twine
./scripts/release.sh --version 4.3.1.2.post1         # TestPyPI (default, staging)
./scripts/release.sh --version 4.3.1.2 --prod        # PyPI (production)
./scripts/release.sh --version 4.3.1.2 --dry-run     # Build only, no upload

TestPyPI is the default on purpose — a misfire goes to staging, not to the real index. Add --prod only when you intend to publish a production release.

The publish script automatically updates the scaffold content hash in scaffold/manifest.json before building. If you change scaffold files without publishing, update the hash manually:

uv run python scripts/update_scaffold_hash.py

CI enforces that the hash matches — if scaffold files change but manifest.json isn't updated, test_scaffold_hash_matches_manifest will fail.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thingsboard_cli-4.3.1.2.tar.gz (37.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thingsboard_cli-4.3.1.2-py3-none-any.whl (39.0 MB view details)

Uploaded Python 3

File details

Details for the file thingsboard_cli-4.3.1.2.tar.gz.

File metadata

  • Download URL: thingsboard_cli-4.3.1.2.tar.gz
  • Upload date:
  • Size: 37.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for thingsboard_cli-4.3.1.2.tar.gz
Algorithm Hash digest
SHA256 4c4d65b804ea7a7015d4f303ed63a7747db0b8cf8078506546a9cb4c574440a5
MD5 c1a6866ab2b520980a33d3fb5c33156f
BLAKE2b-256 4b3576b4f53219597c8a50cb2bdb5e352f2df96f124b900960135aa8d4948f89

See more details on using hashes here.

File details

Details for the file thingsboard_cli-4.3.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for thingsboard_cli-4.3.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b81cdf87193f3c7d730456987f9898af26f7f48b88dc1d23004958964cfa42b
MD5 335590fcdb5b09bf4b8486e0108504d5
BLAKE2b-256 d609de92d0cec195ad4c8880813906588cc9f4dcff9de2fd1941005f7959ff92

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page