@cmgmyr/hive

中文文档
1.12.1发布于 2026/11/04MITES Module构建来源已验证近 30 天下载 2216

Run a crew of Claude Code and Codex workers from one lead session: visible tmux panes, exact state from hooks, one local SQLite store.

原始使用文档
文档目录8 节
  1. Install
  2. First run
  3. How it works
  4. Why not subagents?
  5. Running several projects
  6. Status
  7. Docs
  8. Updating

hive

npm CI

Run a crew of Claude Code and Codex workers from one lead session: visible tmux panes, exact state from hooks, one local SQLite store.

  • Visible workers: each one is a real tmux pane you can read and type into.
  • Exact state: workers report it through their own CLI's hooks, so nothing polls.
  • One local SQLite store: no daemon. The MCP server, hooks, and scheduler make no outbound requests; the CLI contacts npm only to check for updates, and upgrades can download (details).

hive: a lead plans, spawns workers, and is woken when they finish

Install

Requirements: macOS, Node ^22.14.0 || >=23.6.0, Claude Code, and tmux for the agent tools. codex is optional, only needed if a project opts a worker into it; see docs/install.md.

npm install -g @cmgmyr/hive
hive setup           # pins the hive command to one interpreter, prints the MCP line
brew install tmux
claude mcp add --scope user hive -- "$(command -v node)" "$(npm root -g)/@cmgmyr/hive/dist/index.js"
ln -s "$(npm root -g)/@cmgmyr/hive/claude-plugin" ~/.claude/skills/hive   # optional: session-start kickoff
hive doctor          # verify: node, ABI, tmux, claude, database, hooks all green

Working from a clone instead? See docs/install.md.

Put ~/.local/bin on your PATH below your version manager's block. See Node version and the interpreter pin for why the order matters.

First run

Run cd ~/Code/your-project && hive. It is shorthand for hive lead, and it opens a lead window running Claude in this project's tmux session, with the lead session named after the project so your other Claude Code sessions can address it by that name; ask it to triage, and it reads the standing process and proposes work. Spawn workers with agent_spawn, and watch or take over any of them with tmux -CC attach -t hive-main (or plain tmux attach).

How it works

Each Claude Code session runs its own hive MCP server over stdio, and every instance reads and writes one SQLite database (WAL mode) at ~/.hive/hive.db, so every session sees the same state. There is no daemon. The MCP server, hooks, and scheduler make no outbound requests; the CLI contacts npm only to check for updates, and upgrades can download (details). State is scoped to a project (a directory), resolved from the working directory; a lead spawns workers into tmux panes locked to that project.

Why not subagents?

Subagentshive workers
Visibilityreport at the endlive terminal you read and type into
Persistencevanish with the conversationpads and todos outlive every session
Lifetimedie with the parentkeep running when the lead detaches
Scopeone sessionseveral sessions, terminals, humans

Hive workers can still use subagents. See Why not subagents? for the longer answer.

Running several projects

If you keep more than one project registered, hive queen starts a single lead that reads all of them. hive portfolio sorts them into waiting on you, stuck, moving and quiet, and hive next attaches you to the lead that needs you most. The queen writes into another project only through that project's lead, and hive records each write. The queen guide covers setup and limits.

Status

hive is a personal daily-driver tool, released low-key. It is single-user by design and dogfooded daily by its author on macOS. The test suite also runs on Linux in CI, but nobody drives hive there yet. Issues are welcome; for bigger changes, open a discussion first. See CONTRIBUTING.md. MIT licensed.

Docs

PageWhat's there
ArchitectureEight diagrams: process topology, module layering, spawn sequence, wake lifecycle, worker state (with the lead handoff), project scoping, store and server identity
PatternsStanding trades, refused approaches, evidence standards, and guard shapes distilled from the project's own decisions and dead-ends
ConceptsVocabulary, why not subagents, identity, the workflow, project scope, the shared store
Daily driverA day with hive, starting a session, watching workers, wake-ups
The queenOne lead across every project: hive queen, the portfolio, hive next, its reach and audit trail
CommandsEvery hive subcommand and what it does
ConfigurationThe HIVE_* environment variables
ProfilesStanding instructions across projects, the session-start plugin
Projectshive init, hive.yml, automatic backups, pads and todos from the shell
Crew sidebarlead_sidebar: a crew pane in a Claude lead, and the read-only hive crew --json behind it
DashboardThe generated dashboard: enabling it, where it lives, what it shows
Install detailsThe interpreter pin, iTerm settings, the status line, MCP scope, codex workers, updating, uninstalling
TroubleshootingCommon errors and their fixes
SecurityWhat hive runs, writes and fetches on your machine, with the code to check
ToolsThe MCP tools: what each does and when to use it
tmux settingsAttach modes, pane options, and what to put in ~/.tmux.conf
DevelopmentBuilding and testing hive itself

Updating

Run hive upgrade for a global npm install, or hive upgrade --check to preview the commands without changing your install. In a git checkout, the default prints the recipe; hive upgrade --run executes it. Upgrade reports Claude Code and Codex registration repairs without editing their configs. Restart every session with hive loaded after the upgrade. See Updating and recovery.

版本与发布记录

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

版本发布日期距今
1.12.1latest2026/11/046 天前
1.12.02026/11/027 天前
1.11.92026/10/3110 天前
1.11.82026/10/2120 天前
1.11.72026/10/2021 天前
1.11.62026/10/1624 天前

关于 @cmgmyr/hive 的常见问题

@cmgmyr/hive 是什么?

Run a crew of Claude Code and Codex workers from one lead session: visible tmux panes, exact state from hooks, one local SQLite store.

如何安装 @cmgmyr/hive?

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

@cmgmyr/hive 支持 TypeScript 吗?

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

@cmgmyr/hive 支持 ESM 还是 CommonJS?

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

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

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

@cmgmyr/hive 可以商用吗?

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

@cmgmyr/hive 的下载量有多少?

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

@cmgmyr/hive 还在维护吗?

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