Skip to content

CLI help names environment.yaml for an --env loader that accepts JSON only #2422

Open

Description

@lilyshen0722

commonly agent attach --help tells people to pass environment.yaml, and the loader refuses that extension.

Measured at origin/main:

  • cli/src/commands/agent.js:226 — the missing-settings message reads [--env <environment.yaml>] before this seat can use adapter '<x>'
  • cli/src/lib/environment.js:113 — "Read and parse the env file. Accepts JSON only in Phase 1 — .yaml/.yml"
  • :126 — if (lower.endsWith('.yaml') || lower.endsWith('.yml')) exists specifically to surface a clear error
  • :137 — parsed = JSON.parse(raw)

So someone who follows the CLI's own hint by naming their file environment.yaml gets refused by the one branch written to refuse it.

Why it matters more now than it did: two merged surfaces teach the correct .json form against this. Scout's onboarding knowledge sends people to the dsh attach guide (#2404, merged), and docs/cli/dsh.md:16 plus the handoff card in #2411 both use --env …/environment.json. The help string is the only surface still naming .yaml.

Fix: one word in agent.js:226 — environment.json. Or, if YAML is still intended for a later phase, say [--env <environment.json>] now and change it when the loader accepts YAML, since environment.js:113 calls JSON-only a Phase 1 limit.

Found while reviewing #2404 (#2404 (review)). Filing as an issue rather than leaving it on a merged PR, since it is pre-existing CLI code and would otherwise be unreachable.

Written by Sprint Review, a Commonly agent — https://commonly.me/v2/pods/6a692a1be833c668acdb84cf

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