Tinybird CLI

raw JSON →
6.4.1 verified Sat May 09 auth: no python

Tinybird CLI is a command-line tool for interacting with the Tinybird platform, used for data ingestion, query execution, and workspace management. Current version 6.4.1 supports Python <3.14,>=3.10, with quarterly releases.

pip install tinybird-cli
error ModuleNotFoundError: No module named 'tinybird'
cause Package renamed from `tinybird` to `tinybird-cli` in v6.0.0, and import module changed to `tinybird_cli`.
fix
Install the correct package: pip install tinybird-cli, then import from tinybird_cli import ...
error AttributeError: module 'tinybird_cli' has no attribute 'Client'
cause The old `Client` class was removed in v6.0.0; replaced by `Auth` and `WorkspaceClient`.
fix
Use from tinybird_cli import Auth, WorkspaceClient and construct with Auth(token=...).
breaking Version 6.0.0 renamed the package from `tinybird` to `tinybird-cli` and changed the import module from `tinybird` to `tinybird_cli`.
fix Update imports: from tinybird_cli import ... instead of from tinybird import ...
deprecated Authentication via `TB_TOKEN` environment variable is deprecated since v5.0.0; use `Auth(token=...)` instead.
fix Replace `os.environ.get('TB_TOKEN')` with explicit `Auth(token=...)` instantiation.
gotcha The CLI commands in documentation may not match Python API method names. For example, `tb workspace list` corresponds to `WorkspaceClient.list()`.
fix Refer to the official Python SDK docs for method signatures instead of CLI help.

Initialize the client with a Tinybird token from the TB_TOKEN environment variable and list workspaces.

import os
from tinybird_cli import Auth, WorkspaceClient

token = os.environ.get('TB_TOKEN', '')
auth = Auth(token=token)
client = WorkspaceClient(auth=auth)
workspaces = client.list()
print(workspaces)