Config files

Tinybird projects use configuration files for two different jobs:

  • tinybird.config.json defines project settings, such as which files to include and whether development runs in Cloud Branches or Tinybird Local.
  • .tinyb stores local authentication and Workspace context created by tb login.

Commit tinybird.config.json to version control. Don't commit .tinyb because it can contain authentication tokens.

tinybird.config.json

Use tinybird.config.json to tell Tinybird where your project resources live. The development mode controls the default build target. Use branch for Cloud Branches or local for Tinybird Local.

tinybird.config.json
{
  "dev_mode": "branch",
  "branch_data_mode": "last_partition",
  "folder": "tinybird",
  "include": [
    "tinybird"
  ]
}

Config keys

KeyDescription
includePaths to datafiles or SDK resource definitions that Tinybird builds and deploys.
folderProject folder for datafiles. tb init writes this value to tinybird.config.json. When omitted, Tinybird infers the folder from include.
dev_mode / devModeDefault build target: branch for Cloud Branches, local for Tinybird Local, or manual to require explicit --cloud, --local, or --branch flags.
branch_data_modeData to attach when tb build auto-creates a Cloud Branch with dev_mode=branch. Only last_partition is supported. Defaults to last_partition. The legacy key branch_data_on_create is no longer supported.
token / baseUrlSDK-only. Authentication token and API host, often loaded from environment variables.

For development mode setup, see Local development and Using Cloud Branches.

.tinyb

The .tinyb file contains the Tinybird project configuration, including the authentication token obtained by running tb login.

Running commands requires a valid .tinyb file in the root of your project. If you don't have one, create one by running tb login.

Location

You can place the .tinyb file in the root of your app repository or keep it together with your Tinybird datafiles. Tinybird looks for the .tinyb file in all parent folders until it reaches the home directory.

If your Tinybird files and folders are located in a subdirectory, such as tinybird/, add a cwd field to specify the relative path to that directory.

File structure

The following is a sample .tinyb file:

.tinyb
{
  "host": "<tinybird-host>",
  "id": "<workspace-id>",
  "name": "<workspace-name>",
  "scope": "user",
  "token": "<authentication-token>",
  "tokens": {
    "<tinybird-host>": "<authentication-token>",
    "<another-tinybird-host>": "<authentication-token>"
  },
  "cwd": "<optional-path-to-your-tinybird-folder>",
  "user_email": "<user-email>",
  "user_id": "<user-id>",
  "user_token": "<authentication-token>",
  "version": "<tinybird-version>"
}
Updated