Skip to main content

Set up the Worktree CLI

To deploy and manage resources in Worktree Cloud, you can use the official wtc CLI.

wtc currently supports:

  1. Deploying static sites
  2. Managing objects in Object Storage
note

Region is a required configuration option in all cases for futureproofing, however currently qc-south-1 is the only supported region.

Authorize the CLI

The first step is to authorize the CLI so it can access your resources. Authorization is handled entirely by Credentials.

First, navigate to the Cloud Console → Credentials. Create a new Credential that has access to the resources you want to use with the CLI.

Then, create a config file at ~/.config/worktree/cli.yaml, and populate the credentials you just created:

profiles:
default:
public_key: wt_pub_xxx
secret_key: wt_sec_yyy
region: qc-south-1

The CLI uses "profiles" to separate different accounts; it will use default by default, but you can name the profile anything you wish -- if it's not default you'll have to provide the WTC_PROFILE environment variable or --profile CLI flag.

Using the Environment

If you don't want to (or can't) use the config file, you can configure the CLI entirely through environment variables.

At a minimum, you must set:

  • WTC_PUBLIC_KEY to your credential's public key
  • WTC_SECRET_KEY to your credentials' secret key
  • WTC_REGION to the region of your resources