TeamCity CLI (teamcity)
Quick Start
teamcity auth status # Check authentication
teamcity run list --status failure # Find failed builds
teamcity run log <id> --failed # Full failure diagnostics
Do not guess flags or syntax. Use the Command Reference or teamcity <command> --help. Fall back to teamcity api /app/rest/... when needed. Builds are runs (teamcity run), build configurations are jobs (teamcity job).
Core Commands
| Area |
Commands |
| Builds |
run list, view, start, watch, log, cancel, restart, tests, changes |
| Artifacts |
run artifacts, run download |
| Metadata |
run pin/unpin, run tag/untag, run comment |
| Jobs |
job list, view, tree, pause/resume, param list/get/set/delete |
| Projects |
project list, view, tree, param, token put/get, settings export/status/validate |
| Queue |
queue list, approve, remove, top |
| Agents |
agent list, view, enable/disable, authorize/deauthorize, exec, term, reboot, move |
| Pools |
pool list, view, link/unlink |
| API |
teamcity api <endpoint> — raw REST API access |
Quick Workflows
Investigate failure: teamcity run list --status failure → teamcity run log <id> --failed → teamcity run tests <id> --failed
From a URL: Extract build ID from https://host/buildConfiguration/ConfigId/12345 → teamcity run view 12345
Start build: teamcity run start <job-id> --branch <branch> --watch
Find jobs: teamcity project list → teamcity job list --project <id>
Validate Kotlin DSL: teamcity project settings validate (not mvn compile — see Workflows)
References
- Command Reference - All commands and flags
- Workflows - URL handling, failure investigation, artifacts, agents, and more
- Output Formats - JSON, plain text, scripting
1---2name: teamcity-cli3version: "0.9.0"4author: JetBrains5description: Use when working with TeamCity CI/CD or when user provides a TeamCity build URL. Use `teamcity` CLI for builds, logs, jobs, queues, agents, and pipelines.6metadata:7 source: https://skillmd.com/skills/jetbrains/teamcity-cli8---910# TeamCity CLI (`teamcity`)1112## Quick Start1314```bash15teamcity auth status # Check authentication16teamcity run list --status failure # Find failed builds17teamcity run log <id> --failed # Full failure diagnostics18```1920**Do not guess flags or syntax.** Use the [Command Reference](references/commands.md) or `teamcity <command> --help`. Fall back to `teamcity api /app/rest/...` when needed. Builds are **runs** (`teamcity run`), build configurations are **jobs** (`teamcity job`).2122## Core Commands2324| Area | Commands |25|-----------|---------------------------------------------------------------------------------------------------|26| Builds | `run list`, `view`, `start`, `watch`, `log`, `cancel`, `restart`, `tests`, `changes` |27| Artifacts | `run artifacts`, `run download` |28| Metadata | `run pin/unpin`, `run tag/untag`, `run comment` |29| Jobs | `job list`, `view`, `tree`, `pause/resume`, `param list/get/set/delete` |30| Projects | `project list`, `view`, `tree`, `param`, `token put/get`, `settings export/status/validate` |31| Queue | `queue list`, `approve`, `remove`, `top` |32| Agents | `agent list`, `view`, `enable/disable`, `authorize/deauthorize`, `exec`, `term`, `reboot`, `move` |33| Pools | `pool list`, `view`, `link/unlink` |34| API | `teamcity api <endpoint>` — raw REST API access |3536## Quick Workflows3738**Investigate failure:** `teamcity run list --status failure` → `teamcity run log <id> --failed` → `teamcity run tests <id> --failed`39**From a URL:** Extract build ID from `https://host/buildConfiguration/ConfigId/12345` → `teamcity run view 12345`40**Start build:** `teamcity run start <job-id> --branch <branch> --watch`41**Find jobs:** `teamcity project list` → `teamcity job list --project <id>`42**Validate Kotlin DSL:** `teamcity project settings validate` (not `mvn compile` — see [Workflows](references/workflows.md))4344## References4546- [Command Reference](references/commands.md) - All commands and flags47- [Workflows](references/workflows.md) - URL handling, failure investigation, artifacts, agents, and more48- [Output Formats](references/output.md) - JSON, plain text, scripting