Awesome
<a href="https://livekit.io/"> <img src="./.github/assets/livekit-mark.png" alt="LiveKit logo" width="100" height="100"> </a>LiveKit Templates Index
<p> <a href="https://cloud.livekit.io/projects/p_/sandbox"><strong>Deploy a sandbox app</strong></a> • <a href="https://docs.livekit.io">LiveKit Docs</a> • <a href="https://livekit.io/cloud">LiveKit Cloud</a> • <a href="https://blog.livekit.io/">Blog</a> </p>This repository contains a collection of templates for the LiveKit platform. Each template is designed to be used as a starting point for building an application on LiveKit, as well as to work with the LiveKit Sandbox feature to rapidly develop and share app prototypes.
Using a template
All templates in this index can be bootstrapped using the LiveKit CLI. Running the following command will allow you to choose and initialize a template:
lk app create
After choosing a template and name for your project, the CLI will execute the following steps:
- Clone the git repository associated with the template to your
/tmp
directory or equivalent - De-git the repository so you don't include the template's history in your project
- Copy the
.env.example
file to.env.local
. This step includes the following:- Automatically updating any
LIVEKIT_*
environment variables that are recognized. - Prompting you for any additional variables that are not recognized, such as required API keys.
- Automatically updating any
- Move the directory from
/tmp
to the location you specified - Run the
post_create
task from thetaskfile.yaml
and print any user setup instructions
At this point, you're ready to start developing your application. Some templates work best with others – for example, an AI agent template may pair well with a voice assistant frontend template. It all depends on what you want to build. The beauty of LiveKit is that the primitives are interchangeable!
If you need a refresher on the basics, be sure to head to our documentation and read the Intro to LiveKit.
Creating your own template
Repository structure
Your template may be any kind of component, from a front-end for a livestreaming app to a helpful AI assistant built with the Agents framework. In order to be accepted as a community template, your repository must adhere to certain contraints:
- The template must be a public git repository, though it does not have to be hosted on GitHub.
- The repository must include a
.env.example
file at the root, containing stubs for the environment variables that the template requires. The following varaibles are standard, and can be inferred during bootstrap with the LiveKit CLI:LIVEKIT_URL
LIVEKIT_API_KEY
LIVEKIT_API_SECRET
- The repository must include a
taskfile.yaml
file in the root that follows the Taskfile format and defines at least the following tasks:post_create
: This task is run after the repository is bootstrapped usinglk app create
, and usually prints setup instructions for the user.install
: This task can be run to install dependencies or perform other steup for the template.
Publishing your template
When you're ready to share your template with the world, you can submit a pull request to this repository. The pull request should add a new entry to the templates.yaml
file with the following schema: