---
title: Config files
meta:
  description: Tinybird project configuration files, including tinybird.config.json and .tinyb.
---

# 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.

{% tabs initial="Tinybird CLI" %}
{% tab label="Tinybird CLI" %}

```json {% title="tinybird.config.json" %}
{
  "dev_mode": "branch",
  "include": [
    "tinybird"
  ]
}
```

{% /tab %}
{% tab label="TypeScript SDK" %}

```json {% title="tinybird.config.json" %}
{
  "include": [
    "lib/tinybird.ts"
  ],
  "token": "${TINYBIRD_TOKEN}",
  "baseUrl": "${TINYBIRD_URL}",
  "devMode": "branch"
}
```

{% /tab %}
{% tab label="Python SDK" %}

```json {% title="tinybird.config.json" %}
{
  "include": [
    "src/tinybird"
  ],
  "token": "${TINYBIRD_TOKEN}",
  "baseUrl": "${TINYBIRD_URL}",
  "devMode": "branch"
}
```

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

For development mode setup, see [Local development](/forward/development-workflow/local-development) and [Using Cloud Branches](/forward/development-workflow/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](/forward/dev-reference/commands/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:

```json {% title=".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>"
}
```
