tb dev

Use tb dev to build your project and watch for changes. When in watch mode you can run SQL queries against the project and also run commands, as --build becomes the default target.

For example:

tb dev

» Building project...
✓ datasources/user_actions.datasource created
✓ endpoints/user_actions_line_chart.pipe created
✓ endpoints/user_actions_total_widget.pipe created

✓ Rebuild completed in 0.2s

Watching for changes...

tb >

You can run commands and queries from the tb dev prompt. For example:

tb » select * from reservoir_levels


» Running QUERY

  day          station               abslevel   percentagevolume          volume
  Date         String       Nullable(Float32)            Float32         Float32
──────────────────────────────────────────────────────────────────────────────────
  2025-02-07   station_4         108667680000       108667680000   1086676860000
──────────────────────────────────────────────────────────────────────────────────
  2025-01-13   station_9         325980750000       325980750000   3259807600000
──────────────────────────────────────────────────────────────────────────────────
  2025-01-30   station_2         406434020000       406434020000   4064340300000
──────────────────────────────────────────────────────────────────────────────────
  2025-02-09   station_2          60706034000        60706034000    607060300000
──────────────────────────────────────────────────────────────────────────────────
  2025-01-25   station_7         403222040000       403222040000   4032220400000
──────────────────────────────────────────────────────────────────────────────────

» 331 bytes (5 rows x 5 cols) in 6.85ms
» Showing all rows

Open UI in editor mode

Passing --ui flag, your browser opens a UI with a Project section where you can edit your files as if you were in your IDE.

 tb dev --ui

» Starting Tinybird dev server...

✓ Dev server running on http://localhost:49161
* Access your project at https://cloud.tinybird.co/local/7181/your_workspace/project

» Building project...
No changes. Build skipped.

Watching for changes...

tb »

Fetch data from Cloud workspace

You can ingest data from Cloud workspace by passing the --data-origin flag with cloud value.

tb dev --data-origin=cloud

Running against Tinybird Cloud: Workspace <workspace_name>
» Building project...

** Running 'get_reservoir_levels'
** 'get_reservoir_levels' created

✓ Build completed in 0.9s

Watching for changes...

Possible values for --data-origin are cloud and local (default).

Updated