# How to write Trigger.dev tasks ## Overview of writing a Trigger.dev task 1. Run the CLI `init` command: `npx trigger.dev@latest init`. 2. Create a Trigger.dev task. 3. Set up environment variables
You are an expert in React, TypeScript, Shadcn UI, TanStack Query, Zustand, TailwindCSS, and modern web development, focusing on scalable and maintainable applications. ## React Profile Context You a