@claude-flow/cli-core

中文文档
3.7.7发布于 2026/11/10MITTypeScriptES Module零依赖近 30 天下载 22.3万

Lightweight core CLI surface for Claude Flow — memory + hooks commands only. Designed to load fast on cold npx cache (<5s) so plugin skills don't race the 30s MCP-startup timeout. The full @claude-flow/cli metapackage lazy-loads everything else on top of

原始使用文档
文档目录8 节
  1. Why a separate package?
  2. Install
  3. What's included
  4. What's NOT included (use @claude-flow/cli for these)
  5. Compatibility
  6. Verification
  7. Documentation
  8. License

@claude-flow/cli-core

npm version npm downloads License: MIT

Status: alpha (pre-release). Tracking ADR-100. Don't depend on this in production yet.

Lightweight core CLI surface for Claude Flow — memory + hooks commands only. Designed to load fast on a cold npx cache so plugin skills don't race Claude Code's 30 second MCP-startup timeout.

Why a separate package?

Issue #1748 #3 documented a silent failure mode for new users: npx claude-flow@latest mcp start from a cold npx cache regularly exceeds 30 seconds (1.8 MB / 999 files), Claude Code's MCP startup timeout fires, zero tools register, and the user observes "Ruflo is broken — no MCP tools available."

@claude-flow/cli-core is a ≤250 KB packed subset containing only what plugin skills actually call: memory store/list/retrieve/search/delete/init and the hooks family (route, model-outcome, post-edit, pre-task, etc.). On a cold cache, npx @claude-flow/cli-core@alpha memory store ... should complete in under 5 seconds — well under the timeout.

Install

# Pre-release alpha
npm install @claude-flow/cli-core@alpha

# Or just npx-invoke directly from a plugin Bash block
npx @claude-flow/cli-core@alpha memory store --key x --value 1 --namespace patterns

What's included

CategoryCommands
memorystore, list, retrieve, search, delete, init, migrate, stats, configure, cleanup, compress, export, import
hooksroute, pre-task, post-task, pre-edit, post-edit, pre-command, post-command, model-outcome, model-route, model-stats, worker-*, intelligence_*, plus 12 background-worker dispatchers

What's NOT included (use @claude-flow/cli for these)

  • swarm, hive-mind, agent, task, coordination — multi-agent orchestration
  • neural, embeddings, intelligence — full ML surface
  • federation, claims, aidefence — cross-installation features
  • browser, wasm, rvf — sandbox + browser automation
  • init, migrate, doctor, daemon, deployment — lifecycle management
  • performance, security, providers, plugins, config — admin surface

For any of these, install @claude-flow/cli@alpha (the metapackage that re-exports cli-core and lazy-loads everything else).

Compatibility

@claude-flow/[email protected] ships in lockstep with @claude-flow/[email protected]. Once promoted from alpha → latest, the two packages will continue to share the major.minor line.

Verification

# Cold cache test — clear npx cache first
rm -rf ~/.npm/_npx
time npx @claude-flow/cli-core@alpha memory store --key smoke --value test --namespace test
# Expected: <5 seconds wall-time on typical broadband

Documentation

License

MIT

版本与发布记录

@claude-flow/cli-core 共发布 15 个版本,首次发布于 2026/05/06;过去 12 个月发布了 15 个版本。

版本发布日期距今
3.7.7latest2026/11/10今天
3.7.62026/11/09今天
3.7.52026/10/2021 天前
3.7.4dream-security2026/10/1624 天前
3.7.32026/10/1426 天前
3.7.22026/10/1328 天前

其他发布通道:alpha → 3.7.0,v3alpha → 3.7.0,dream-security → 3.7.4。

关于 @claude-flow/cli-core 的常见问题

@claude-flow/cli-core 是什么?

Lightweight core CLI surface for Claude Flow — memory + hooks commands only. Designed to load fast on cold npx cache (<5s) so plugin skills don't race the 30s MCP-startup timeout. The full @claude-flow/cli metapackage lazy-loads everything else on top of

如何安装 @claude-flow/cli-core?

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

@claude-flow/cli-core 支持 TypeScript 吗?

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

@claude-flow/cli-core 支持 ESM 还是 CommonJS?

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

@claude-flow/cli-core 可以商用吗?

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

@claude-flow/cli-core 的下载量有多少?

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

@claude-flow/cli-core 还在维护吗?

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