@beatapi/realtime-cli
v0.1.0
Published
BeatAPI CLI for Realtime Video session diagnostics and lifecycle operations
Downloads
43
Maintainers
Readme
@beatapi/realtime-cli
Server-side diagnostics and lifecycle commands for the BeatAPI Realtime Video API. The CLI manages control-plane Sessions; live camera and WebRTC media still belong in a browser using @beatapi/realtime.
Install
npm install --global @beatapi/realtime-cli
export BEATAPI_API_KEY="sk_your_server_key"Do not paste the key into a command argument. BEATAPI_API_KEY keeps it out of shell history. For a non-production environment, set BEATAPI_API_BASE_URL explicitly.
Commands
Validate authentication and inspect current usage:
beatapi-realtime doctorCreate a Session. Repeat --origin to allow more than one exact browser origin and repeat --metadata for additional string fields:
beatapi-realtime sessions create \
--duration 60 \
--origin https://app.example.com \
--metadata customer_id=cus_123Get a Session:
beatapi-realtime sessions get rts_01J...Idempotently close a Session and release its capacity:
beatapi-realtime sessions close rts_01J...Commands print the BeatAPI JSON envelope to stdout. Errors go to stderr with a non-zero exit code. Capacity and rate-limit errors include the recommended retry delay when the API supplies one.
See the Realtime Video integration guide for browser SDK setup, billing, lifecycle, and security requirements.
