@eyeauras/teamcity-cli

中文文档
0.11.1发布于 2026/11/12MITTypeScriptES Module近 30 天下载 3530

AI-friendly TeamCity CLI built with AI CLI Factory.

原始使用文档
文档目录4 节
  1. Why
  2. Coverage
  3. Use it
  4. More

teamcity-cli

The whole TeamCity REST API as one command-line tool that is safe to hand to an AI agent.

npm install --global @eyeauras/teamcity-cli
teamcity-cli profile configure        # server URL + access token, asked once
teamcity-cli builds list --job Demo_Tests --branch main --limit 20

Why

CompleteAll 449 operations in the REST description TeamCity 2026.1 publishes are reachable: builds, queue, build configurations, projects, VCS, agents, cloud, users, server administration.
Read-only by defaultA fresh profile can only read. Writes need permissions grant Update for that profile; account and server administration need Admin, token and secret workflows need Credentials, each granted separately.
Made for build triagebuilds diagnose answers "why did it fail" in one call: up to 10 problems and 20 failed tests. jobs run --wait and builds wait exit 0 on success, 1 on failure, 124 on timeout, 130 on Ctrl+C.
Cheap for agents--json on every command, paged lists (--limit, --start) that return hasMore and nextStart, stable error codes, and a persistent --json-rpc session without restarting Node.
Profile credentialsProfile tokens live in the platform secret store, never in profile JSON. Writes forward caller input; secret aliases are optional. Password/secure parameters come back as redacted: true, and HTTP errors include the first 4 KiB of server text with the profile credential masked.
PredictableNo write is retried or replayed. When the answer to a queue request is lost, jobs run reports run.unknownOutcome and the command to check with, instead of posting again.
People, AI agents and Node.js code use one teamcity-cli command tree, which applies profiles, the secret store, a permission gate and redaction before calling the TeamCity REST API

Requests send caller values and the documented inclusive list defaults. TeamCity validates service values and applies omitted-field defaults. Native JSON DTOs work alongside compact options; permission gates, confirmations and local file/credential safety remain enforced. Lists without filters request all items within their page limits: builds include all branches and states, and agents include unauthorized agents. Build/queue tag lists include public tags and the current user’s private tags only. Use builds list --branch @default or --branch @this to narrow the branch; templates remain separate from jobs. See list defaults for scan bounds and scoped exceptions.

Coverage

Every documented query parameter of those operations is caller-controlled; see the current REST coverage.

Share of the 449 published REST operations each tool can call through its own commands, by API area. Operation coverage remains 449/449; 0.9.0 improves the returned configuration data, including full scripts and plain settings that 0.8.0 hid. The matrix does not measure response-field completeness.

Coverage matrix: teamcity-cli 0.9.0 reaches 449 of 449 operations (100%); the JetBrains teamcity 1.6.3 reaches 75 (17%) through dedicated commands, bbox 1.1.0 reaches 9 (2%) and tctest 1.3.5 reaches 6 (1%)

The JetBrains CLI also has a raw teamcity api request command and features outside this API (build logs, pipelines, agent terminals) that this tool does not have. bbox and tctest are small single-purpose tools: build triggering and clean-up, and test runs for pull requests. Numbers, method and caveats: coverage comparison.

Use it

# read: why did build 101 fail, as JSON
teamcity-cli builds diagnose 101 --json

# write: allow it for this profile once, then queue a build and wait for the result
teamcity-cli permissions grant Update --profile uat
teamcity-cli jobs run Demo_Tests --profile uat --branch main --wait --timeout 10m

# discover: every level has help
teamcity-cli --help
teamcity-cli builds --help

Read commands return the configuration values TeamCity makes available to your token, including full scripts, Docker options, requirement operands and VCS connection settings. Only password-type parameters, secure: properties and values withheld by TeamCity stay hidden. Plain values such as * (a cron wildcard) and ***** remain readable; their spelling does not determine secrecy. Writes forward caller-supplied names and values for TeamCity to validate, including password-typed parameters and credential-like values. Read schedule properties with jobs triggers show <job-id> <trigger-id>. Use jobs configuration show <job-id> --json for build settings and content, projects templates show <template-id> --json for a template, and agents parameters list <agent-id> --json for system, environment and configuration parameters. Treat real output as private configuration when sharing it.

Use --fields <projection> on response commands for native TeamCity output. JSON endpoints that accept fields receive it unchanged; other endpoints return their native body without an extra query parameter. Lists retain their paging envelope. Defaults keep the existing summaries and human views; password/secure:/withheld values stay hidden. Downloads save native bytes, and --store-as keeps secret-only responses in the secret store. XML outside the REST plugin summary subset returns as text; status SVG files are saved without interpreting their content.

Needs Node.js 22+. Your server's version and your account's rights still decide what a call is allowed to do; the local permission gate does not replace TeamCity's own authorization.

More

版本与发布记录

@eyeauras/teamcity-cli 共发布 24 个版本,首次发布于 2026/09/12;过去 12 个月发布了 24 个版本。

版本发布日期距今
0.11.1latest2026/11/122 天前
0.11.02026/11/122 天前
0.10.02026/11/112 天前
0.9.12026/11/112 天前
0.9.02026/11/112 天前
0.8.02026/11/113 天前

关于 @eyeauras/teamcity-cli 的常见问题

@eyeauras/teamcity-cli 是什么?

AI-friendly TeamCity CLI built with AI CLI Factory.

如何安装 @eyeauras/teamcity-cli?

在项目目录运行 npm install @eyeauras/teamcity-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 teamcity-cli,可以用 npx teamcity-cli 直接运行。

@eyeauras/teamcity-cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@eyeauras/teamcity-cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@eyeauras/teamcity-cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@eyeauras/teamcity-cli 可以商用吗?

@eyeauras/teamcity-cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@eyeauras/teamcity-cli 的下载量有多少?

根据 npm 官方下载统计,@eyeauras/teamcity-cli 在 2026/10/14 – 2026/11/12 这 30 天内被下载 3,530 次,日均约 118 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@eyeauras/teamcity-cli 还在维护吗?

最新版本 0.11.1 发布于 2026/11/12(2 天前);至今共发布 24 个版本,其中过去 12 个月发布了 24 个;首次发布于 2026/09/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。