Get started with Tinybird¶
Tinybird gives you the tooling and infrastructure you need to ship analytics features in your application.
Follow this step-by-step tutorial to create and iterate your first project from idea to deploying to production.
Before you begin¶
To get started, you need the following:
- A free Tinybird account
- A container runtime, like Docker or Orbstack
- Linux or macOS
Install and authenticate¶
To install the Tinybird CLI, run the following command:
curl -LsSf https://api.tinybird.co/static/install.sh | sh
Then, authenticate with your Tinybird account using tb login
:
# Opens a browser window so that you can authenticate tb login
In the browser popup, create a new Workspace or select an existing one.
GCP europe-west2 is currently the only region supported.
Run Tinybird Local¶
Once authenticated, run tb local start
to start Tinybird Local:
tb local start » Starting Tinybird Local... * Waiting for Tinybird Local to be ready... ✓ Tinybird Local is ready!
Create a project¶
Pass an LLM prompt using the --prompt
flag to generate a customized starter project. For example:
tb create --prompt "I am developing the insights page for my app. I am tracking their usage and \ want to show them a line chart and a widget with the total amount of actions they did with time \ range filters. It is a multitenant app, so organization id is a required param for all endpoints"
The previous prompt creates a project with a structure similar to the following:
. ├── copies ├── datasources │ └── user_actions.datasource ├── endpoints │ ├── user_action_insights_line_chart.pipe │ └── user_action_insights_widget.pipe ├── fixtures ├── materializations ├── sinks └── tests
Build your project¶
Run tb dev
to build your project and watch for changes. Building your project ensures that your datafiles are valid and are ready for deployment.
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 >
When you finish developing, you can exit the tb dev
session.
Deploy to Tinybird Cloud¶
Deploying a project validates and pushes the data project to your local or cloud environment.
To deploy to Tinybird Cloud, create a deployment using the --cloud
flag. This prepares all the resources in the cloud environment.
Pass the --wait
flag to wait for the deployment to finish and the --auto
flag to automatically promote the deployment:
# Prepares all resources in Tinybird Cloud tb --cloud deployment create --wait --auto
You can now access your new project in Tinybird Cloud. To view your deployment, navigate to the Deployments section.
Next steps¶
- Familizarize yourself with Tinybird concepts. See Concepts.
- Learn about datafiles, like .datasource and .pipe files. See Datafiles.
- Learn how to change and test your project. See Iterate your project.
- Deploy your project. See Deployments.
- Browse the Tinybird CLI commands reference. See Commands reference.