mirror of
https://github.com/triggerdotdev/skills.git
synced 2026-09-19 02:35:32 +08:00
719099668b
Rename all skills to avoid clashes with other skill providers: - setup → trigger-setup - tasks → trigger-tasks - config → trigger-config - agents → trigger-agents - realtime → trigger-realtime Updates folder names, SKILL.md name fields, README, and AGENTS.md.
1.9 KiB
1.9 KiB
Environment Setup
Required Variables
| Variable | Description | Where to find |
|---|---|---|
TRIGGER_SECRET_KEY |
API key for authentication | Dashboard > API Keys |
Development vs Production Keys
# Development (starts with tr_dev_)
TRIGGER_SECRET_KEY=tr_dev_xxxxx
# Production (starts with tr_prod_)
TRIGGER_SECRET_KEY=tr_prod_xxxxx
Local Development
Option 1: .env File
# .env
TRIGGER_SECRET_KEY=tr_dev_xxxxx
Add to .gitignore:
.env
.env.local
Option 2: Shell Export
export TRIGGER_SECRET_KEY=tr_dev_xxxxx
npx trigger dev
CI/CD Deployment
GitHub Actions
- name: Deploy Trigger.dev
env:
TRIGGER_SECRET_KEY: ${{ secrets.TRIGGER_SECRET_KEY }}
run: npx trigger deploy
Vercel
Add TRIGGER_SECRET_KEY in Project Settings > Environment Variables.
Other Platforms
Set TRIGGER_SECRET_KEY in your platform's secret management.
Multi-Environment Setup
Use different keys per environment:
| Environment | Key Prefix | Dashboard Section |
|---|---|---|
| Development | tr_dev_ |
Dev environment |
| Staging | tr_stg_ |
Staging environment |
| Production | tr_prod_ |
Prod environment |
Task Environment Variables
Tasks run in Trigger.dev's infrastructure. To use env vars in tasks:
- Sync from local (using
syncEnvVarsextension):
// trigger.config.ts
import { defineConfig } from "@trigger.dev/sdk";
import { syncEnvVars } from "@trigger.dev/build/extensions/core";
export default defineConfig({
project: "proj_xxxxx",
build: {
extensions: [
syncEnvVars(),
],
},
});
-
Set in dashboard: Project Settings > Environment Variables
-
Access in tasks:
export const myTask = task({
id: "my-task",
run: async () => {
const apiKey = process.env.EXTERNAL_API_KEY;
// ...
},
});