9e08712749
Closes #<issue> ## ✅ Checklist - [ ] I have followed every step in the [contributing guide](https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md) - [ ] The PR title follows the convention. - [ ] I ran and tested the code works --- ## Testing _[Describe the steps you took to test this change]_ --- ## Changelog _[Short description of what has changed]_ --- ## Screenshots _[Screenshots]_ 💯 <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/triggerdotdev/trigger.dev/pull/2962"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
<Step title="Run the CLI `init` command">
|
|
|
|
The easiest way to get started is to use the CLI. It will add Trigger.dev to your existing project, create a `/trigger` folder and give you an example task.
|
|
|
|
Run this command in the root of your project to get started:
|
|
|
|
<CodeGroup>
|
|
|
|
```bash npm
|
|
npx trigger.dev@latest init
|
|
```
|
|
|
|
```bash pnpm
|
|
pnpm dlx trigger.dev@latest init
|
|
```
|
|
|
|
```bash yarn
|
|
yarn dlx trigger.dev@latest init
|
|
```
|
|
|
|
</CodeGroup>
|
|
|
|
|
|
It will do a few things:
|
|
|
|
<Tip title="MCP Server">
|
|
Our [Trigger.dev MCP server](/mcp-introduction) gives your AI assistant direct access to Trigger.dev tools; search docs, trigger tasks, deploy projects, and monitor runs. We recommend installing it for the best developer experience.
|
|
</Tip>
|
|
|
|
1. Ask if you want to install the [Trigger.dev MCP server](/mcp-introduction) for your AI assistant.
|
|
2. Log you into the CLI if you're not already logged in.
|
|
3. Ask you to select your project.
|
|
4. Install the required SDK packages.
|
|
5. Ask where you'd like to create the `/trigger` directory and create it with an example task.
|
|
6. Create a `trigger.config.ts` file in the root of your project.
|
|
|
|
Install the "Hello World" example task when prompted. We'll use this task to test the setup.
|
|
|
|
</Step>
|