LiveKit CLI
$ lk Official Med RiskLiveKit CLI (lk) manages LiveKit Cloud and self-hosted WebRTC deployments from the terminal. Agents can inspect active rooms and session analytics with --json, mint scoped participant tokens via lk token create --grant, and scaffold, simulate, or deploy real-time voice/video agents via lk agent.
brew install livekit-cli lk combines local agent scaffolding (lk agent dev), LiveKit Docs search (lk docs), and low-overhead --json room/token management in one native binary without MCP schema bloat.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --json on list and analytics queries, explicit --api-key/--url flags, and clear CLI precedence over interactive prompts.
--jsonflag supported onlk room listandlk analytics session list- Full env var override via
LIVEKIT_URL,LIVEKIT_API_KEY, andLIVEKIT_API_SECRET
Fine-grained JWT scoping via --grant and clean env-var credential injection, though lk agent deploy and lk room delete lack a global --dry-run.
- Scoped participant grants supported via
--grantJSON - Separates local token minting from remote room/agent mutations
Single compiled Go binary distributed via Homebrew, curl installer, winget, and GitHub Releases across macOS, Linux, and Windows.
- Single static Go binary via
brew install livekit-cli
Unifies room inspection, JWT generation, SIP/egress control, docs search, and AI agent lifecycle in one fast binary.
- Covers
lk room,lk token,lk agent, andlk analytics
Official first-party CLI maintained by LiveKit (livekit/livekit-cli) under Apache-2.0 with active releases.
- First-party LiveKit repository under Apache-2.0 license
Well-structured documentation on docs.livekit.io plus built-in lk docs terminal lookup.
- Official CLI reference and built-in
lk docscommand
Security, Auth & Guardrails
Reads LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET env vars, project ./livekit.toml, or global credentials saved by lk cloud auth.
Apache-2.0 open-source CLI; LiveKit Cloud usage bills per participant-minute and agent runtime beyond free tier.
# LiveKit CLI (lk) Agent Rules - Pass `LIVEKIT_URL`, `LIVEKIT_API_KEY`, and `LIVEKIT_API_SECRET` via env vars instead of running interactive `lk cloud auth`. - Use `--json` on `lk room list` and `lk analytics session list` for structured inspection. - Require explicit user confirmation before running `lk room delete`, `lk agent create`, or `lk agent deploy`.
Agent-Ready Command Recipes
Safe Read-Only Queries
lk room list --json
Returns structured JSON metadata for active rooms without interactive prompts.
lk analytics session list --limit 25 --json
Exports bounded session metrics in machine-readable JSON for debugging call quality.
Controlled Writes & Previews
lk token create --join --room demo-room --identity observer-1 --grant '{"roomJoin": true, "canPublish": false}' Generates a scoped JWT locally using explicit --grant permissions without modifying remote rooms.
Strengths for Agents
- + Native
--jsonoutput on room and session analytics queries avoids brittle text scraping. - + Fast single Go binary with deterministic env-var auth (
LIVEKIT_API_KEY/LIVEKIT_API_SECRET).
Caveats & Pitfalls
- ! No global
--dry-runflag onlk agent deployor destructivelk room deleteactions. - !
lk cloud authopens a browser OAuth flow and should be avoided in headless agent runs.