Skip to main content

The Core Command

tu deploy
The CLI reads config.yaml, resolves the effective branch, builds an image, and creates a new version for the matching environment.

The Deployment Model

ResourceMeaning
EnvironmentA named policy such as production or preview
BranchA branch-specific deployment slot
VersionOne deployed build of your agent
Every deploy creates a new version. A branch points at the current active version.

Branch Resolution

For tu deploy, the branch comes from:
  1. --branch, if provided
  2. the current git branch
  3. fallback logic when git context is unavailable
The platform then resolves that branch to an environment using branch rules. In a default setup:
BranchEnvironmentConfig section
mainproductiondeployment.production
other branchespreviewdeployment.preview

config.yaml

agent:
  name: my-namespace/my-agent
  description: Example agent
  sdk_type: claude_agent_sdk

deployment:
  production:
    replicaCount: 1
    areTasksSticky: true
  preview:
    replicaCount: 1
    areTasksSticky: false

Task Stickiness

areTasksSticky controls what happens to running tasks during a rollout.
SettingBehavior
trueRunning tasks stay on the version they started on
falseRunning tasks can migrate during rollout
If you need to move running tasks later, use tu tasks migrate.

Environment Secrets

Runtime secrets are environment-scoped. Use tu env add to set them and tu env ls, tu env get, tu env rm, tu env pull, and tu env import to manage them. Your code reads them through normal environment variables:
import os

api_key = os.environ["API_KEY"]

Rollback

Use tu rollback to move a branch back to an earlier version.
tu rollback
Rollback uses the target version’s secret snapshot. Pending environment-secret changes are not rewritten by the rollback.

Deployment History

Use tu ls to inspect version history and branch events:
tu ls
tu ls <branch>
Use tu logs to inspect runtime behavior:
tu logs
tu logs <namespace/agent> --since 1h --level WARNING

Useful Flags

CommandCommon flags
tu deploy--config, --branch, --skip-build, --no-cache, --yes, --verbose, --detach
tu rollback--branch, --version, --agent, --config, --yes, --json
tu logs--task, --level, --source, --since, --until, --version, --limit, --follow

Remote Builds

Remote build mode is controlled by the CLI runtime, and when enabled it builds remotely instead of locally. One important constraint: remote builds are linux/amd64 only. See CLI Reference for command details.