Files
upstream-tldraw/packages/create-tldraw/README.md
upstream-mirror a774ac673a
Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled
snapshot of https://github.com/tldraw/tldraw.git (main, 2026-09-23; blobs > 131072B omitted)
2026-09-23 16:12:52 +05:00

95 lines
3.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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:
```jsonc
{
// 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](https://tldraw.dev/docs), including [reference docs](https://tldraw.dev/reference/editor/Editor). Our release notes can be found [here](https://tldraw.dev/releases).
For more agent-friendly docs, see our [LLMs.txt](https://tldraw.dev/llms.txt).
## License
This project is part of the tldraw SDK. It is provided under the [tldraw SDK license](https://github.com/tldraw/tldraw/blob/main/LICENSE.md).
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](https://tldraw.dev/pricing). Visit [tldraw.dev](https://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](https://github.com/tldraw/tldraw/blob/main/TRADEMARKS.md) for info on acceptable usage.
## Contribution
Found a bug? Please [submit an issue](https://github.com/tldraw/tldraw/issues/new).
## Community
Have questions, comments or feedback? [Join our discord](https://discord.gg/rhsyWMUJxd). For the latest news and release notes, visit [tldraw.dev](https://tldraw.dev).
## Contact
Find us on Twitter/X at [@tldraw](https://twitter.com/tldraw) or email us at [hello@tldraw.com](mailto:hello@tldraw.com).