teamcity-cli
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.
install
source · Clone the upstream repo
git clone https://github.com/JetBrains/teamcity-cli
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/JetBrains/teamcity-cli "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/teamcity-cli" ~/.claude/skills/jetbrains-teamcity-cli-teamcity-cli && rm -rf "$T"
manifest:
skills/teamcity-cli/SKILL.mdsource content
TeamCity CLI (teamcity
)
teamcityteamcity auth status # Check authentication teamcity run list --status failure # Find failed builds teamcity run log <id> --failed --raw # Full failure diagnostics
Do not guess flags or syntax. Use the Command Reference or
teamcity <command> --help. Builds are runs (teamcity run), build configurations are jobs (teamcity job). Never use --count — use --limit (or -n).
Gotchas
- Composite builds have empty logs — drill into child builds for the actual failure.
- Build chains fail bottom-up — the deepest failed dependency is the root cause, not the top-level build. Use
.teamcity run tree <id>
excludes Kotlin DSL — push--local-changes
changes before running..teamcity/
alone bypasses stored auth — for env override mode set bothTEAMCITY_URL
andTEAMCITY_URL
; otherwise leaveTEAMCITY_TOKEN
unset to useTEAMCITY_URL
credentials.auth login- Always use
for logs and dump to a temp file. Always use--raw
when starting builds.--watch - VCS triggers aren't always configured — after pushing a fix, you may need to start builds manually.
does not validate — always runpipeline push
first.teamcity pipeline validate
Core Commands
| Area | Commands |
|---|---|
| Builds | , , , , , , , , , |
| Artifacts | , |
| Metadata | , , |
| Jobs | , , , , |
| Projects | , , , , , |
| Queue | , , , |
| Agents | , , , , , , , |
| Pools | , , |
| Pipelines | , , , , , , |
| API | — raw REST API access |
Quick Workflows
See Workflows for full details on each.
Investigate failure:
teamcity run list --status failure → teamcity run log <id> --failed --raw → teamcity run tests <id> --failed
Debug build chain: teamcity run tree <run-id> → find deepest failed child → investigate that build
Fix build failure: diagnose → classify → fix (code: --local-changes, DSL: settings validate, pipeline: pipeline validate) → push
Monitor until green: start → watch → fix if failed → push → watch new build → repeat (max 3 attempts)
Pipeline: teamcity pipeline create <name> -p <project> / teamcity pipeline validate [file] / teamcity pipeline pull <pipeline-id> → edit → teamcity pipeline push <pipeline-id> [file]
Project VCS root details: teamcity project vcs list --project <project-id> → teamcity project vcs view <vcs-root-id> (do not guess VCS root IDs)
References
- Command Reference — all commands and flags
- Workflows — failure investigation, build chains, fix workflows, monitoring, flaky tests, pipelines
- Output Formats — JSON, plain text, scripting