Skip to content

api: positionals and environment variables in cli.json (part of #13178) - #13433

Merged
TrapsterDK merged 1 commit into
mainfrom
api-cli-env-positionals
Nov 18, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
api-cli-env-positionals

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Part of #13178.

  • help_surface() (cli/plan/src/args/pages.rs) now lists each command's visible positionals: value name, whether it is required, whether it takes more than one word, values and defaults.
  • help_environment() lists the variables dx --help documents. These are the DX_ flag defaults plus NO_COLOR, BUILD_WORKSPACE_DIRECTORY and BUILD_WORKING_DIRECTORY, and they come from the same table (help::OTHER_ENV) the top help renders. A test checks that every entry appears in the top help.
  • tools/api/snapshot.rs writes both to api/cli.json.

Tests (local):

No nested-Bazel or consumer tests were run.

Still to do for #13178:

  1. A spike on whether starlark_doc_extract resolves upstream repos. It needs bzl_library targets first.
  2. api/starlark.json.
  3. api/labels.txt.
  4. Retiring the help goldens in favour of cli.json.
  5. Fixing the schema version drift (api: api_test red on main, dx.schema.json changed without a schema version bump #13432).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K

- help_surface() lists each command's visible positionals (value name,
  required, multiple, values, defaults).
- help_environment() lists the variables dx --help documents: the DX_
  flag defaults and NO_COLOR, BUILD_WORKSPACE_DIRECTORY,
  BUILD_WORKING_DIRECTORY, from the same table the top help renders.
- api/cli.json records both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
@TrapsterDK
TrapsterDK merged commit 377ee12 into main Nov 18, 2026
2 checks passed
@TrapsterDK
TrapsterDK deleted the api-cli-env-positionals branch November 18, 2026 10:46
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.

1 participant