Skip to content

docs: describe the new env var model for Actors - #3258

Draft
DaveHanns wants to merge 2 commits into
masterfrom
docs/env-vars-model
Draft

DaveHanns wants to merge 2 commits into
masterfrom
docs/env-vars-model

Conversation

@DaveHanns

Copy link
Copy Markdown
Contributor

Summary

The environment variables page says that actor.json overrides Console values on push, and that the only way out is to delete the key. Both stop being true once apify push stops uploading env vars (apify/apify-cli#1575) and the CLI deprecates environmentVariables (apify/apify-cli#1577). This PR describes the new model: the Actor version is the source of truth on the platform, .env is for local runs, and the apify env commands and MCP tools manage the variables.

Changes

  • environment_variables.md: removed the override guidance and the "Define in actor.json" section. Added sections on Apify Console, the apify env commands, the MCP server env-vars tools, local .env files, and moving from environmentVariables.
  • The secrets and build-time sections now cover --secret, write-only values, applyEnvVarsToBuild, and --apply-env-vars-to-build.
  • One Console label everywhere: Source > Code > Environment variables.
  • actor_json.md: environmentVariables is marked deprecated, the @secret example is removed, and the table gets an applyEnvVarsToBuild row.
  • The frontmatter description now fits the repo's 140 to 160 character range.

Tests

  • markdownlint passes on both changed files.
  • Vale, spell check, and link checks run in CI.
  • No [api] tests apply to this change. Those run only in CI.

Notes for reviewers

Closes #3217

🤖 Generated with Claude Code

Describe the version fallback and --dir targeting, empty-value handling
in apify env push and pull, that the MCP tools parameter replaces the
default selection, what apify env migrate does to actor.json, and the
MCP way to mark a variable secret.
@apify-service-account

apify-service-account commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

❌ Preview build for this PR (commit 650dc0d) failed. See action run for details.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the platform docs for the new env var model

2 participants