Overview
The LiveKit CLI (lk) is the primary interface for managing LiveKit Cloud projects, creating applications from templates, and deploying agents. For a conceptual overview of the CLI and its key workflows, see the CLI introduction.
GitHub repository
Source code and releases for the LiveKit CLI.
Setup
Install the CLI, authenticate with LiveKit Cloud, and link a project to get started.
Install the CLI
Install the LiveKit CLI with Homebrew:
brew install livekit-cli
curl -sSL https://get.livekit.io/cli | bash
You can also download the latest precompiled binaries here.
winget install LiveKit.LiveKitCLI
You can also download the latest precompiled binaries here.
This repo uses Git LFS for embedded video resources. Please ensure git-lfs is installed on your machine before proceeding.
git clone github.com/livekit/livekit-climake install
Update the CLI
Update the CLI regularly to ensure you have the latest features and bug fixes:
Update the LiveKit CLI with Homebrew:
brew update && brew upgrade livekit-cli
curl -sSL https://get.livekit.io/cli | bash
You can also download the latest precompiled binaries here.
winget upgrade LiveKit.LiveKitCLI
You can also download the latest precompiled binaries here.
This repo uses Git LFS for embedded video resources. Please ensure git-lfs is installed on your machine before proceeding.
Before updating, make sure you've recently pulled the latest changes from main.
make install
Add a project
Link a LiveKit project to the CLI to use it. This can be a LiveKit Cloud project or a self-hosted LiveKit server instance.
To link a LiveKit Cloud project, run the following command then follow the instructions in your browser to authenticate:
lk cloud auth
To add a different project, see the Project management guide.
Generate access token
A participant creating or joining a LiveKit room needs an access token. You can generate one using the CLI:
lk token create \--api-key devkey --api-secret secret \--join --room test_room --identity test_user \--valid-for 24h
Make sure you're running LiveKit server locally in dev mode.
lk token create \--api-key <PROJECT_KEY> --api-secret <PROJECT_SECRET> \--join --room test_room --identity test_user \--valid-for 24h
You can also generate tokens from your project's dashboard.
Test with LiveKit Meet
Use LiveKit Meet to preview your LiveKit instance. Enter the token you previously generated in the "Custom" tab. After you connect, your microphone and camera stream in realtime, and any other participant who connects to the same room can see and hear you.
If you're testing a LiveKit Cloud instance, you can find your Project URL (it starts with wss://) in the project settings.
LiveKit Meet
Full source code for the LiveKit Meet example app.
Simulating another publisher
One way to test a multi-user session is by generating a second token (ensure --identity is unique), opening the LiveKit Meet example app in another browser tab and connecting to the same room.
Another way is to use the CLI as a simulated participant and publish a prerecorded video to the room:
lk room join \--url ws://localhost:7880 \--api-key devkey --api-secret secret \--publish-demo --identity bot_user \my_first_room
lk room join \--url <PROJECT_SECURE_WEBSOCKET_ADDRESS> \--api-key <PROJECT_API_KEY> --api-secret <PROJECT_SECRET_KEY> \--publish-demo --identity bot_user \my_first_room
This command publishes a looped demo video to my_first_room. Due to how the file was encoded, expect a short delay before your browser has sufficient data to render frames.
App templates
The LiveKit CLI can help you bootstrap applications from a number of convenient template repositories, using your project credentials to set up required environment variables and other configuration automatically.
For agent templates (voice agents and other LiveKit Agents projects), use lk agent init:
lk agent init my-agent --template agent-starter-python# or: --template agent-starter-node
Then follow the CLI prompts to finish your setup.
Omit the --template flag to see a list of all available templates.
First-party templates:
| Template Name | Language/Framework | Description |
|---|---|---|
| agent-starter-python | Python | A starter project for Python, featuring a simple voice agent implementation |
| agent-starter-react | TypeScript/Next.js | A starter app for Next.js, featuring a flexible voice AI frontend |
| agent-starter-android | Kotlin/Android | A starter project for Android, featuring a flexible voice AI frontend |
| agent-starter-swift | Swift | A starter project for Swift, featuring a flexible voice AI frontend |
| agent-starter-flutter | Flutter | A starter project for Flutter, featuring a flexible voice AI frontend |
| agent-starter-react-native | React Native/Expo | A starter project for Expo, featuring a flexible voice AI frontend |
| agent-starter-embed | TypeScript/Next.js | A starter project for a flexible voice AI that can be embedded in any website |
| token-server | Node.js/TypeScript | A hosted token server to help you prototype your mobile applications faster |
| meet | TypeScript/Next.js | An open source video conferencing app built on LiveKit Components and Next.js |
| multi-agent-python | Python | A team of writing coach agents demonstrating multi-agent workflows |
| outbound-caller-python | Python | An agent that makes outbound calls using LiveKit SIP |
LiveKit Template Index
Browse all available first-party templates.