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:
npx trigger.dev@latest initpnpm dlx trigger.dev@latest inityarn dlx trigger.dev@latest initIt will do a few things:
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.- Ask if you want to install the Trigger.dev MCP server for your AI assistant.
- Log you into the CLI if you're not already logged in.
- Ask you to select your project.
- Install the required SDK packages.
- Ask where you'd like to create the
/triggerdirectory and create it with an example task. - Create a
trigger.config.tsfile in the root of your project.
Install the "Hello World" example task when prompted. We'll use this task to test the setup.