Skip to content

Generate the CLI command reference from zapier-sdk --help#11

Merged
BenMcGit merged 1 commit into
mainfrom
chore/generate-cli-reference
Jul 8, 2026
Merged

Generate the CLI command reference from zapier-sdk --help#11
BenMcGit merged 1 commit into
mainfrom
chore/generate-cli-reference

Conversation

@BenMcGit

@BenMcGit BenMcGit commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/scripts/generate-cli-reference.mjs, which shells zapier-sdk --help (default + --experimental) and captures each command's own --help verbatim.
  • Regenerates the output to a new file, skills/zapier-sdk/references/cli-commands.md — a compact inventory grouped by category plus per-command detail for all 78 commands across 11 categories, including the experimental Code Workflows and trigger-inbox surfaces the hand-written happy-path guide doesn't cover.
  • Pins @zapier/zapier-sdk-cli@0.65.5 as a devDependency and adds npm run generate:cli-reference so bumps regenerate the reference deterministically.
  • Points references/cli.md at the new companion file for the full inventory.

Why now

The existing references/cli.md covers ~20 of the CLI's 78 commands — the happy-path subset. Agents loading the skill routinely guess flag names or reinvent discovery flows that already exist as first-class commands (e.g. find-first-connection, get-action, the --experimental trigger surface). A generated companion keeps every command in the skill's read radius without duplicating detailed schemas that already live at docs.zapier.com/sdk/cli-reference.

The generated header records the CLI version, so the checked-in file always declares which release it corresponds to — humans and agents can both see the version without running anything, and drift is trivial to spot on review.

Regeneration flow

Not on any CI job. Renovate opens the version-bump PR; on that PR:

npm install
npm run generate:cli-reference
git add skills/zapier-sdk/references/cli-commands.md package.json package-lock.json

The Renovate bump PR's diff on cli-commands.md then doubles as the CLI release notes.

Test plan

  • npm install && npm run generate:cli-reference runs clean on Node 20.
  • Generated file spot-checked: category order, experimental flagging on Code Workflows / experimental trigger commands, verbatim --help blocks per command.
  • Existing validate.yml CI still green (no changes to gated paths).

Add `.github/scripts/generate-cli-reference.mjs` and pin `@zapier/zapier-sdk-cli` as a devDependency. Running `npm run generate:cli-reference` regenerates `skills/zapier-sdk/references/cli-commands.md` — a compact inventory grouped by category plus verbatim per-command `--help` output for all 78 commands (including the experimental Code Workflows and trigger-inbox surfaces).

The generated file's header records the CLI version, so the checked-in copy always reflects the currently pinned release. Not on any CI job; regenerated manually alongside a version bump, so Renovate's bump PR carries the reference diff as its release notes.
@BenMcGit
BenMcGit merged commit d4628f1 into main Jul 8, 2026
2 checks passed
@BenMcGit
BenMcGit deleted the chore/generate-cli-reference branch July 8, 2026 23:43
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