@crouton-kit/crouter

中文文档
0.3.156发布于 2026/07/30MITTypeScriptES Module近 30 天下载 2244

crtr — agent runtime with memory, plugins, and marketplaces

原始使用文档
文档目录6 节
  1. Install
  2. Building from source
  3. Runtime generations
  4. Usage
  5. Official marketplace
  6. Running crouter on pi

crouter

Install

npm install -g @crouton-kit/crouter

Building from source

npm run build requires a C compiler and a local filesystem with atomic directory exchange support: APFS on macOS, or a Linux filesystem that supports renameat2(..., RENAME_EXCHANGE) (such as ext4, XFS, or Btrfs). The build verifies both prerequisites before compiling output because publication swaps the complete staged dist tree into place atomically; that is build/packaging behavior, not the runtime safety boundary.

To activate source changes, run npm run build && npm run install-runtime, then restart the daemon. install-runtime stages and seals a complete immutable local generation before atomically switching selected; a failed install preserves the prior selection, and live brokers continue using their own generation until restarted.

Runtime generations

The packaged runtime.lock.json is copied to the staged generation's package-lock.json for its production dependency install. After a successful install, generation GC keeps selected plus the three newest generations, but conservatively skips pruning entirely while any crtr shim process may still be using a generation; old generations are reclaimed on a later install when no such process is live.

crtr sys version reports the selected and current-process generations and flags drift. crtr sys doctor validates their manifests, sealing and containment, and hashes their complete inventories on demand.

Usage

crtr --help

Official marketplace

crtr ships with the crouter official marketplace pre-installed. On first run it is cloned into your user scope and registered automatically — no plugins are enabled by default.

Browse and install plugins from it:

crtr pkg market browse crouter-official-marketplace
crtr pkg plugin install crouter-official-marketplace/<plugin>

To opt out of the bootstrap (e.g. in CI), set CRTR_NO_BOOTSTRAP=1.

Running crouter on pi

The node runtime hosts the pi coding agent in each broker. To set your pi install up the way crouter's author runs it, add these to the packages array in ~/.pi/agent/settings.json (neither ships with pi — you add them yourself):

  • pi-claude-oauth-adapter — third-party npm package; Anthropic OAuth / Claude Code compatibility adapter for pi. Install with "npm:pi-claude-oauth-adapter".
  • pi-crtr-extensions — crtr's engine-side pi extensions (crtr help-gate, slash-command surfacing, provider rotation, frontmatter rules, statusline). Bundled in this repo at src/builtin-pi-packages/pi-crtr-extensions and wired into ~/.pi/agent/settings.json automatically by crtr sys setup — nothing to install separately.

版本与发布记录

@crouton-kit/crouter 共发布 155 个版本,首次发布于 2026/05/12;过去 12 个月发布了 155 个版本。

版本发布日期距今
0.3.156latest2026/07/303 个月前
0.3.1552026/07/303 个月前
0.3.1542026/07/303 个月前
0.3.1532026/07/303 个月前
0.3.1522026/07/293 个月前
0.3.1512026/07/293 个月前

关于 @crouton-kit/crouter 的常见问题

@crouton-kit/crouter 是什么?

crtr — agent runtime with memory, plugins, and marketplaces

如何安装 @crouton-kit/crouter?

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

@crouton-kit/crouter 支持 TypeScript 吗?

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

@crouton-kit/crouter 支持 ESM 还是 CommonJS?

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

@crouton-kit/crouter 可以商用吗?

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

@crouton-kit/crouter 的下载量有多少?

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

@crouton-kit/crouter 还在维护吗?

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