{"_id":"@builtbyberry/swarm-cli","_rev":"3-b2ce0042cc48cdf3f2f0a99bfa75bf55","name":"@builtbyberry/swarm-cli","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@builtbyberry/swarm-cli","version":"0.1.0","keywords":["swarm","mcp","context","hooks","cli"],"license":"MIT","_id":"@builtbyberry/swarm-cli@0.1.0","maintainers":[{"name":"builtbyberry","email":"daniel@builtbyberry.com"}],"homepage":"https://github.com/builtbyberry/swarmcloud/tree/main/cli/swarm#readme","bugs":{"url":"https://github.com/builtbyberry/swarmcloud/issues"},"bin":{"swarm":"bin/swarm.js"},"dist":{"shasum":"094913efa52bd9f6f690ec0050c5d380113412b0","tarball":"https://registry.npmjs.org/@builtbyberry/swarm-cli/-/swarm-cli-0.1.0.tgz","fileCount":8,"integrity":"sha512-Rd5UEUThdv7Qg0d3lCGi9GMqMU+L3V+Ir5DFwqthz3UHkWrLy+g1IDMMlDkCVOMG2o0fj1KEnw+VxyHZiMLhkg==","signatures":[{"sig":"MEUCIQCqj65UrqaRDvkmJauM929KI4JLvR3YLgLnmPE941LCBgIgdpR4wByomy7S37UGZ16SV2YJBXTW81rEh8WWDw7cNz4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23480},"type":"module","engines":{"node":">=18"},"gitHead":"a614fa2466c8cd01fc059f2ae247903d5133ca8f","scripts":{"test":"node --test","prepublishOnly":"node --test"},"_npmUser":{"name":"builtbyberry","email":"daniel@builtbyberry.com"},"repository":{"url":"git+https://github.com/builtbyberry/swarmcloud.git","type":"git","directory":"cli/swarm"},"_npmVersion":"10.9.4","description":"The Swarm executing-hook helper: load context at session start and checkpoint at session stop, deterministically, from a scoped channel credential.","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/swarm-cli_0.1.0_1782074842488_0.1862298764668342","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @builtbyberry/prymer-cli"},"0.1.1":{"name":"@builtbyberry/swarm-cli","version":"0.1.1","keywords":["swarm","mcp","context","hooks","cli"],"license":"MIT","_id":"@builtbyberry/swarm-cli@0.1.1","maintainers":[{"name":"builtbyberry","email":"daniel@builtbyberry.com"}],"homepage":"https://github.com/builtbyberry/swarmcloud/tree/main/cli/swarm#readme","bugs":{"url":"https://github.com/builtbyberry/swarmcloud/issues"},"bin":{"swarm":"bin/swarm.js"},"dist":{"shasum":"92a33312880602d6349e95b0e445ae0839b8308b","tarball":"https://registry.npmjs.org/@builtbyberry/swarm-cli/-/swarm-cli-0.1.1.tgz","fileCount":8,"integrity":"sha512-dwKXjvDy8VWkzFbqOJ4be2YiD5Ry2RPsR6BGifh25gSGxd5LQP6DTWFJ1MGTCkz9+qKyPie+bAjfU0xXMrQ95g==","signatures":[{"sig":"MEQCIFEiNxYbJB8hqF+rWidizSmMWA5cTAZTvE0e4A7nU8aOAiB5bR3ODjKeyqzDw9Jegb2AxknFMuslIem2Tt/dwOr7JA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23250},"type":"module","engines":{"node":">=18"},"gitHead":"2b5de2176b4368f105801bd550c85dfa7b9cf684","scripts":{"test":"node --test","prepublishOnly":"node --test"},"_npmUser":{"name":"builtbyberry","email":"daniel@builtbyberry.com"},"repository":{"url":"git+https://github.com/builtbyberry/swarmcloud.git","type":"git","directory":"cli/swarm"},"_npmVersion":"10.9.4","description":"The Swarm executing-hook helper: load context at session start and checkpoint at session stop, deterministically, from a scoped channel credential.","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/swarm-cli_0.1.1_1782075444033_0.8546953816502028","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @builtbyberry/prymer-cli"}},"time":{"created":"2026-06-21T20:47:22.374Z","modified":"2026-07-24T13:13:05.227Z","0.1.0":"2026-06-21T20:47:22.627Z","0.1.1":"2026-06-21T20:57:24.152Z"},"bugs":{"url":"https://github.com/builtbyberry/swarmcloud/issues"},"license":"MIT","homepage":"https://github.com/builtbyberry/swarmcloud/tree/main/cli/swarm#readme","keywords":["swarm","mcp","context","hooks","cli"],"repository":{"url":"git+https://github.com/builtbyberry/swarmcloud.git","type":"git","directory":"cli/swarm"},"description":"The Swarm executing-hook helper: load context at session start and checkpoint at session stop, deterministically, from a scoped channel credential.","maintainers":[{"name":"builtbyberry","email":"daniel@builtbyberry.com"}],"readme":"# `swarm` — Swarm executing-hook helper\n\nA small, dependency-free CLI for the **executing-hook power mode**. The web\nconnectors install _instructional_ hooks that nudge the model to call the Swarm\nMCP tools. This CLI instead runs the ritual itself, so the load step happens\ndeterministically — even when the model forgets.\n\nIt is built on Node's standard library only (no npm dependencies).\n\n## Install\n\n```bash\nnpm install -g @builtbyberry/swarm-cli\n```\n\n## Authenticate\n\n1. In Swarm, open **Settings → Connected tools** and create a **hook credential**\n   for the channel you want this machine to use. The token (`swhk_…`) is shown\n   once.\n2. Store it:\n\n```bash\nswarm login --url https://your-swarm-host --token swhk_xxx\n```\n\nThe token reaches exactly one channel and only the load + checkpoint verbs, so a\nleak is contained to that channel — never your whole account. On macOS it is kept\nin the login keychain; elsewhere in a `~/.swarm/*.json` file with `0600`\npermissions. Use `--profile <name>` to keep tokens for several channels side by\nside.\n\n## Use it in hooks\n\n```bash\nswarm install-hooks --client codex   # writes .codex/hooks.json\nswarm install-hooks --client claude  # writes .claude/settings.json\n```\n\nBoth write a `SessionStart` hook that runs `swarm inject`. Codex and Claude Code\nboth feed `SessionStart` stdout to the model as additional context, so the\nchannel's context document loads automatically at the start of every session.\n\n## Commands\n\n| Command                                        | What it does                                                                                                                           |\n| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| `swarm login`                                  | Store a hook credential (verifies it before saving).                                                                                   |\n| `swarm logout`                                 | Remove a stored credential.                                                                                                            |\n| `swarm whoami`                                 | Show the stored host + a masked token.                                                                                                 |\n| `swarm inject`                                 | Print the channel's context document (for `SessionStart`). Fails quiet so it never breaks a session; use `--strict` to surface errors. |\n| `swarm checkpoint --title <t> --summary <s>`   | Append a checkpoint. Idempotent per session + state; only shares when the channel's capture mode is **Auto**.                          |\n| `swarm install-hooks --client <codex\\|claude>` | Write the executing `SessionStart` hook for a client.                                                                                  |\n\n### Checkpointing\n\n`inject` is fully deterministic — no model needed. A checkpoint, by contrast,\nneeds a summary worth keeping, so it's a step the agent (or you) takes when there\nis something to record rather than a blind Stop hook:\n\n```bash\nswarm checkpoint --session \"$SESSION_ID\" \\\n  --title \"Finished the billing fix\" \\\n  --summary \"Switched to Stripe; tests green.\"\n```\n\nThe idempotency key is derived from the session id + title + summary, so re-running\nthe same checkpoint for the same session is a no-op rather than a duplicate.\n\n## Test\n\n```bash\ncd cli/swarm && npm test\n```\n","readmeFilename":"README.md"}