Skip to content

Add apify env migrate #1576

Open

Description

@DaveHanns

One command that moves a project from environmentVariables and @secret references to .env.

Scope

  • Move environmentVariables from actor.json into .env in the Actor directory.
  • Resolve @secret references from ~/.apify/secrets.json. Stop on a missing secret and list the missing names. With --allow-missing-secrets, write those keys empty.
  • Let keys that are already in .env win, and report the conflicts.
  • Add .env to .gitignore, and remove the environmentVariables block from actor.json with jju, so formatting and comments survive.
  • Print the next step: apify env push sets the values on the platform.
  • Support --dir for monorepos and --yes.

Done when

  • Tests cover plain values, @secret references, missing secrets, and an existing .env.

Depends on

Activity

  1. added theissue type on Nov 11, 2026
  2. added
    t-builders
    on Nov 11, 2026
  3. self-assigned this
    on Nov 22, 2026
  4. linked a pull request that will close this issuefeat(env): add `apify env migrate` #1630on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

t-builders

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions