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

# TypeScript SDK CLI commands

The TypeScript SDK ships with a `tinybird` CLI. Install it globally to run `tinybird` directly, or use `npx` for one-off usage. It manages TypeScript-based Tinybird projects, syncs resources, and deploys them to Tinybird.

## Install

```shell
pnpm add -g @tinybirdco/sdk
```

Or install it in your project and run it with `npx tinybird`:

```shell
pnpm install @tinybirdco/sdk
```

## Commands

### `tinybird init`

Scaffolds a new TypeScript project, authenticates you if needed, and can optionally add CI/CD workflow files.

```shell
tinybird init
tinybird init --force
tinybird init --skip-login
```

### `tinybird dev`

Watch for changes and sync to Tinybird. Defaults to a feature branch; use `--local` to work against Tinybird Local.

```shell
tinybird dev
tinybird dev --local
tinybird dev --branch my_feature_branch
```

### `tinybird build`

Build and push resources to a Tinybird branch. Use this in CI for preview environments.

```shell
tinybird build
tinybird build --dry-run
tinybird build --local
tinybird build --branch my_feature_branch
```

### `tinybird deploy`

Deploy resources to your main Tinybird workspace (production).

```shell
tinybird deploy
tinybird deploy --dry-run
```

### `tinybird preview`

Creates or replaces an ephemeral preview branch and deploys the project resources to it. Designed for CI pipelines. See [Preview deployments](/forward/test-and-deploy/deployments/cicd#preview-deployments) for details.

```shell
tinybird preview
tinybird preview --dry-run
tinybird preview --check
tinybird preview --name custom_branch_name
tinybird preview --local
```

### `tinybird migrate`

Migrate `.datasource`, `.pipe`, and `.connection` files into TypeScript definitions.

```shell
tinybird migrate "tinybird/**/*.datasource" "tinybird/**/*.pipe" "tinybird/**/*.connection"
tinybird migrate tinybird/legacy --out ./tinybird.migration.ts
tinybird migrate tinybird --dry-run
```

### `tinybird pull`

Download cloud resources as Tinybird datafiles.

```shell
tinybird pull
tinybird pull --output-dir ./tinybird-datafiles
tinybird pull --force
```

### `tinybird login`

Authenticate with Tinybird and write credentials to `.env.local`.

```shell
tinybird login
```

### `tinybird branch`

Manage Tinybird branches.

```shell
tinybird branch list
tinybird branch status
tinybird branch delete my_feature_branch
```

### `tinybird info`

Display information about the current project and workspace.

```shell
tinybird info
tinybird info --json
```

## Next steps

- Follow the TypeScript SDK quickstart. See [Quick start: TypeScript SDK](/forward/quickstarts/typescript-sdk).
