.agents/skills/tinybird-cli-guidelines/rules/build-deploy.md
Use this rule to keep local files, development environments, and production deployments aligned under the CLI 4.0 workflow.
dev_mode in tinybird.config.json (branch, local, or manual).tb build to validate and sync to the configured development target.tb deploy to deploy to Tinybird Cloud main (production).In CLI 4.0, build/deploy should usually be run without --cloud, --local, or --branch.
tb build Behaviordev_mode=local: builds against Tinybird Local.dev_mode=branch: builds against a Cloud branch derived from the current git branch (created automatically if needed).dev_mode=manual: requires explicit flags (--local, --cloud, --branch) for environment selection.main/master is blocked to avoid accidental production changes.tb deploy Behaviortb deploy deploys current project files to Tinybird Cloud main.tb deploy --check before real deploys to catch schema/dependency issues early.tb deploy --allow-destructive-operations only when the user confirms deletion or data loss is acceptable.Example:
tb deploy --allow-destructive-operations
dev_mode.--allow-destructive-operations and explicit user confirmation.tb build; build and deploy are separate operations.