npm create tldraw
A CLI tool for quickly scaffolding a new tldraw project. Inspired by npm create vite.
## Usage:
$ npm create tldraw -- --help
Usage: create-tldraw [OPTION]... [DIRECTORY]
Create a new tldraw project from a starter kit.
With no arguments, you'll be guided through an interactive setup.
Pass . as the directory to create the project in the current directory.
Options:
-h, --help Display this help message.
-t, --template NAME Use a specific template.
--no-telemetry Disable anonymous usage tracking.
Available starter kits:
• basic A minimal tldraw template with Vite, React, and TypeScript.
• agent An AI-powered agent.
• branching-chat A branching chat interface.
• chat A chat UI with sketches and images as context for AI.
• multiplayer Real-time multiplayer for tldraw, built with Cloudflare Durable Objects.
• workflow Visual node-based builder for workflows.
To scaffold into the current directory instead of a new folder, pass . as the directory:
$ npm create tldraw@latest .
If the directory already has files in it, you'll be asked whether to keep them, remove them (.git is always kept), or cancel.
Development
Run in development mode with yarn dev from this folder.
You can also run alias create-tldraw=~/<path to this repo>/packages/create-tldraw/scripts/dev.sh, and then use create-tldraw to run the development version of this script.
Adding more templates
Templates are automatically pulled into this tool by /internal/scripts/refresh-create-templates.ts.
This will add a template entry for any workspace in the repo which has a package.json with a tldraw_template key that looks like this:
{
// indicates that this is a template app and should be published:
"tldraw_template": {
// the github repo to publish this template to
"repo": "tldraw/vite-template",
// if `cli` is present, we'll include this template in `npm create tldraw`
"cli": {
// the name of this template, as it appears in the CLI tool
"name": "Vite + tldraw",
// the description of this template as it appears in the CLI tool
"description": "The easiest way to get started with tldraw. Built with Vite, React, and TypeScript.",
// (optional) a shorter description of the template, shown in `--help`
"shortDescription": "The easiest way to get started with tldraw.",
// (optional) where in its category should this template appear? lower numbers appear first
"order": 1,
},
},
}
Documentation
Documentation for the most recent release can be found on tldraw.dev/docs, including reference docs. Our release notes can be found here.
For more agent-friendly docs, see our LLMs.txt.
License
This project is part of the tldraw SDK. It is provided under the tldraw SDK license.
You can use the tldraw SDK in commercial or non-commercial projects so long as you preserve the "Made with tldraw" watermark on the canvas. To remove the watermark, you can purchase a business license. Visit tldraw.dev to learn more.
Trademarks
Copyright (c) 2025-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.
Contribution
Found a bug? Please submit an issue.
Community
Have questions, comments or feedback? Join our discord. For the latest news and release notes, visit tldraw.dev.
Contact
Find us on Twitter/X at @tldraw or email us at hello@tldraw.com.