ti configure
Configures a local TiDB Cloud CLI profile. Without flags, this is the only interactive TiDB Cloud CLI command.
Syntax
ti configure
[--help]
[--non-interactive]
[--region-code <string>]
[--tidb-cloud-private-key <string>]
[--tidb-cloud-public-key <string>]
[--version]
Options
--help: Display help information.--non-interactive: Avoid prompts. Provide the region code, public key, and private key through the corresponding command options or environment variables. This is useful when runningtiin a script or automated environment.--region-code <string>: Default region code, for exampleaws-us-east-1oraws-ap-southeast-1.--tidb-cloud-private-key <string>: TiDB Cloud API private key.--tidb-cloud-public-key <string>: TiDB Cloud API public key.--version: Display version information.
For options shared by all commands, see Global options.
Configuration value sources
The following command options and environment variables provide the same configuration values:
For each value, an explicitly provided command option takes precedence over its environment variable. With --non-interactive, all three values must resolve from these sources.
Examples
Configure
tiinteractively:# Enter the default region code and TiDB Cloud API keys when prompted. ti configureConfigure
tifor automation:# Supply all required values without interactive prompts. TI_REGION_CODE="aws-us-east-1" \ TIDB_CLOUD_PUBLIC_KEY="<public-key>" \ TIDB_CLOUD_PRIVATE_KEY="<private-key>" \ ti configure --profile ci --non-interactive