LiveKit docs › Developer tools › LiveKit CLI › Overview

---

# LiveKit CLI

> Install the LiveKit CLI, set up a project, and create apps from templates.

## 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](https://docs.livekit.io/intro/basics/cli.md).

- **[GitHub repository](https://github.com/livekit/livekit-cli)**: 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

**macOS**:

Install the LiveKit CLI with [Homebrew](https://brew.sh/):

```text
brew install livekit-cli

```

---

**Linux**:

```text
curl -sSL https://get.livekit.io/cli | bash

```

> 💡 **Tip**
> 
> You can also download the latest precompiled binaries [here](https://github.com/livekit/livekit-cli/releases/latest).

---

**Windows**:

```text
winget install LiveKit.LiveKitCLI

```

> 💡 **Tip**
> 
> You can also download the latest precompiled binaries [here](https://github.com/livekit/livekit-cli/releases/latest).

---

**From Source**:

This repo uses [Git LFS](https://git-lfs.github.com/) for embedded video resources. Please ensure git-lfs is installed on your machine before proceeding.

```text
git clone github.com/livekit/livekit-cli
make install

```

### Update the CLI

Update the CLI regularly to ensure you have the latest features and bug fixes:

**macOS**:

Update the LiveKit CLI with [Homebrew](https://brew.sh/):

```text
brew update && brew upgrade livekit-cli

```

---

**Linux**:

```text
curl -sSL https://get.livekit.io/cli | bash

```

> 💡 **Tip**
> 
> You can also download the latest precompiled binaries [here](https://github.com/livekit/livekit-cli/releases/latest).

---

**Windows**:

```text
winget upgrade LiveKit.LiveKitCLI

```

> 💡 **Tip**
> 
> You can also download the latest precompiled binaries [here](https://github.com/livekit/livekit-cli/releases/latest).

---

**From Source**:

This repo uses [Git LFS](https://git-lfs.github.com/) 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`.

```text
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:

```shell
lk cloud auth

```

To add a different project, see the [Project management](https://docs.livekit.io/reference/developer-tools/livekit-cli/projects.md) guide.

> 💡 **Tip**
> 
> If you're looking to explore LiveKit's [Agents](https://docs.livekit.io/agents.md) framework, use [Agent Console](https://docs.livekit.io/agents/start/console.md) to test agents and the [token server](https://docs.livekit.io/frontends/build/authentication/sandbox-token-server.md) to prototype frontend apps.

### Generate access token

A participant creating or joining a LiveKit [room](https://docs.livekit.io/intro/basics/rooms-participants-tracks.md) needs an [access token](https://docs.livekit.io/frontends/authentication/tokens.md). You can generate one using the CLI:

**Localhost**:

```shell
lk token create \
  --api-key devkey --api-secret secret \
  --join --room test_room --identity test_user \
  --valid-for 24h

```

> 💡 **Tip**
> 
> Make sure you're running LiveKit server locally in [dev mode](https://docs.livekit.io/transport/self-hosting/local.md#dev-mode).

---

**Cloud**:

```shell
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](https://cloud.livekit.io/projects/p_/settings/keys).

### Test with LiveKit Meet

Use [LiveKit Meet](https://meet.livekit.io) to preview your LiveKit instance. Enter the token you [previously generated](#generate-access-token) 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.

> 💡 **Tip**
> 
> If you're testing a LiveKit Cloud instance, you can find your `Project URL` (it starts with `wss://`) in the project settings.

- **[LiveKit Meet](https://github.com/livekit-examples/meet)**: Full source code for the LiveKit Meet example app.

#### Simulating another publisher

One way to test a multi-user session is by [generating](#generate-access-token) a second token (ensure `--identity` is unique), opening the LiveKit Meet example app in another [browser tab](https://meet.livekit.io) 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:

**Localhost**:

```shell
lk room join \
  --url ws://localhost:7880 \
  --api-key devkey --api-secret secret \
  --publish-demo --identity bot_user \
  my_first_room

```

---

**Cloud**:

```shell
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`:

```shell
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](https://github.com/livekit-examples/agent-starter-python) | Python | A starter project for Python, featuring a simple voice agent implementation |
| [agent-starter-react](https://github.com/livekit-examples/agent-starter-react) | TypeScript/Next.js | A starter app for Next.js, featuring a flexible voice AI frontend |
| [agent-starter-android](https://github.com/livekit-examples/agent-starter-android) | Kotlin/Android | A starter project for Android, featuring a flexible voice AI frontend |
| [agent-starter-swift](https://github.com/livekit-examples/agent-starter-swift) | Swift | A starter project for Swift, featuring a flexible voice AI frontend |
| [agent-starter-flutter](https://github.com/livekit-examples/agent-starter-flutter) | Flutter | A starter project for Flutter, featuring a flexible voice AI frontend |
| [agent-starter-react-native](https://github.com/livekit-examples/agent-starter-react-native) | React Native/Expo | A starter project for Expo, featuring a flexible voice AI frontend |
| [agent-starter-embed](https://github.com/livekit-examples/agent-starter-embed) | TypeScript/Next.js | A starter project for a flexible voice AI that can be embedded in any website |
| [token-server](https://github.com/livekit-examples/token-server-node) | Node.js/TypeScript | A hosted token server to help you prototype your mobile applications faster |
| [meet](https://github.com/livekit-examples/meet) | TypeScript/Next.js | An open source video conferencing app built on LiveKit Components and Next.js |
| [multi-agent-python](https://github.com/livekit-examples/multi-agent-python) | Python | A team of writing coach agents demonstrating multi-agent workflows |
| [outbound-caller-python](https://github.com/livekit-examples/outbound-caller-python) | Python | An agent that makes outbound calls using LiveKit SIP |

- **[LiveKit Template Index](https://github.com/livekit-examples/index)**: Browse all available first-party templates.

## Docs search

The `lk docs` subcommand gives you full access to the LiveKit documentation from your terminal. Search, browse pages, look up SDK code, and check changelogs without leaving your workflow:

```shell
# Search the docs
lk docs search "voice agent quickstart"

# Fetch a specific page
lk docs get-page /agents/start/voice-ai-quickstart

# Search SDK source code
lk docs code-search "class AgentSession" --repo livekit/agents

```

This is especially useful for [coding agents](https://docs.livekit.io/intro/coding-agents.md) that can run CLI commands — it gives them direct access to up-to-date LiveKit documentation and SDK references.

- **[Docs search reference](https://docs.livekit.io/reference/developer-tools/livekit-cli/docs.md)**: Full command reference for `lk docs`.

---

This document was rendered at 2026-06-07T11:31:58.571Z.
For the latest version of this document, see [https://docs.livekit.io/reference/developer-tools/livekit-cli.md](https://docs.livekit.io/reference/developer-tools/livekit-cli.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).