Run this command in the root of your project:
npx trigger.dev@latest initpnpm dlx trigger.dev@latest inityarn dlx trigger.dev@latest initYou'll be asked to choose how to initialize:
- Trigger.dev MCP Installs our MCP server into your AI coding tools (Claude Code, Cursor, etc.), then lets your AI assistant set up the project for you.
- CLI — Continue with the traditional CLI setup.
The Trigger.dev MCP lets AI assistants search docs, create and manage projects, trigger and deploy tasks, and monitor runs across environments, we recommend using it for the best developer experience.
If you choose CLI, it will:
- Log you into the CLI if you're not already logged in.
- Create a
trigger.config.tsfile in the root of your project. - Ask where you'd like to create the
/triggerdirectory. - Create the
/triggerdirectory with an example task,/trigger/example.[ts/js].
Install the "Hello World" example task when prompted. We'll use this task to test the setup.