Teamcity CLI
ClineOfficialPublished by Cline
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The teamcity-cli skill provides a comprehensive interface to interact with TeamCity servers directly from the terminal. It enables developers and DevOps engineers to manage the full lifecycle of CI/CD operations, including triggering builds, monitoring logs, managing build configurations, and overseeing agent pools. The tool supports various output formats, including JSON for programmatic integration, and provides specific commands for investigating build failures and managing pipeline configurations.
What it does
- Authenticates with TeamCity servers and manages session status
- Lists, starts, watches, and cancels build runs
- Retrieves build logs, test results, and artifacts
- Manages build jobs, project settings, and VCS connections
- Monitors and controls build queues and agent pools
- Validates and deploys pipeline configurations
When to use it
- When you need to investigate failed builds or build chains
- When automating CI/CD tasks via scripts or shell commands
- When managing TeamCity infrastructure like agents and pools
- When you need to quickly check the status of a build or queue
- When performing pipeline configuration management
Advantages
- Provides direct terminal access to TeamCity functionality
- Supports JSON output for easy integration with tools like jq
- Enables deep diagnostics for build failures and dependency trees
- Allows for non-interactive scripting via environment variables
- Simplifies management of complex build chains and pipelines
Usage examples
- “Find all failed builds in the last 24 hours”
- The agent runs teamcity run list --status failure --since 24h to display a list of recent failed builds.
- “Show me the logs for build ID 12345”
- The agent executes teamcity run log 12345 --raw to retrieve and display the full build log.
- “Get the status of all build agents”
- The agent runs teamcity agent list to provide a table of all connected agents and their status.
- “Validate my pipeline configuration before pushing”
- The agent runs teamcity pipeline validate to ensure the local configuration is correct before deployment.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/cline/teamcity-cli/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip teamcity-cli.zip -d .agents/skills
Documentation by Cline
TeamCity CLI (teamcity)
Quick Start
teamcity auth status # Check authentication
teamcity run list --status failure # Find failed builds
teamcity run log <id> --failed --raw # Full failure diagnosticsDo 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 — deepest failed dependency is the root cause. Use
teamcity run tree <id>.--local-changesexcludes Kotlin DSL — push.teamcity/changes before running.TEAMCITY_URLalone bypasses stored auth — set bothTEAMCITY_URLandTEAMCITY_TOKEN, or leave unset.Logs: use
--rawand dump to a temp file. Builds: use--watchwhen starting them.VCS triggers aren't always wired up — after pushing a fix you may need to start builds manually.
pipeline pushdoes not validate — alwaysteamcity pipeline validatefirst.GitHub VCS roots: use a GitHub App connection. Never paste a PAT via
--auth password. See workflows.
Core Commands
| Area | Commands |
|---|---|
| Auth | auth login, logout, status |
| Builds | run list, view, start, watch, log, cancel, restart, tests, changes, tree |
| Artifacts | run artifacts, run download |
| Metadata | run pin/unpin, run tag/untag, run comment |
| Jobs | job list, view, create, tree, pause/resume, step list/view/add/delete, param list/get/set/delete, settings list/get/set |
| Projects | project list, view, create, tree, param, token put/get, settings export/status |
| VCS/Conn | project vcs list/view/create/delete, project connection list/create/authorize/delete |
| Queue | queue list, approve, remove, top |
| Agents | agent list, view, enable/disable, authorize/deauthorize, exec, term, reboot, move |
| Pools | pool list, view, link/unlink |
| Pipelines | pipeline list, view, create, validate, pull, push, schema, delete |
| API | teamcity api <endpoint> — raw REST access |
| Link | teamcity link — bind repo via teamcity.toml |
Quick Workflows
See Workflows for full details on each.
Investigate failure:
run list --status failure→run log <id> --failed --raw→run tests <id> --failedDebug build chain:
run tree <id>→ drill to deepest failed childFix and verify: edit → push →
run start --watch(use--local-changesfor personal builds)Pipeline lifecycle:
pipeline pull <id>→ edit →pipeline validate→pipeline push <id>,pipeline schemato get the actual schema from the serverGitHub VCS:
connection create github-app→connection authorize→ install App on repo →vcs create --auth token --connection-id <id>Docker registry:
echo $TOKEN | connection create docker -p <id> --name X --url https://ghcr.io --username U --stdin
References
Command reference — all commands and flags
Workflows — failure investigation, build chains, connections, pipelines
Output formats — JSON, plain text, scripting
Files
- ATTRIBUTION.mdAdded by AutoGineer830 B
- LICENSELicence file added by AutoGineer10.5 KiB
- SKILL.md4.3 KiB
- _agents/babysit-build.md1.7 KiB
- references/commands.md21.6 KiB
- references/output.md4.6 KiB
- references/workflows.md30.2 KiB
references/output.md
Output Formats
Most commands support multiple output formats for different use cases.
Available Formats
| Format | Flag | Use Case |
|---|---|---|
| Table (default) | none | Human-readable, colored output |
| Plain text | --plain | Scripting, parsing |
| JSON | --json | Programmatic access |
| No color | --no-color | Logs, CI environments |
| No header | --no-header | Clean output for piping |
JSON Output
Default JSON (all fields):
teamcity run list --jsonList available fields:
teamcity run list --json=Select specific fields:
teamcity run list --json=id,status,webUrlNested fields (dot notation):
teamcity run list --json=id,buildType.name,triggered.user.usernameAvailable JSON Fields by Command
| Command | Example fields |
|---|---|
run list | id, number, status, state, branchName, buildTypeId, buildType.name, buildType.projectName, triggered.type, triggered.user.name, agent.name, startDate, finishDate, webUrl |
job list | id, name, projectName, projectId, paused, href, webUrl |
project list | id, name, description, parentProjectId, href, webUrl |
queue list | id, buildTypeId, state, branchName, queuedDate, buildType.name, triggered.user.name, webUrl |
agent list | id, name, connected, enabled, authorized, pool.name, webUrl |
pool list | id, name, maxAgents |
pipeline list | id, name, webUrl, parentProject.id, parentProject.name, headBuildType.id, jobs.count |
Run teamcity <command> --json= to see all available fields for that command.
Scripting Examples
Get build IDs of failed builds:
teamcity run list --status failure --plain --no-header | awk '{print $2}'JSON with jq:
teamcity run list --json | jq '.[] | {id, status, branch}'Get build IDs that failed (JSON):
teamcity run list --status failure --json=id | jq -r '.[].id'Export runs to CSV:
teamcity run list --json=id,status,branchName | jq -r '.[] | [.id,.status,.branchName] | @csv'Filter builds by pattern:
teamcity run list --json | jq '.[] | select(.branch | contains("feature"))'Count builds by status:
teamcity run list --json | jq 'group_by(.status) | map({status: .[0].status, count: length})'Get web URLs for queued builds:
teamcity queue list --json=webUrl | jq -r '.[].webUrl'Environment Variables
For non-interactive use (CI/CD, scripts):
export TEAMCITY_URL="https://teamcity.example.com"
export TEAMCITY_TOKEN="your-api-token"
# Commands will use these automatically
teamcity run listEnvironment variables always take precedence over config file settings.
Other supported variables:
TEAMCITY_GUEST=1— use guest authenticationTEAMCITY_RO=1— read-only mode (block write operations)TEAMCITY_NO_UPDATE=1— disable automatic update checksNO_COLORorTEAMCITY_NO_COLOR— disable colored output
Combining with Other Tools
Open in browser:
teamcity run view <id> -wPipe to less with color:
teamcity run list | less -RWatch and notify:
teamcity run watch <id> && notify-send "Build complete"Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Cline
- Publisher
- Cline (Official)
- Source
- cline/skills · skills/teamcity-cli · commit 2637846
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Cline or Cline.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download teamcity-cli.zip