walkie — P2P communication CLI for AI agents. npm package: walkie-sh.
bin/walkie.js— CLI entry point (commander). Version is here AND inpackage.json(keep in sync)src/api.js— Programmatic API (require('walkie-sh')). Exportslisten()andsend(). Uses daemon IPC under the hood.src/daemon.js— background daemon managing Hyperswarm P2P + local subscriber routingsrc/client.js— IPC client, handles daemon auto-start and stale socket cleanupsrc/crypto.js— topic derivation (SHA-256 of channel+secret)src/web.js— HTTP + WebSocket server bridging browser clients to daemonsrc/web-ui.js— exports HTML string for web chat UI (minimal, terminal-style)
package.json "main" points to src/api.js. Node apps can require('walkie-sh'):
const walkie = require('walkie-sh')
// Listen on a channel (EventEmitter — emits 'message' and 'error')
const ch = await walkie.listen('mychannel:secret', { id: 'mybot' })
ch.on('message', async (msg) => {
// msg: { from: string, data: string, ts: number, id: string }
await ch.send('response')
})
await ch.close()
// One-shot send (auto-joins if secret provided)
await walkie.send('mychannel:secret', 'hello', { id: 'sender' })listen()joins the channel, starts streaming viastreamMessages(), filters own messages, returns aWalkieChannel(EventEmitter +send()+close())send()auto-joins and fires a single message — good for scripts/CI- Both auto-start the daemon if not running
npm test — 53 automated tests using node:test (zero extra deps). Covers crypto, store, CLI utils, daemon IPC, web server, and programmatic API.
npm run test:p2p — manual P2P integration test (two daemons, Hyperswarm discovery, ~30s).
Manual same-machine test with two identities:
walkie stop
WALKIE_ID=alice walkie create test -s secret
WALKIE_ID=bob walkie join test -s secret
WALKIE_ID=alice walkie send test "hello"
WALKIE_ID=bob walkie read test# bump version in package.json AND bin/walkie.js
npm publishRemote uses SSH alias: git@github-vikasprogrammer:vikasprogrammer/walkie.git
- Skill source:
skills/walkie/ - Test copy:
/Users/vikas/Playground/random/walkie-test/.agents/skills/walkie/ - Keep both in sync when updating skill docs
docs/index.html — single-page static site at walkie.sh
Deploy:
instapods deploy walkie --local docs --preset static- No
--asflag (removed in v1.3.0). OnlyWALKIE_IDenv var for explicit names - Auto-derived subscriber IDs from terminal session env vars (v1.2.0)
--waitblocks indefinitely,--timeoutis optionalwalkie webuses read-wait loops per channel (no daemon changes needed for real-time)- Web client identity:
web-{random8hex}, renameable via header click - Web session state (channels, secrets, name) persisted in sessionStorage
wsnpm package added as 3rd dependency- Programmatic API (
src/api.js) wrapsclient.jsfunctions — no new deps, uses existing daemon IPC package.json"main": "./src/api.js"makesrequire('walkie-sh')return the API (not the CLI)