### Install Trigger.dev Dependencies Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/manual-setup.mdx Installs the necessary SDK and build packages using various package managers. Ensures the environment is prepared for task development and deployment. ```npm npm add @trigger.dev/sdk@latest npm add --save-dev @trigger.dev/build@latest ``` ```pnpm pnpm add @trigger.dev/sdk@latest pnpm add -D @trigger.dev/build@latest ``` ```yarn yarn add @trigger.dev/sdk@latest yarn add -D @trigger.dev/build@latest ``` ```bun bun add @trigger.dev/sdk@latest bun add -D @trigger.dev/build@latest ``` -------------------------------- ### Start Webapp Component Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/open-source-self-hosting.mdx Run the start script with the 'webapp' argument to initialize the webapp component during a split service setup. ```bash ./start.sh webapp ``` -------------------------------- ### Create a Task Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/manual-setup.mdx Defines a basic task using the Trigger.dev SDK. This example demonstrates a simple 'hello-world' task that accepts a payload and returns a response. ```typescript import { task } from "@trigger.dev/sdk"; export const helloWorld = task({ id: "hello-world", run: async (payload: { name: string }) => { console.log(`Hello ${payload.name}!`); return { message: `Hello ${payload.name}!`, timestamp: new Date().toISOString(), }; }, }); ``` -------------------------------- ### Run Development Server Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/ai-agents/claude-code-trigger.mdx Starts the local Trigger.dev development server to test and iterate on your agent tasks. ```bash npx trigger.dev@latest dev ``` -------------------------------- ### Configure Trigger.dev Build Extensions with Prisma Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/manual-setup.mdx Example of configuring Trigger.dev's build process using extensions, specifically the Prisma extension. This allows for automatic schema migration during deployment. ```typescript import { defineConfig } from "@trigger.dev/sdk"; import { prismaExtension } from "@trigger.dev/build/extensions/prisma"; export default defineConfig({ project: "", build: { extensions: [ prismaExtension({ mode: "legacy", schema: "prisma/schema.prisma", migrate: true, // Run migrations on deploy }), ], }, }); ``` -------------------------------- ### Start Worker Component Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/open-source-self-hosting.mdx Run the start script with the 'worker' argument to initialize the worker component in a split service setup. ```bash ./start.sh worker ``` -------------------------------- ### Start Development Servers Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/frameworks/nango.mdx Launch both the local development server for your application and the Trigger.dev CLI. This setup allows for local testing and debugging of your Trigger.dev tasks. ```bash npm run dev npx trigger.dev@latest dev ``` -------------------------------- ### Initialize Trigger.dev CLI Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/frameworks/supabase-edge-functions-database-webhooks.mdx Use the Trigger.dev CLI to initialize your project. This command adds Trigger.dev, creates a `/trigger` folder, and sets up an example task. Choose 'None' for the example task to create a custom one for this guide. ```bash npx trigger.dev@latest init ``` ```bash pnpm dlx trigger.dev@latest init ``` ```bash yarn dlx trigger.dev@latest init ``` -------------------------------- ### SKILL.md Frontmatter Example Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/patterns/skills.mdx Shows the required YAML frontmatter for a SKILL.md file, including 'name' and 'description'. The description guides the agent on when to use the skill. ```yaml --- name: time-utils description: Compute and format dates/times in arbitrary timezones. Use when the user asks "what time is it", timezone conversions, or date math. --- ``` -------------------------------- ### Trigger.dev Development Workflow Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/manual-setup.mdx Commands to initiate the development server for Trigger.dev tasks, either directly within a package directory or via Turborepo filters. ```bash cd packages/tasks npx trigger.dev@latest dev # Or using turbo turbo run dev:trigger --filter=@repo/tasks ``` -------------------------------- ### Start index Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/realtime/backend/streams.mdx Example demonstrating how to resume reading a stream from a specific chunk index. ```ts import { streams } from "@trigger.dev/sdk"; import { aiStream } from "./trigger/streams"; async function resumeStream(runId: string, lastChunkIndex: number) { // Start reading from the chunk after the last one we received const stream = await aiStream.read(runId, { startIndex: lastChunkIndex + 1, }); for await (const chunk of stream) { console.log("Received chunk:", chunk); } } ``` -------------------------------- ### Database Client Setup Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/testing.mdx Example of setting up a Drizzle database client using `locals` for dependency injection in a test environment. ```ts import { drizzle } from "drizzle-orm/node-postgres"; import { Pool } from "pg"; export type Db = ReturnType; export const dbKey = locals.create("db"); export function getDb(): Db { return locals.get(dbKey) ?? locals.set( dbKey, drizzle(new Pool({ connectionString: process.env.DATABASE_URL })), ); } ``` -------------------------------- ### Install Docker, Docker Compose, and Ngrok on Debian Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/open-source-self-hosting.mdx Installs necessary tools for self-hosting Trigger.dev. Ensure Docker and Docker Compose are installed before proceeding. ```bash # add ngrok repo curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | \ sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && \ echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | \ sudo tee /etc/apt/sources.list.d/ngrok.list # add docker repo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \ sudo chmod a+r /etc/apt/keyrings/docker.asc && \ echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null # update and install sudo apt-get update sudo apt-get install -y \ docker.io \ docker-compose-plugin \ ngrok ``` -------------------------------- ### Implement a customer onboarding workflow Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/migration-n8n.mdx A comprehensive example showing task orchestration, subtask triggering, and waiting logic. ```ts import { task, wait } from "@trigger.dev/sdk"; import { provisionAccount } from "./provision-account"; import { sendWelcomeEmail } from "./send-welcome-email"; export const onboardCustomer = task({ id: "onboard-customer", retry: { maxAttempts: 3, }, run: async (payload: { customerId: string; email: string; plan: "starter" | "pro" | "enterprise"; }) => { // provision their account, throws if the subtask fails await provisionAccount .triggerAndWait({ customerId: payload.customerId, plan: payload.plan, }) .unwrap(); // send welcome email await sendWelcomeEmail .triggerAndWait({ customerId: payload.customerId, email: payload.email, }) .unwrap(); // notify the team await notifySlack(`New customer: ${payload.email} on ${payload.plan}`); // wait 3 days, then check if they've activated await wait.for({ days: 3 }); const activated = await checkActivation(payload.customerId); if (!activated) { await sendActivationNudge(payload.email); } return { customerId: payload.customerId, activated }; }, }); ``` -------------------------------- ### Install Claude Agent SDK Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/ai-agents/claude-code-trigger.mdx Installs the necessary Anthropic Claude Agent SDK package via npm to enable agentic capabilities in your project. ```bash npm install @anthropic-ai/claude-agent-sdk ``` -------------------------------- ### Install Trigger.dev SvelteKit Plugin Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/community/sveltekit.mdx Installs the triggerkit npm package, which is a Vite plugin for SvelteKit to integrate with Trigger.dev. This allows SvelteKit functions to be used directly in Trigger.dev tasks. ```bash npm i triggerkit ``` -------------------------------- ### Run the Development Server Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/README.md Execute this command to start the development server, specifically filtering for the 'docs' package. ```bash pnpm run dev --filter docs ``` -------------------------------- ### Manual MCP Configuration with Arguments Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/mcp-introduction.mdx Demonstrates how to add MCP installation arguments to a manual configuration file. This allows for programmatic control over the installation process. ```json { "args": ["trigger.dev@latest", "mcp", "--dev-only", "--project-ref", "proj_abc123"] } ``` -------------------------------- ### Install Trigger.dev React Hooks Package Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/manual-setup.mdx Installs the necessary package for integrating Trigger.dev's real-time task status monitoring into your React frontend applications. Supports multiple package managers. ```bash # npm npm install @trigger.dev/react-hooks@latest # pnpm pnpm add @trigger.dev/react-hooks@latest # yarn yarn add @trigger.dev/react-hooks@latest # bun bun add @trigger.dev/react-hooks@latest ``` -------------------------------- ### Run Local Development Server Source: https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md Starts the local development server for the 'hello-world' reference project. This registers local tasks with the platform and enables task execution testing. ```sh # in /projects/hello-world pnpm exec trigger dev ``` -------------------------------- ### Test Agent Payload Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/ai-agents/claude-code-trigger.mdx Example JSON payload used to trigger the code-generator task via the Trigger.dev dashboard. ```json { "prompt": "Create a Node.js project with a fibonacci.ts file containing a function to calculate fibonacci numbers, and a fibonacci.test.ts file with tests." } ``` -------------------------------- ### Start Webapp and Verify Source: https://github.com/triggerdotdev/trigger.dev/blob/main/CLAUDE.md Run the webapp in the background from the repository root. Use curl to verify it's running. ```bash # Run from repo root with run_in_background: true pnpm run dev --filter webapp curl -s http://localhost:3030/healthcheck # Verify running ``` -------------------------------- ### Copy Environment File Source: https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md Copy the example environment file to create your own .env file for local configuration. ```bash cp .env.example .env ``` -------------------------------- ### Initialize and Run Emails Development Server Source: https://github.com/triggerdotdev/trigger.dev/blob/main/internal-packages/emails/README.md Commands to install project-specific dependencies and start the local development server for the emails module. These commands require pnpm and are scoped to the emails package within the monorepo. ```sh pnpm install --filter emails ``` ```sh pnpm run dev --filter emails ``` -------------------------------- ### Example Skill Folder Layout Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/patterns/skills.mdx Illustrates the conventional directory structure for an agent skill, including the required SKILL.md file and optional scripts, references, and assets. ```bash trigger/skills/time-utils/ ├── SKILL.md # Required — frontmatter + instructions ├── scripts/ │ ├── now.sh │ └── add.sh ├── references/ │ └── timezones.txt └── assets/ # Optional — templates, data files, etc. ``` -------------------------------- ### Install Zed MCP Client Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/mcp-introduction.mdx Install the MCP client for Zed using the command line. Alternatively, add the provided JSON configuration to your settings file. Zed uses 'context_servers' for configuration. ```bash npx trigger.dev@latest install-mcp --client zed ``` ```json { "context_servers": { "trigger": { "source": "custom", "command": "npx", "args": ["trigger.dev@latest", "mcp"] } } } ``` -------------------------------- ### Install Trigger.dev SDK and Build Packages Source: https://github.com/triggerdotdev/trigger.dev/blob/main/packages/cli-v3/skills/trigger-getting-started/SKILL.md Installs the runtime dependency @trigger.dev/sdk and the dev dependency @trigger.dev/build. Ensure both are pinned to the same version as the CLI. ```bash npm add @trigger.dev/sdk@latest ``` ```bash npm add --save-dev @trigger.dev/build@latest ``` -------------------------------- ### Run Documentation Site Locally Source: https://github.com/triggerdotdev/trigger.dev/blob/main/AGENTS.md Builds and serves the documentation site locally. This is useful for previewing documentation changes. ```bash pnpm run dev --filter docs ``` -------------------------------- ### Example hydrateMessages consumer Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/upgrade-guide.mdx An example of how `hydrateMessages` consumers might process `incomingMessages`, which now consistently has a length of 0 or 1. ```typescript hydrateMessages: async ({ incomingMessages }) => { for (const msg of incomingMessages) { // 0-or-1 iterations for (const r of chat.history.extractNewToolResults(msg)) { await auditLog.record({ id: r.toolCallId, output: r.output }); } } return await db.getMessages(chatId); } ``` -------------------------------- ### Install and Run Trigger.dev CLI Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/migration-mergent.mdx Installs the Trigger.dev CLI and starts the local development server. This allows for local testing and debugging of tasks, mirroring production behavior. ```bash npx trigger.dev@latest init npx trigger.dev@latest dev ``` -------------------------------- ### Run Development Servers Source: https://github.com/triggerdotdev/trigger.dev/blob/main/CLAUDE.md Starts the webapp development server or watches the CLI and packages for changes. Use the webapp command for frontend development and the other for backend/SDK development. ```bash pnpm run dev --filter webapp ``` ```bash pnpm run dev --filter trigger.dev --filter "@trigger.dev/*" ``` -------------------------------- ### Start Local Services with Docker Source: https://github.com/triggerdotdev/trigger.dev/blob/main/AGENTS.md Starts the local development services using Docker Compose. Add ':full' for optional observability and chaos tooling. ```bash pnpm run docker ``` ```bash pnpm run docker:full ``` -------------------------------- ### Launch Development Server Source: https://github.com/triggerdotdev/trigger.dev/blob/main/AGENTS.md Starts the development server for the webapp. The webapp will be accessible at http://localhost:3030. ```bash pnpm run dev --filter webapp ``` -------------------------------- ### Run Trigger Webapp Locally Source: https://github.com/triggerdotdev/trigger.dev/blob/main/apps/webapp/README.md Use these commands to start the web application in development mode. Ensure you have pnpm installed. ```sh pnpm run dev --filter webapp ``` -------------------------------- ### AI Setup Prompt for Trigger.dev Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/quick-start.mdx A comprehensive prompt for AI coding assistants to automate the installation and configuration of Trigger.dev in a project. ```text Help me add Trigger.dev to this project. ## What to do 1. I need a Trigger.dev account. If I don't have one, point me to https://cloud.trigger.dev to sign up. Wait for me to confirm. 2. Run `npx trigger.dev@latest init` in the project root. - When it asks about the MCP server, recommend I install it (best DX: gives you direct access to Trigger.dev docs, deploys, and run monitoring). - Install the "Hello World" example task when prompted. 3. Run `npx trigger.dev@latest dev` to start the dev server. 4. Once the dev server is running, test the example task from the Trigger.dev dashboard. 5. Set TRIGGER_SECRET_KEY in my .env file (or .env.local for Next.js). I can find it on the API Keys page in the dashboard. 6. Ask me what framework I'm using and show me how to trigger the task from my backend code. If I've already run init and want the MCP server, run: npx trigger.dev@latest install-mcp ## Critical rules - ALWAYS import from `@trigger.dev/sdk`. NEVER import from `@trigger.dev/sdk/v3`. - NEVER use `client.defineJob()` — that's the deprecated v2 API. - Use type-only imports when triggering from backend code to avoid bundling task code: import type { myTask } from "./trigger/example"; import { tasks } from "@trigger.dev/sdk"; const handle = await tasks.trigger("hello-world", { message: "Hello from my app!" }); ## When done, point me to - Writing tasks: https://trigger.dev/docs/tasks/overview - Real-time updates: https://trigger.dev/docs/realtime/overview - AI tooling: https://trigger.dev/docs/building-with-ai ``` -------------------------------- ### Hydrating transport with persisted session Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/upgrade-guide.mdx Example of hydrating the `useTriggerChatTransport` with a persisted session. ```tsx const transport = useTriggerChatTransport({ // ... sessions: persistedSession ? { [chatId]: persistedSession } : {}, }); ``` -------------------------------- ### Navigate to Database Package Source: https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md Change directory to the database package to perform migration tasks. ```sh cd internal-packages/database ``` -------------------------------- ### Install Dependencies with pnpm Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/README.md Use this command to install all necessary project dependencies. ```bash pnpm install ``` -------------------------------- ### Get the worker token from the webapp logs Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/self-hosting/kubernetes.mdx Command to retrieve the worker token from the Trigger.dev webapp logs for manual setup. ```bash kubectl logs deployment/trigger-webapp -n trigger | grep -A15 "Worker Token" ``` -------------------------------- ### Install Required Packages Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/frameworks/nango.mdx Install the Nango and Anthropic SDKs using npm. These are necessary for authentication and AI summarization, respectively. ```bash npm install @nangohq/node @anthropic-ai/sdk ``` -------------------------------- ### Before: onChatStart with continuation check Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/upgrade-guide.mdx Example of `onChatStart` before the change, showing the now-unnecessary `continuation` check. ```ts onChatStart: async ({ continuation, chatId, clientData }) => { if (continuation) return; // ❌ no longer needed — fires only on first message ever await db.chat.create({ /* ... */ }); } ``` -------------------------------- ### Before: chat.local initialization in onChatStart Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/upgrade-guide.mdx Example of `chat.local` state initialization in `onChatStart`, which will fail on continuation runs. ```ts const userContext = chat.local<{ name: string; plan: string }>({ id: "userContext" }); onChatStart: async ({ clientData }) => { const user = await db.user.findUnique({ where: { id: clientData.userId } }); userContext.init({ name: user.name, plan: user.plan }); // ❌ never runs on continuation } ``` -------------------------------- ### Run Next.js Development Server Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/frameworks/nextjs.mdx Commands to start the Next.js development server using different package managers. ```bash npm run dev ``` ```bash pnpm run dev ``` ```bash yarn dev ``` -------------------------------- ### Monorepo Workspace Configuration (pnpm-workspace.yaml) Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/manual-setup.mdx Defines the workspace structure for a pnpm-based monorepo. Specifies the directories where packages are located. ```yaml packages: - "apps/*" - "packages/*" ``` -------------------------------- ### After: onChatStart without continuation check Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/upgrade-guide.mdx Example of `onChatStart` after the change, demonstrating that the `continuation` check is no longer needed. ```ts onChatStart: async ({ chatId, clientData }) => { await db.chat.create({ /* ... */ }); // ✅ guaranteed first-message-of-chat } ``` -------------------------------- ### Install Windsurf MCP Client Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/mcp-introduction.mdx Install the MCP client for Windsurf using the command line. Alternatively, add the provided JSON configuration to your user or project settings file. ```bash npx trigger.dev@latest install-mcp --client windsurf ``` ```json { "mcpServers": { "trigger": { "command": "npx", "args": ["trigger.dev@latest", "mcp"] } } } ``` -------------------------------- ### Start Full Docker Stack Source: https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md Start the complete Docker stack, including the observability stack (Prometheus, Grafana, OTEL collector) and other optional tooling. Refer to `docker/docker-compose.extras.yml` for a full list. ```bash pnpm run docker:full ``` -------------------------------- ### Transport clientData option Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/upgrade-guide.mdx Example of using the `clientData` option in `useTriggerChatTransport` to pass typed payload metadata. ```tsx const transport = useTriggerChatTransport({ task: "my-chat", accessToken: ({ chatId }) => mintChatAccessToken(chatId), startSession: ({ chatId, clientData }) => startChatSession({ chatId, clientData }), clientData: { userId: currentUser.id, plan: currentUser.plan, }, }); ``` -------------------------------- ### Install AMP MCP Client Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/mcp-introduction.mdx Install the MCP client for AMP using the command line. Alternatively, add the provided JSON configuration to your settings file. AMP uses 'amp.mcpServers' for configuration. ```bash npx trigger.dev@latest install-mcp --client amp ``` ```json { "amp.mcpServers": { "trigger": { "command": "npx", "args": ["trigger.dev@latest", "mcp"] } } } ``` -------------------------------- ### Start and Open a Raw Session for Bi-directional I/O Source: https://github.com/triggerdotdev/trigger.dev/blob/main/packages/trigger-sdk/skills/trigger-chat-agent-advanced/SKILL.md Use `sessions.start` to initiate a durable, task-bound I/O channel. `sessions.open` provides access to the session's input and output streams for direct communication, suitable for non-chat scenarios like agent inboxes or server-to-server pipelines. ```typescript import { sessions } from "@trigger.dev/sdk"; const { id, publicAccessToken } = await sessions.start({ type: "chat.agent", externalId: chatId, taskIdentifier: "my-chat", triggerConfig: { tags: [`chat:${chatId}`], basePayload: { chatId, trigger: "preload" } }, }); const session = sessions.open(chatId); // no network call; methods are lazy await session.out.append({ kind: "message", text: "hello" }); const next = await session.in.once({ timeoutMs: 30_000 }); ``` -------------------------------- ### After: chat.local initialization in onBoot Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/ai-chat/upgrade-guide.mdx Example of `chat.local` state initialization moved to `onBoot`, ensuring it runs on every fresh worker. ```ts const userContext = chat.local<{ name: string; plan: string }>({ id: "userContext" }); onBoot: async ({ clientData }) => { const user = await db.user.findUnique({ where: { id: clientData.userId } }); userContext.init({ name: user.name, plan: user.plan }); // ✅ runs on every fresh worker } ``` -------------------------------- ### Run list-profiles command with npm Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/cli-list-profiles-commands.mdx Execute the `list-profiles` command using npm. Ensure you have Node.js and npm installed. ```bash npx trigger.dev@latest list-profiles ``` -------------------------------- ### Run Trigger.dev CLI Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/manual-setup.mdx Commands to execute the Trigger.dev CLI for development tasks. Can be run via temporary execution or added as project scripts. ```bash # Using npx/dlx npx trigger.dev@latest dev pnpm dlx trigger.dev@latest dev yarn dlx trigger.dev@latest dev # Adding to package.json scripts "scripts": { "dev:trigger": "trigger dev", "deploy:trigger": "trigger deploy" } ``` -------------------------------- ### Set Anthropic API Key Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/ai-agents/claude-code-trigger.mdx Configures the required environment variable for the Claude Agent SDK to authenticate with Anthropic services. ```bash ANTHROPIC_API_KEY=sk-ant-... ``` -------------------------------- ### Grant Registry Access for Production Runs (Single Server) Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/open-source-self-hosting.mdx If your production runs fail to start on a single server setup, use this command to grant the `docker-provider` access to your container registry. ```bash # single server? run this: docker exec -ti trigger-docker-provider-1 docker login -u docker.io ``` -------------------------------- ### Install Cursor MCP Client Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/mcp-introduction.mdx Install the MCP client for Cursor using the command line. Alternatively, add the provided JSON configuration to your user or project settings file. ```bash npx trigger.dev@latest install-mcp --client cursor ``` ```json { "mcpServers": { "trigger": { "command": "npx", "args": ["trigger.dev@latest", "mcp"] } } } ``` -------------------------------- ### Initialize Trigger.dev Project Source: https://github.com/triggerdotdev/trigger.dev/blob/main/packages/cli-v3/skills/trigger-getting-started/SKILL.md Run this command to bootstrap Trigger.dev into your project. It automates the installation of the SDK, creation of configuration files, and scaffolding of initial tasks. ```bash npx trigger.dev@latest init ``` -------------------------------- ### Install Nango Frontend SDK Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/guides/frameworks/nango.mdx Install the Nango frontend SDK using npm. This package is required for initiating the OAuth flow from your frontend application. ```bash npm install @nangohq/frontend ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/triggerdotdev/trigger.dev/blob/main/docs/manual-setup.mdx Sets the required secret key and optional API URL for local development. These variables authenticate the application with the Trigger.dev backend. ```bash TRIGGER_SECRET_KEY=tr_dev_xxxxxxxxxx TRIGGER_API_URL=https://your-trigger-instance.com ```