Quickstart
Generate and embed your first LittleDemo in a few minutes.
Quickstart
This path uses the CLI because it handles login, project creation, polling, and embed output for you.
1
Install the CLI
bashnpm install -g @littledemo/clilittledemo --version
2
Sign in
bashlittledemo login
The command opens a browser page where you approve the device code.
3
Create a demo
bashlittledemo init
The wizard creates a project, asks what to show, starts generation, and waits for the final demo URL.
4
Embed the result
html<iframe src="https://littledemo.com/embed/demo_abc123" width="100%" height="400" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
Same flow with the API
Use this when you already have an API key and want to wire LittleDemo into another system.
bashcurl -X POST https://littledemo.com/api/v1/projects \ -H "Authorization: Bearer ld_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme App", "url": "https://acme.com", "viewport": "desktop" }'
javascriptconst project = await fetch("https://littledemo.com/api/v1/projects", { method: "POST", headers: { Authorization: `Bearer ${process.env.LITTLEDEMO_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ name: "Acme App", url: "https://acme.com", viewport: "desktop", }),}).then((res) => res.json());
Then start a demo:
bashcurl -X POST https://littledemo.com/api/v1/demos \ -H "Authorization: Bearer ld_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "project_id": "proj_abc123", "prompt": "Show creating a workspace and inviting a teammate", "duration_target": "10s", "presentation": { "recordingTemplate": { "id": "auto" } } }'
javascriptconst demo = await fetch("https://littledemo.com/api/v1/demos", { method: "POST", headers: { Authorization: `Bearer ${process.env.LITTLEDEMO_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ project_id: "proj_abc123", prompt: "Show creating a workspace and inviting a teammate", duration_target: "10s", presentation: { recordingTemplate: { id: "auto" }, }, }),}).then((res) => res.json());