th config

Set the Project, region and Console endpoint the CLI uses, list your Projects and regions, and print the CLI version.

About

The config file holds three settings: project (ID or slug), region (ID) and endpoint (Console URL). A parameter on the command line wins over an environment variable (TH_PROJECT, TH_REGION, TH_ENDPOINT), which wins over the config file.

To see who you are signed in as, use th whoami.

How-to guides

Switch between Projects

  1. List the Projects you own or were invited to with th projects list.
  2. Make one the default with th config set project <slug>.
  3. For a single command in another Project, add --project <slug> instead.
Shell
th projects list
th config set project acme
th container services list --project acme-staging

Commands

CommandDescription
th config setSaves a setting (project, region or endpoint) in the config file.
th config getPrints one setting from the config file.
th config unsetRemoves a setting from the config file.
th config listPrints every setting in the config file.
th projects listLists the Projects you own or were invited to.
th regions listLists regions and their compute classes.
th versionPrints the CLI version.

th config set

Saves a setting (project, region or endpoint) in the config file.

Syntax

Shell
th config set PROPERTY VALUE

Properties: project (ID or slug), region (ID), endpoint (Console URL).

Examples

Use the Project acme by default

Shell
th config set project acme

Create new services in bkk

Shell
th config set region bkk

Positional arguments

NameDescription
PROPERTYRequiredproject, region or endpoint.
VALUERequiredThe new value: a Project ID or slug, a region ID, or a Console URL.

Global parameters

This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.

Back to top ↑

th config get

Prints one setting from the config file.

Syntax

Shell
th config get PROPERTY

Properties: project (ID or slug), region (ID), endpoint (Console URL).

Examples

Print the default Project

Shell
th config get project

Positional arguments

NameDescription
PROPERTYRequiredproject, region or endpoint.

Global parameters

This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.

Back to top ↑

th config unset

Removes a setting from the config file.

Syntax

Shell
th config unset PROPERTY

Properties: project (ID or slug), region (ID), endpoint (Console URL).

Examples

Remove the default region

Shell
th config unset region

Positional arguments

NameDescription
PROPERTYRequiredproject, region or endpoint.

Global parameters

This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.

Back to top ↑

th config list

Prints every setting in the config file.

Syntax

Shell
th config list

Properties: project (ID or slug), region (ID), endpoint (Console URL).

Examples

Show every setting

Shell
th config list

Global parameters

This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.

Back to top ↑

th projects list

Lists the Projects you own or were invited to.

Syntax

Shell
th projects list

Examples

List your Projects

Shell
th projects list

As JSON

Shell
th projects list --format json

Global parameters

This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.

Back to top ↑

th regions list

Lists regions and their compute classes.

Syntax

Shell
th regions list

Examples

List regions and their compute classes

Shell
th regions list

Global parameters

This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.

Back to top ↑

th version

Prints the CLI version.

Syntax

Shell
th version

Examples

Print the version, OS and CPU type

Shell
th version

As JSON

Shell
th version --format json

Global parameters

This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.

Back to top ↑