You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apify run reads local values only from environmentVariables in actor.json. .env is the format the rest of the industry uses, and it becomes the recommended place for local env vars.
Scope
Read .env from the Actor directory (next to .actor/) when it exists, and add its values to the run environment (src/commands/run.ts).
Parse it with Node's built-in util.parseEnv. The CLI requires Node.js 22, so no new dependency is needed.
Apply this precedence, lowest to highest: shell environment, variables the CLI sets for the run, environmentVariables from actor.json, .env. Only the last step is new.
Treat values as literal. @secret references aren't resolved in .env.
Out of scope
The deprecation warning for environmentVariables. It has its own issue.
Done when
Tests cover the precedence order and a run without .env.
Activity