
Tinybird Cli Guidelines
Ingest and append event or batch data into Tinybird datasources and work in Cloud branches without guessing `tb` CLI flags.
Overview
Tinybird CLI Guidelines is an agent skill most often used in Build (also Operate) that documents how to append data and use Tinybird Cloud branches with the `tb` CLI.
Install
npx skills add https://github.com/tinybirdco/tinybird-agent-skills --skill tinybird-cli-guidelinesWhat is this skill?
- Three append modes: local file, remote URL, and inline `--events` JSON via `tb datasource append`
- Cloud vs Local targeting with `tb --cloud` for production-shaped workspaces
- Branch workflow for isolated dev/test with optional production data shapes
- Pointers to Kafka, S3, and GCS connectors and v0/events vs v0/datasources ingestion
- Solo vs team guidance: branches for collaboration; Local `dev_mode` for fast solo iteration
- Documents 3 CLI append input modes: local file, remote URL, and inline events JSON
Adoption & trust: 652 installs on skills.sh; 19 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need reliable Tinybird ingestion and environment isolation but the CLI supports multiple append modes, Cloud/Local flags, and branch workflows that are easy to mix up.
Who is it for?
Solo builders or tiny teams shipping event analytics on Tinybird who want copy-paste CLI flows for append, Cloud targeting, and branch-based testing.
Skip if: Builders who only need one-off SQL in the Tinybird UI with no automation, or teams that have not created a workspace/datasource yet.
When should I use this skill?
You are appending data to Tinybird datasources, choosing Cloud vs Local, or setting up branch-based development on a shared workspace.
What do I get? / Deliverables
Your agent runs the correct `tb datasource append` or API ingestion path and picks branch vs local dev so data lands in the intended datasource without breaking shared workspaces.
- Correct `tb datasource append` commands or v0/events and v0/datasources ingestion steps
- Branch vs Local development decision aligned to team size and risk
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Data plumbing and connector-style ingestion are core Build work before analytics endpoints ship. The skill documents `tb datasource append`, streaming/batch APIs, and connector paths—integration work against Tinybird, not app UI.
Where it fits
Append a staging CSV into a dev datasource before publishing a new pipe endpoint.
Re-run a file append to backfill missing events after a deploy regression.
Create a Cloud branch with production data shapes to sanity-check a new schema.
Document the canonical CLI path your agent uses when refreshing marketing funnel tables.
How it compares
Procedural Tinybird CLI skill—not a generic database migration generator or an MCP server wrapper.
Common Questions / FAQ
Who is tinybird-cli-guidelines for?
Indie builders and small teams using Tinybird for real-time or batch analytics who automate ingestion from agents or CI and need correct `tb` CLI usage.
When should I use tinybird-cli-guidelines?
During Build when wiring datasources and connectors; during Operate when appending production fixes or validating branch copies; during Validate when you need production-shaped data in an isolated branch.
Is tinybird-cli-guidelines safe to install?
Append and branch commands can write to real Cloud workspaces if mis-targeted—review the Security Audits panel on this page before letting an agent run `tb --cloud` against production.
SKILL.md
READMESKILL.md - Tinybird Cli Guidelines
# Append Data Tinybird CLI supports three ways to append data to an existing datasource: local file, remote URL, or events payload. ## CLI: tb datasource append ``` tb datasource append [datasource_name] --file /path/to/local/file ``` ``` tb datasource append [datasource_name] --url https://example.com/data.csv ``` ``` tb datasource append [datasource_name] --events '{"a":"b", "c":"d"}' ``` Notes: - The command appends to an existing datasource. - Use `tb --cloud datasource append` to target Cloud; Local is the default. - For ingesting data from Kafka, S3 or GCS, see: https://www.tinybird.co/docs/forward/get-data-in/connectors You can also send POST request to v0/events (streaming) and v0/datasources (batch) endpoints. # Branch Development ## Overview Tinybird Cloud branches provide isolated environments for development and testing. Each branch gets its own copy of resources and can optionally include production data. Branches are the recommended workflow for teams collaborating on the same workspace. ## When to Use Branches - Developing features that need real production data shapes for testing - Collaborating with a team where multiple people work on the same workspace - Testing schema changes or new endpoints before deploying to production - CI/CD workflows that validate changes on pull requests For solo development or quick iteration, Tinybird Local (`dev_mode=local`) may be faster. See `rules/local-development.md`. ## Branch Workflow 1. Create a git branch for your feature 2. Run `tb dev` — Tinybird automatically creates a Cloud branch matching your git branch name 3. Develop and test against the branch (file changes are watched and auto-rebuilt) 4. Push changes and create a PR 5. Merge to deploy to production ## Creating Branches Automatic (recommended): Check out a git branch and run `tb dev` or `tb build`. Tinybird automatically creates or uses a Cloud branch with the same name as your git branch. Manual: ``` tb branch create my_feature ``` Branch names must use underscores, not hyphens (e.g., `my_feature`, not `my-feature`). ### The `--last-partition` Flag Use `--last-partition` to copy the latest partition of production data into the branch: ``` tb branch create my_feature --last-partition ``` This is useful when you need real data to test queries, validate endpoint behavior, or debug issues that depend on production data shapes. Without it, the branch starts empty. ### The `--with-connections` Flag Use `--with-connections` to enable connectors (Kafka, S3, GCS) in the branch: ``` tb branch create my_feature --last-partition --with-connections ``` For S3/GCS, import sample data with `tb --branch=my_feature datasource sample <datasource> --wait`. Kafka connections are stopped by default and need to be started explicitly with `tb --branch=my_feature datasource start <datasource>`. ## Working with Branch Tokens After creating a branch, you may need its token to connect client applications (dashboards, APIs, scripts) to the branch environment instead of production. List tokens for a branch: ``` tb --branch my_feature token ls ``` ### Using Branch Tokens in Client Apps A common pattern is to set an environment variable that your application checks, falling back to the production token when no branch token is set: ```env # .env.local TINYBIRD_API_URL=https://api.tinybird.co TINYBIRD_API_TOKEN=<production-read-token> TINYBIRD_BRANCH_TOKEN=<branch-token> ``` In your application, prioritize the branch token when present: ``` token = TINYBIRD_BRANCH_TOKEN || TINYBIRD_API_TOKEN ``` This way, setting or unsetting the branch token switches between branch and production data without code changes. ## Branch Commands Reference - `tb branch ls`: List all branches - `tb branch create <name>`: Create a new branch (empty) - `tb branch create <name> --last-partition`: Create a branch with latest production data - `tb branch create <name> --last-partition --with-connections`: Create a branch with d