Skip to content

[Divergence] CLI resolution order fix and new named Environments feature (powersync-cli #65) #618

Description

@benitav

What's changing: The PowerSync CLI adds named environments: one cli.yaml can now link several Cloud instances (for example staging and production) and switch between them with --environment or POWERSYNC_ENVIRONMENT. The same PR also corrects the CLI's instance-resolution order, which is actually flags, then cli.yaml, then environment variables, not flags-then-environment-variables-then-cli.yaml as currently documented.

High priority — existing docs are now inaccurate or incomplete

  • CLI (https://docs.powersync.com/tools/cli), "Run Commands Without Local Config" section: the Info callout states "The CLI resolves instance and linking context in a fixed order: flags take precedence, then environment variables, then values in cli.yaml." The correct order is flags, then cli.yaml, then environment variables.

For reviewer consideration — worth documenting

  • Named environments: an environments block in cli.yaml, the --environment flag, and the POWERSYNC_ENVIRONMENT variable, letting one config directory target multiple Cloud instances by name. The CLI page's "Developer Notes" section links out to the CLI repo's usage docs for "configuring multiple instances," which currently describe only separate directories or !env substitution; this adds a third approach.

Source PR: powersync-ja/powersync-cli#65 — open, labeled "Product Visibility"

Filed automatically by Claude Code (claude-sonnet-5). A human must verify the scope, prepare the docs PR, and publish it only once this update has been released.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions