{"_id":"@dexh/shannon","_rev":"2-5f914b696cad28217c29630c243369f3","name":"@dexh/shannon","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@dexh/shannon","version":"0.0.1","keywords":["claude","claude-code","agent-sdk","tmux","cli"],"license":"MIT","_id":"@dexh/shannon@0.0.1","maintainers":[{"name":"dexhorthy","email":"dexter.i.horthy@gmail.com"}],"homepage":"https://github.com/humanlayer/shannon#readme","bugs":{"url":"https://github.com/humanlayer/shannon/issues"},"bin":{"shannon":"bin/shannon.mjs"},"dist":{"shasum":"e54392e3606d8bef5a854f1ede714b547b696eb3","tarball":"https://registry.npmjs.org/@dexh/shannon/-/shannon-0.0.1.tgz","fileCount":6,"integrity":"sha512-WSXyGTzxsY2CC+rBCd8L6dYJrPnMfVy4SRCFjeBZmIlatZlQ3gcH3GVkqICd784J5ZgjfCP7lyPFM7XrE29YUg==","signatures":[{"sig":"MEUCIEHpv5wIBa17jskyTXDTEjzt/Mvdi5eOKVIWnVBQ5ZwRAiEAiZ8f9UPNLJiDufoD3PqGO+KBmg5GjEUPYipCldybXzg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55165},"type":"module","module":"index.ts","exports":{".":"./src/sdk.ts","./cli":"./index.ts"},"gitHead":"93b9ffd5e45c2ab42dea42cd94a90325268d3d4c","private":false,"scripts":{"test":"bun test","typecheck":"bunx tsc --noEmit","pack:check":"bun pm pack --dry-run && (cd packages/shannon-agent-sdk && bun pm pack --dry-run)"},"_npmUser":{"name":"dexhorthy","email":"dexter.i.horthy@gmail.com"},"repository":{"url":"git+https://github.com/humanlayer/shannon.git","type":"git"},"workspaces":["packages/*"],"_npmVersion":"11.6.2","description":"CLI and SDK wrapper that drives interactive Claude Code through tmux and emits stream-json.","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^4.4.3","commander":"^14.0.3","@anthropic-ai/claude-agent-sdk":"^0.2.140"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/shannon_0.0.1_1778707728080_0.9189752018280055","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@dexh/shannon","version":"0.0.2","description":"CLI and SDK wrapper that drives interactive Claude Code through tmux and emits stream-json.","license":"MIT","homepage":"https://github.com/humanlayer/shannon#readme","bugs":{"url":"https://github.com/humanlayer/shannon/issues"},"keywords":["claude","claude-code","agent-sdk","tmux","cli"],"module":"index.ts","type":"module","bin":{"shannon":"bin/shannon.mjs"},"exports":{".":"./src/sdk.ts","./cli":"./index.ts"},"workspaces":["packages/*"],"scripts":{"test":"bun test","typecheck":"bunx tsc --noEmit","pack:check":"bun pm pack --dry-run && (cd packages/shannon-agent-sdk && bun pm pack --dry-run)"},"repository":{"type":"git","url":"git+https://github.com/humanlayer/shannon.git"},"publishConfig":{"access":"public"},"private":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"dependencies":{"@anthropic-ai/claude-agent-sdk":"^0.2.140","commander":"^14.0.3","zod":"^4.4.3"},"gitHead":"45b797e50c8e1be7e7a139202d33828096de89a8","_id":"@dexh/shannon@0.0.2","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-qV9mALE2/FjgY7LRhCIR0jpj19PGlmmHHkAXRx271oK9ciHN65uVC/PaWecSQICL9vSTUGF0CPVPTtd/ATjiDg==","shasum":"297859313c0e198082d6885191d89baaed248a61","tarball":"https://registry.npmjs.org/@dexh/shannon/-/shannon-0.0.2.tgz","fileCount":6,"unpackedSize":54227,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCxe/zwTrU/D5opQITB8H4zdd9frHP/KzSzOzyY8SmBbwIhAPjlsmJ8NGuIA47Jo6NXKA487sC09nxtBY+sOC2Qm/gw"}]},"_npmUser":{"name":"dexhorthy","email":"dexter.i.horthy@gmail.com"},"directories":{},"maintainers":[{"name":"dexhorthy","email":"dexter.i.horthy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/shannon_0.0.2_1778707996345_0.44160867879764676"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-13T21:28:47.971Z","modified":"2026-05-13T21:33:16.616Z","0.0.1":"2026-05-13T21:28:48.242Z","0.0.2":"2026-05-13T21:33:16.503Z"},"bugs":{"url":"https://github.com/humanlayer/shannon/issues"},"license":"MIT","homepage":"https://github.com/humanlayer/shannon#readme","keywords":["claude","claude-code","agent-sdk","tmux","cli"],"repository":{"type":"git","url":"git+https://github.com/humanlayer/shannon.git"},"description":"CLI and SDK wrapper that drives interactive Claude Code through tmux and emits stream-json.","maintainers":[{"name":"dexhorthy","email":"dexter.i.horthy@gmail.com"}],"readme":"# Shannon\n\nShannon is a CLI and SDK wrapper around the interactive Claude Code CLI. It runs a real `claude` session inside tmux, sends a prompt, and emits stream JSON.\n\n## Requirements\n\n- [Bun](https://bun.sh)\n- `claude` on `PATH`\n- `tmux` on `PATH`\n- A working Claude Code login\n\n## CLI\n\nRun without installing:\n\n```sh\nnpx @dexh/shannon -p \"Reply with exactly: hello\" --output-format=stream-json --verbose\n```\n\nOr install globally:\n\n```sh\nnpm install -g @dexh/shannon\nshannon -p \"Reply with exactly: hello\" --output-format=stream-json --verbose\n```\n\nOutput formats: `stream-json` (JSONL), `json` (single array), `text` (final result text).\n\n## SDK\n\n```sh\nnpm install @dexh/shannon\n```\n\n```ts\nimport { query } from \"@dexh/shannon\";\n\nfor await (const message of query({\n  prompt: \"Reply with exactly: hello\",\n  options: { outputFormat: \"stream-json\", verbose: true },\n})) {\n  console.log(JSON.stringify(message));\n}\n```\n\nAsync input is also accepted for finite user-message streams:\n\n```ts\nimport { query, type ShannonUserMessage } from \"@dexh/shannon\";\n\nasync function* messages(): AsyncIterable<ShannonUserMessage> {\n  yield {\n    type: \"user\",\n    message: {\n      role: \"user\",\n      content: [{ type: \"text\", text: \"Reply with exactly: hello\" }],\n    },\n    parent_tool_use_id: null,\n    session_id: \"\",\n  };\n}\n\nfor await (const message of query({ prompt: messages() })) {\n  console.log(JSON.stringify(message));\n}\n```\n\nPass an `AbortController` in options to terminate the underlying Shannon subprocess.\n\n## Agent SDK facade\n\n`@dexh/shannon-agent-sdk` is a Claude Agent SDK-compatible facade that re-exports Shannon's SDK surface. Full parity is a work in progress (see `GOAL_PROGRESS.md`).\n\n```sh\nnpm install @dexh/shannon-agent-sdk\n```\n\n```ts\nimport { query } from \"@dexh/shannon-agent-sdk\";\n\nfor await (const message of query({\n  prompt: \"Reply with exactly: hello\",\n  options: { outputFormat: \"stream-json\", verbose: true },\n})) {\n  console.log(JSON.stringify(message));\n}\n```\n\n## Development\n\n```sh\nbun install\nbun test\nbun run typecheck\nbun ./index.ts -p \"hello\" --output-format=stream-json --verbose\n```\n","readmeFilename":"README.md"}