Skip to main content

tcb env use

Sets the global default environment, so later commands can omit -e.

Usage​

tcb env use <envId>

Flags​

FlagRequiredDescriptionDefault
<envId>NoEnvironment ID. Prints the current default environment when omitted—
--unsetNoClear the global default environment—

Example​

# Set the default environment
tcb env use my-env-id

# Show the current default environment
tcb env use

# Clear it
tcb env use --unset
Versions

The tcb env use command has been available since v3.0.0.

Environment ID resolution​

The environment ID is resolved in this order, from lowest to highest priority:

Global configuration (tcb env use) < project cloudbaserc.json < command line -e / --env-id
  • The -e flag always wins
  • Next comes the environment configured in the project cloudbaserc.json
  • The global default environment is the fallback

Several projects on the same machine share the global default environment. When working across projects, pin the environment in cloudbaserc.json.