@dotcom-tool-kit/circleci

中文文档
9.3.1发布于 2026/10/30ISCCommonJS近 30 天下载 2189

This plugin manages Tool Kit commands that are run from CircleCI workflows, via a Tool Kit Hook that automatically manages .circleci/config.yml. It also exposes state from the CircleCI environment for other plugins to consume generically.

原始使用文档
文档目录5 节
  1. Installation
  2. Hooks
  3. CircleCi
  4. Plugin-wide options
  5. @dotcom-tool-kit/circleci

@dotcom-tool-kit/circleci

This plugin manages Tool Kit commands that are run from CircleCI workflows, via a Tool Kit Hook that automatically manages .circleci/config.yml. It also exposes state from the CircleCI environment for other plugins to consume generically.

This plugin will be installed as a dependency of the containerised-app-with-assets, containerised-app, component, circleci-deploy, and circleci-npm plugins so you do not need to install it separately if you are using any of those plugins.

Installation

Install @dotcom-tool-kit/circleci as a devDependency in your app:

npm install --save-dev @dotcom-tool-kit/circleci

Add the plugin to your Tool Kit configuration:

plugins:
    - '@dotcom-tool-kit/circleci'

And install this plugin's hooks:

npx dotcom-tool-kit --install

Hooks

CircleCi

This hook automatically manages .circleci/config.yml in your repo to provide configuration for CircleCI workflows to run Tool Kit commands and tasks.

Options provided in your repository's .toolkitrc.yml for this hook are merged with any Tool Kit plugin that also provides options for the hook.

Unless they conflict, your options are appended to options from plugins, allowing you to define custom CircleCI jobs and workflows in your repository that work alongside those from plugins.

Hook options

PropertyDescriptionType
executorsan array of additional CircleCI executors to output in the generated config.Array of objects:
  • name: string
  • image: string
jobsan array of additional CircleCI jobs to output in the generated config. these are used for running Tool Kit commands. for running arbitrary shell commands, use custom.Array of objects:
  • name: string
  • command: string
  • workspace: Object with properties:
    • persist: boolean
    • attach: boolean
  • steps: Object with properties:
    • pre: Array<string _or_ _Object with dynamic keys of type_ string _and values of type_ _Object with dynamic keys of type_ string _and values of type_ unknown (_optional & nullable_)>
    • post: Array<string _or_ _Object with dynamic keys of type_ string _and values of type_ _Object with dynamic keys of type_ string _and values of type_ unknown (_optional & nullable_)>
  • splitIntoMatrix: boolean
  • environment: Record<string, string>
  • custom: Object with dynamic keys of type string and values of type unknown (optional & nullable)
workflowsan array of additional CircleCI workflows to output in the generated config. these reference jobs defined in the jobs option.Array of objects:
  • name: string
  • jobs: Array of objects:
    • name: string
    • requires: Array<string | Record<string, 'success' | 'failed' | 'canceled' | 'unauthorized' | 'not_run' | 'terminal' | Array<'success' | 'failed' | 'canceled' | 'unauthorized' | 'not_run' | 'terminal'>>>
    • splitIntoMatrix: boolean
    • runOnRelease: boolean
    • custom: Object with dynamic keys of type string and values of type unknown (optional & nullable)
  • runOnRelease: boolean
  • custom: Object with dynamic keys of type string and values of type unknown (optional & nullable)
customarbitrary additional CircleCI configuration that will be merged into the Tool Kit-generated config.Object with dynamic keys of type string and values of type unknown (optional & nullable)
disableBaseConfigset to true to omit the Tool Kit CircleCI boilerplate. should be used along with custom to provide your own boilerplate.boolean

All properties are optional.

Plugin-wide options

@dotcom-tool-kit/circleci

PropertyDescriptionTypeDefault
cimgNodeVersionslist of CircleCI Node.js image versions to use. if more than one is provided, a matrix build will be generated in your CircleCI config.Array<string>["20.19-browsers"]
tagFilterthe regular expression used to match tags for jobs that should run on tag workflows. by default, matches tags that look like v1.2.3; if your releases use a different tag format, change this option to match your tags. set to false to prevent running workflows on tags, for example if your repo doesn't do versioned releases.string | false'/^v\d+\.\d+\.\d+(-.+)?/'
checkoutMethodwhether to checkout the full git repository or blobless (without files unrelated to the main commit.) blobless checkouts are the default and are faster, though some projects may encounter issues if they rely on inspecting files in the git history. if you see logs like The authenticity of host 'github.com (140.82.113.4)' can't be established. you should try enabling full checkouts.'full' | 'blobless'
orbDevVersionset this option to use a development version of the Tool Kit CircleCI orb in the generated configstring (regex: /^dev:/)
useCloudsmithNpmRegistryDEPRECATED: please use the npmCloudsmithServiceAccount option instead, which will enable Cloudsmith when setboolean
npmCloudsmithServiceAccountthe Cloudsmith service account. this will probably be your team name followed by the permissions access, e.g., cp-platforms-read-write. this must be set to either install packages from, or publish packages to, our private Cloudsmith npm registry. (note that this is separate to our Docker Cloudsmith registry that can be configured with the cloudsmith plugin!)string

All properties are optional.

版本与发布记录

@dotcom-tool-kit/circleci 共发布 223 个版本,首次发布于 2021/07/01;过去 12 个月发布了 40 个版本。

版本发布日期距今
9.3.1latest2026/10/3014 天前
9.3.1-beta.1prerelease2026/10/2717 天前
9.3.02026/09/181 个月前
9.3.0-beta.12026/09/181 个月前
9.2.12026/05/195 个月前
9.2.1-beta.12026/05/195 个月前

关于 @dotcom-tool-kit/circleci 的常见问题

@dotcom-tool-kit/circleci 是什么?

This plugin manages Tool Kit commands that are run from CircleCI workflows, via a Tool Kit Hook that automatically manages .circleci/config.yml. It also exposes state from the CircleCI environment for other plugins to consume generically.

如何安装 @dotcom-tool-kit/circleci?

在项目目录运行 npm install @dotcom-tool-kit/circleci,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:zod(^3.24.4)、dotcom-tool-kit(5.x)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@dotcom-tool-kit/circleci 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/dotcom-tool-kit__circleci 是否存在。

@dotcom-tool-kit/circleci 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@dotcom-tool-kit/circleci 需要什么版本的 Node.js?

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

@dotcom-tool-kit/circleci 可以商用吗?

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

@dotcom-tool-kit/circleci 的下载量有多少?

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

@dotcom-tool-kit/circleci 还在维护吗?

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