wtree Cloud

Environment commands

Manage the environments of a project with the environment group.

The environment group manages a project's environments, such as production and staging. Applications and databases live in an environment, so you need an environmentId to create them. You must be authenticated.

CommandWhat it does
wtree-cloud-cli environment by-project-id --projectId <id>List the environments of a project.
wtree-cloud-cli environment one --environmentId <id>Get the details of an environment.
wtree-cloud-cli environment searchSearch environments.
wtree-cloud-cli environment create --name <name> --projectId <id>Create an environment in a project.
wtree-cloud-cli environment update --environmentId <id>Update an environment. Accepts --name, --description and --env.
wtree-cloud-cli environment duplicate --environmentId <id> --name <name>Duplicate an environment.
wtree-cloud-cli environment remove --environmentId <id>Delete an environment.

Examples

# List the environments of a project
wtree-cloud-cli environment by-project-id --projectId abc123

# Create a staging environment
wtree-cloud-cli environment create --name staging --projectId abc123

# Set the shared variables of an environment
wtree-cloud-cli environment update --environmentId env123 --env "$(cat .env)"

Service variables

To set variables for a single service, use save-environment in its group, such as wtree-cloud-cli application save-environment or wtree-cloud-cli postgres save-environment. See Application.

On this page