@chronus/chronus

中文文档
1.5.1发布于 2026/09/12MITTypeScriptES Module构建来源已验证近 30 天下载 2.6万

chronus

原始使用文档
文档目录10 节
  1. Installation
  2. Usage
  3. chronus add [packages...]
  4. chronus verify
  5. chronus status
  6. chronus version
  7. chronus changelog
  8. Options
  9. chronus pack
  10. Options

Chronus

Chronus is a tool to help manage the versioning of a monorepo. Each PR can be setup to require a change description for each package with chronus verify. At release time chronus version will bump the version of the packages and generate a changelog based on the change descriptions.

Installation

# Locally (recommended)
npm install -D @chronus/chronus
# Or globally
npm install -g @chronus/chronus

Usage

NpmPnpmYarnGlobal
npx chronuspnpx chronusyarn chronuschronus

chronus add [packages...]

Add a new change description. Optionally specify the packages that the change applies to. By default it will prompt for which package to apply the change to.

Options:

  • --since Only compute changes since the specified branch.

chronus verify

Verify that the packages with changes from the baseBranch have all been described.

Options:

  • --since Only compute changes since the specified branch.

chronus status

This command will show the current status of the changes in the workspace. This is basically a summary of what chronus version will do if run.

This command takes the same options as chronus version.

chronus version

Apply the change description and bump version of packages. By default this will respect the version policies configured(see version policies).

chronus changelog

Generate the changelog to stdout without bumping the version of the packages.

Options:

  • --package to generate the changelog for a specific package.
  • --policy to generate an aggregated changelog for a specific policy.

Options

--ignore-policies

This allows to ignore the version policies and bump the packages independently. This can be useful in the lockStep policies when doing a hotfix.

--only

Only bumps the packages specified. This can be useful if wanting to only release certain packages. This command will extract the change descriptions for the specified packages and bump the version of those packages. If a change applied to a package is not specified in the --only option it will be ignored. If a change is specified in both it will be applied and the packages included in the only array will be removed from the change description file.

$ chronus version --only @my-scope/my-package1 --only @my-scope/my-package2

chronus pack

Pack all the packages configured for the workspace.

By default it will have the same effect as npm pack run in each package directory.

Options

--pack-destination

Directory where the packed packages will be placed. By default each tar file will be placed in the package directory.

$ chronus pack --pack-destination /temp/artifacts

✔ @chronus/chronus packed in chronus-chronus-0.7.0.tgz (94.5 kB)
✔ @chronus/github-pr-commenter packed in chronus-github-pr-commenter-0.3.0.tgz (5.49 kB)

版本与发布记录

@chronus/chronus 共发布 37 个版本,首次发布于 2024/01/28;过去 12 个月发布了 6 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.5.1latest2026/09/121 个月前
1.5.02026/07/293 个月前
1.4.02026/07/163 个月前
1.3.12026/03/117 个月前
1.3.02026/02/059 个月前
1.2.02026/01/289 个月前

关于 @chronus/chronus 的常见问题

@chronus/chronus 是什么?

chronus

如何安装 @chronus/chronus?

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

@chronus/chronus 支持 TypeScript 吗?

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

@chronus/chronus 支持 ESM 还是 CommonJS?

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

@chronus/chronus 需要什么版本的 Node.js?

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

@chronus/chronus 可以商用吗?

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

@chronus/chronus 的下载量有多少?

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

@chronus/chronus 还在维护吗?

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