Generate the CLI command reference from zapier-sdk --help#11
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/scripts/generate-cli-reference.mjs, which shellszapier-sdk --help(default +--experimental) and captures each command's own--helpverbatim.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.@zapier/zapier-sdk-cli@0.65.5as a devDependency and addsnpm run generate:cli-referenceso bumps regenerate the reference deterministically.references/cli.mdat the new companion file for the full inventory.Why now
The existing
references/cli.mdcovers ~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--experimentaltrigger 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:
The Renovate bump PR's diff on
cli-commands.mdthen doubles as the CLI release notes.Test plan
npm install && npm run generate:cli-referenceruns clean on Node 20.--helpblocks per command.validate.ymlCI still green (no changes to gated paths).