Skip to content

Add the apify env namespace and apify env ls #1570

Open

Description

@DaveHanns

No command shows the env vars of an Actor version on the platform. This issue adds the apify env namespace, the targeting rules that every apify env command shares, and the first command.

Scope

  • Add the env namespace (src/commands/env/_index.ts), register it in src/commands/_register.ts, and add it to the docs categories in scripts/generate-cli-docs.ts.
  • Add a targeting helper that all apify env commands use:
    • Actor: read it from .actor/actor.json in the current directory. --dir <path> picks an Actor folder in a monorepo. --actor <ID or username/name> targets an Actor without a local project.
    • Version: use --version, then version from actor.json, then 0.0. This is the order apify push uses.
  • Make apify env ls print a table with the name, the type (secret or plain), and the value of plain variables. Never print a secret value.
  • Support --json.

Done when

  • The command works for CLI-pushed and Git-sourced Actors.
  • It fails with a clear message when the Actor or the version doesn't exist.

Activity

  1. added theissue type on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-buildersIssues owned by the Builders team.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions