---
title: "Python SDK CLI commands"
meta:
    description: Reference for the Tinybird Python SDK CLI commands.
---

# Python SDK CLI commands

The Python SDK (`tinybird-sdk`) installs a `tinybird` command.

- `tinybird generate` and `tinybird migrate` are SDK-native commands.
- Other commands are passed through to the installed Tinybird CLI dependency.

{% callout type="note" %}
Supported Python versions are 3.11, 3.12, and 3.13. Python 3.14 is not supported yet.
{% /callout %}

## Install

{% tabs initial="pip" %}
{% tab label="pip" %}

```shell
pip install tinybird-sdk
```

{%/tab%}
{% tab label="uv" %}

```shell
uv add tinybird-sdk
```

{%/tab%}
{%/tabs%}

## Project and deployment commands

### `tinybird init`

Initialize a project.

```shell
tinybird init --dev-mode branch --cicd skip --folder tb_project
tinybird init --dev-mode local --cicd github --folder tb_project
tinybird init --dev-mode branch --cicd skip --folder tb_project --skip-login
```

### `tinybird dev`

Build server-side and watch for changes.

```shell
tinybird dev
tinybird dev --with-connections
tinybird dev --no-connections
```

### `tinybird build`

Validate and build the current project.

```shell
tinybird build
tinybird build --watch
tinybird build --with-connections
```

### `tinybird deploy`

Deploy resources from your project.

```shell
tinybird deploy
tinybird deploy --check
tinybird deploy --wait --auto
tinybird deploy --allow-destructive-operations
```

### `tinybird preview`

Create a preview environment and deploy project resources.

```shell
tinybird preview
tinybird preview --dry-run
tinybird preview --check
tinybird preview --name pr_482
```

### `tinybird pull`

Pull latest resources from Tinybird.

```shell
tinybird pull
tinybird pull --force
tinybird pull --only-vendored
```

### `tinybird login`

Authenticate with Tinybird.

```shell
tinybird login
tinybird login --interactive
tinybird login --host https://api.us-east-1.aws.tinybird.co
```

### `tinybird branch`

Manage branches.

```shell
tinybird branch ls
tinybird branch create my_feature_branch
tinybird branch clear my_feature_branch
tinybird branch rm my_feature_branch
```

### `tinybird info`

Show project information.

```shell
tinybird info
tinybird info --skip-local
```

## SDK-native commands

### `tinybird generate`

Generates `.datasource`, `.pipe`, and `.connection` files from the Python resource definitions in your project.

```shell
tinybird generate
tinybird generate -o ./tinybird_datafiles
tinybird generate -o ./tinybird_datafiles --json
```

### `tinybird migrate`

Migrate `.datasource`, `.pipe`, and `.connection` files to Python SDK definitions.

```shell
tinybird migrate "tinybird/**/*.datasource" "tinybird/**/*.pipe" "tinybird/**/*.connection"
tinybird migrate tinybird/legacy --out ./tinybird.migration.py
tinybird migrate tinybird --dry-run --json
tinybird migrate tinybird --no-strict
```

## Next steps

- Review Python resource definitions: [Python SDK resources](/forward/dev-reference/python-sdk-resources)
- Follow the Python SDK quickstart: [Quick start: Python SDK](/forward/get-started/quick-start-python-sdk)
- Explore the SDK source repository: [tinybird-sdk-python](https://github.com/tinybirdco/tinybird-sdk-python)
