Skip to content

Commit 25e4248

Browse files
committed
env variables loading order
1 parent 1ccb8c1 commit 25e4248

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/deploy-environment-variables.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ You can edit an environment variable's values. You cannot edit the key name, you
6666

6767
</Steps>
6868

69+
## Local development
70+
71+
When running `npx trigger.dev dev`, the CLI automatically loads environment variables from these files in order (later files override any duplicate keys from earlier ones):
72+
73+
- `.env`
74+
- `.env.development`
75+
- `.env.local`
76+
- `.env.development.local`
77+
- `dev.vars`
78+
79+
These variables are available to your tasks via `process.env`. You don't need to use the `--env-file` flag for this automatic loading.
80+
6981
## In your code
7082

7183
You can use our SDK to get and manipulate environment variables. You can also easily sync environment variables from another service into Trigger.dev.

0 commit comments

Comments
 (0)