How beeper/cli works
Beeper CLI connects a user or automation to a local or remote Beeper target, then exposes account, chat, message, contact, and media operations across bridged networks. Setup handles installation, target registration, and authorization; client creation resolves the selected target and credentials before commands use the Beeper API. The README also documents verification, export, and automation surfaces. Some of those implementations were not sampled, so their documented capabilities are shown without speculative internal wiring.
Main entry points: client.ts API client setup · setup.ts Setup workflow · cli.js CLI launcher · index.ts Export engine
Components 24
CLI interaction
- CLI launcher
packages/cli/bin/cli.js
Targets and auth
- Setup workflow
packages/cli/src/commands/setup.ts - Install targets
packages/cli/src/commands/install/server.ts - Target management
packages/cli/src/commands/targets/add/server.ts - Target profiles
packages/cli/src/lib/targets.ts - OAuth PKCE
packages/cli/src/lib/oauth.ts - API client setup
packages/cli/src/lib/client.ts - Desktop credentials
packages/cli/src/lib/desktop-auth.ts - Device verification
packages/cli/src/commands/verify/start.ts
Chat operations
- Accounts and bridges
packages/cli/src/commands/accounts/add.ts - Chat management
packages/cli/src/commands/chats/search.ts - Message operations
packages/cli/src/commands/messages/search.ts - Contact search
packages/cli/src/commands/contacts/search.ts - Send messages
packages/cli/src/commands/send/text.ts
Automation and data
- Data export
packages/cli/src/commands/export.ts - Export engine
packages/cli/src/lib/export/index.ts - Events and watch
packages/cli/src/commands/watch.ts - Stdio RPC
packages/cli/src/commands/rpc.ts - Raw API requests
packages/cli/src/commands/api/request.ts - Plugin extensions
packages/cli/src/commands/plugins.ts
Other components
- User or agent
- Beeper API target
- Export files
- Signed webhooks
Connections 26
- User or agent → CLI launcher: runs commands
- CLI launcher → Setup workflow: dispatches setup
- CLI launcher → Target management: dispatches targets
- Setup workflow → Install targets: installs
- Setup workflow → Target profiles: reads and writes
- Setup workflow → OAuth PKCE: authorizes remote
- Setup workflow → Desktop credentials: adopts session
- Target management → Target profiles: updates profiles
- API client setup → Target profiles: resolves target
- API client setup → Desktop credentials: obtains token
- API client setup → Beeper API target: creates API client
- Accounts and bridges → API client setup: creates client
- Chat management → API client setup: creates client
- Message operations → API client setup: creates client
- Contact search → API client setup: creates client
- Send messages → API client setup: creates client
- Device verification → API client setup: uses target client
- Data export → API client setup: creates client
- Data export → Export engine: runs export
- Export engine → Beeper API target: reads chat data
- Export engine → Export files: writes export
- Events and watch → API client setup: connects to target
- Events and watch → Signed webhooks: dispatches events
- Stdio RPC → API client setup: uses target client
- Raw API requests → API client setup: creates client
- Plugin extensions → CLI launcher: extends commands