Skip to main content
truss push [OPTIONS] [TARGET_DIRECTORY]
Deploys a Truss to Baseten. By default, creates a published deployment.

Options

--config
PATH
Path to a custom config file. Defaults to config.yaml in the Truss directory.
--remote
TEXT
Name of the remote in .trussrc to push to.
--watch
Create a development deployment, wait for it to deploy, then watch for source code changes and apply live patches. Use this for rapid iteration during development. Cannot be used with --promote, --environment, or --tail.
--publish
Deprecated: published is now the default behavior for truss push. Previously required to create a published deployment. If no production deployment exists, the first published deployment is automatically promoted to production.
--promote
Push as a published deployment and promote to production, even if a production deployment already exists.
--environment
TEXT
Push as a published deployment and promote into the specified environment. When specified, --publish is implied and --promote is ignored.
--preserve-previous-production-deployment
Preserve the previous production deployment’s autoscaling settings. Can only be used with --promote.
--preserve-env-instance-type / --no-preserve-env-instance-type
When pushing to an environment, preserve the instance type configured in the environment instead of using the resources from the Truss config. Default: --preserve-env-instance-type. Ignored if --environment is not specified.
--model-name
TEXT
Temporarily overrides the model name for this deployment without updating config.yaml.
--deployment-name
TEXT
Name of the deployment. Only applies to published deployments (not development deployments created with --watch). Must contain only alphanumeric, ., -, or _ characters.
--wait / --no-wait
Wait for deployment to complete before returning. Returns non-zero exit code if deploy or build fails.
--tail
Stream deployment logs after push. Cannot be used with --wait.
--labels
TEXT
Pass a JSON string with key-value pairs. This will be attached to the deployment and can be used for searching and filtering.
truss push --labels '{"env": "staging", "team": "ml-platform", "version": "1.2.0"}'
--timeout-seconds
INTEGER
Maximum time to wait for deployment status polling in seconds. Only applies when --wait is used. This is a client-side timeout for the polling loop. For a server-side deploy operation timeout, use --deploy-timeout-minutes.
--include-git-info
Attach git versioning info (sha, branch, tag) to the deployment. Can also be set permanently in .trussrc.
--disable-truss-download
Disable downloading the Truss directory from the UI.
--no-cache
Force a full rebuild without using cached layers.
--deploy-timeout-minutes
INTEGER
Timeout in minutes for the deploy operation.
--team
TEXT
Name of the team to deploy to. If not specified, Truss infers the team based on your team membership and existing models, or prompts for selection when ambiguous.
The --team flag is only available if your organization has teams enabled. Contact us to enable teams, or see Teams for more information.

Arguments

TARGET_DIRECTORY
TEXT
A Truss directory. Defaults to current directory.
Examples: Deploy a published deployment from the current directory:
truss push
You should see:
Deploying as a published deployment. Use --watch for a development deployment.
✨ Model my-model was successfully pushed ✨
🪵  View logs for your deployment at https://app.baseten.co/models/.../logs
Create a development deployment and start watching for changes:
truss push --watch
Deploy and promote to production:
truss push --promote
Deploy to a specific environment:
truss push --environment staging
Deploy with a custom deployment name:
truss push --deployment-name my-model_v1.0
Deploy with a custom config file:
truss push --config my-config.yaml
Deploy to a specific team:
truss push --team my-team-name