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
- List the Projects you own or were invited to with
th projects list. - Make one the default with
th config set project <slug>. - For a single command in another Project, add
--project <slug>instead.
th projects list
th config set project acme
th container services list --project acme-stagingCommands
| Command | Description |
|---|---|
th config set | Saves a setting (project, region or endpoint) in the config file. |
th config get | Prints one setting from the config file. |
th config unset | Removes a setting from the config file. |
th config list | Prints every setting in the config file. |
th projects list | Lists the Projects you own or were invited to. |
th regions list | Lists regions and their compute classes. |
th version | Prints the CLI version. |
th config set
Saves a setting (project, region or endpoint) in the config file.
Syntax
th config set PROPERTY VALUEProperties: project (ID or slug), region (ID), endpoint (Console URL).
Examples
Use the Project acme by default
th config set project acmeCreate new services in bkk
th config set region bkkPositional arguments
| Name | Description |
|---|---|
PROPERTYRequired | project, region or endpoint. |
VALUERequired | The 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.
th config get
Prints one setting from the config file.
Syntax
th config get PROPERTYProperties: project (ID or slug), region (ID), endpoint (Console URL).
Examples
Print the default Project
th config get projectPositional arguments
| Name | Description |
|---|---|
PROPERTYRequired | project, region or endpoint. |
Global parameters
This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.
th config unset
Removes a setting from the config file.
Syntax
th config unset PROPERTYProperties: project (ID or slug), region (ID), endpoint (Console URL).
Examples
Remove the default region
th config unset regionPositional arguments
| Name | Description |
|---|---|
PROPERTYRequired | project, region or endpoint. |
Global parameters
This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.
th config list
Prints every setting in the config file.
Syntax
th config listProperties: project (ID or slug), region (ID), endpoint (Console URL).
Examples
Show every setting
th config listGlobal parameters
This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.
th projects list
Lists the Projects you own or were invited to.
Syntax
th projects listExamples
List your Projects
th projects listAs JSON
th projects list --format jsonGlobal parameters
This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.
th regions list
Lists regions and their compute classes.
Syntax
th regions listExamples
List regions and their compute classes
th regions listGlobal parameters
This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.
th version
Prints the CLI version.
Syntax
th versionExamples
Print the version, OS and CPU type
th versionAs JSON
th version --format jsonGlobal parameters
This command also takes the global parameters: --project, --region, --endpoint, --format, --quiet.