Configuration
This page describes the configuration file format, environment variables, and shell completion setup for TeamCity CLI.
Configuration file
TeamCity CLI stores its configuration in a YAML file at ~/.config/tc/config.yml. This file is created automatically when you run teamcity auth login.
A typical configuration file looks like this:
Configuration fields
Field | Description |
|---|---|
| The server URL used when no |
| A map of server URLs to their settings. Each entry stores the |
| A map of alias names to their expansions. See Aliases for details. |
Environment variables
Environment variables override configuration file settings and are the recommended way to configure the CLI in CI/CD pipelines.
Variable | Description |
|---|---|
| TeamCity server URL. Takes precedence over |
| Access token for authentication. Takes precedence over the keyring and config file token. |
| Set to |
| Set to |
| Path to the Kotlin DSL directory. Overrides automatic detection of |
| Disable colored output. Follows the NO_COLOR standard. |
Examples:
PowerShell:
CMD:
Setting TERM=dumb also disables colored output. Color is automatically disabled when output is not a terminal (for example, when piping to another command).
Global flags
These flags are available on every command:
Flag | Description |
|---|---|
| Show help for the command. |
| Show the CLI version. |
| Disable colored output. |
| Suppress non-essential output. Mutually exclusive with |
| Show detailed output, including debug information. Mutually exclusive with |
| Disable interactive prompts. The CLI uses sensible defaults when a prompt would otherwise appear. |
Shell completion
TeamCity CLI supports tab completion for Bash, Zsh, Fish, and PowerShell. Completion covers commands, subcommands, flags, and in some cases values such as project and job IDs.
If you do not have write access to /etc/bash_completion.d/, write to a user-level location and source it from your .bashrc:
Ensure your ~/.zshrc includes compinit:
To load completion automatically, add the output to your PowerShell profile.