fix(plugin-cli): normalise multi-word flags to kebab-case#1091
Conversation
The 'publish' subcommand uses kebab-case for multi-word flags
('--author-name', '--no-manifest', ...) while 'build', 'dev', and
'bundle' use camelCase ('--outDir', '--validateOnly'). Standardise on
kebab-case across all subcommands.
- --outDir -> --out-dir
- --validateOnly -> --validate-only
The programmatic API options on bundlePlugin / buildPlugin remain
camelCase (they are JS function options, not CLI flags).
🦋 Changeset detectedLatest commit: 3c8c895 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-perf-coordinator | 3c8c895 | May 18 2026, 02:45 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-i18n | 3c8c895 | May 18 2026, 02:46 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 3c8c895 | May 18 2026, 02:46 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 3c8c895 | May 18 2026, 02:47 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 3c8c895 | May 18 2026, 02:48 PM |
There was a problem hiding this comment.
Pull request overview
This PR updates @emdash-cms/plugin-cli command-line flag spelling so multi-word flags use kebab-case while keeping programmatic API option names camelCase.
Changes:
- Renames
build,dev, andbundleCLI option definitions from camelCase to kebab-case. - Updates command handlers to read the new citty argument keys.
- Adds a changeset and adjusts a test comment to reference
--out-dir.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.changeset/plugin-cli-kebab-flags.md |
Documents the CLI flag rename for release notes. |
packages/plugin-cli/src/build/command.ts |
Changes build output flag to --out-dir. |
packages/plugin-cli/src/dev/command.ts |
Changes dev output flag handling and watcher comments to --out-dir. |
packages/plugin-cli/src/bundle/command.ts |
Changes bundle flags to --out-dir and --validate-only. |
packages/plugin-cli/tests/bundle.test.ts |
Updates a comment mentioning the output flag spelling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * concurrent runs don't collide, and so `--out-dir` resolution works as | ||
| * advertised (it can be either absolute or relative to `dir`). |
- Manifest profile prose lists author and security contact as required, matching the table and the actual ManifestSchema (.refine() rules in packages/plugin-cli/src/manifest/schema.ts require one of author/ authors and one of security/securityContacts). - Publishing prerequisites match the same required-fields story. - Bundle flag documentation uses kebab-case (--out-dir, --validate-only) to match the post-rename CLI (#1091). - your-first-plugin scaffolding example bumps emdash to >=0.13.0 (the first release exposing the emdash/plugin entrypoint) and pins @emdash-cms/plugin-cli to 0.2.0 (exact pin per the publishing page's experimental-registry guidance).
* docs(plugins): document the plugin CLI, manifest, and authoring-shape changes (#1040, #1057) Adds migration guides for site operators and plugin authors, new reference pages for emdash-plugin.jsonc and the emdash-plugin CLI, and rewrites the sandboxed-plugin guides to the new default-export shape. Migration guides follow Astro's breaking-changes format; Atmosphere account terminology used throughout. * docs(plugins): apply definition-by-negation / builder-salience standard Self-review of #1059 against the standards formalized since it was written. Removed definition-by-negation and bundle-internal framing from the guide pages (migration guides left as-is — comparison/changelog is their purpose): - 'You do not write a descriptor or a build script' -> dropped (the positive sentence already says what build does) - 'the build produces both, so you never hand-write either' -> 'generates both' - 'type-only, so the emdash runtime does not enter the plugin bundle' / 'the bundler erases them — no emdash runtime enters' -> 'provides only types, so a sandboxed plugin has no runtime dependency on emdash' - 'you never write it by hand' -> 'EmDash derives ... automatically' - 'init never requires extra flags to succeed' -> 'A slug is the only required input' - 'wire-side filename' -> '(the filename the registry expects)' - 'The registry never stores your plugin's code' lead -> dropped; the positive 'you host the tarball; registry stores a link' carries it Tropes scan clean; em-dashes appositive; bold bullets definitional. * docs(plugins): address review feedback on #1059 - Manifest profile prose lists author and security contact as required, matching the table and the actual ManifestSchema (.refine() rules in packages/plugin-cli/src/manifest/schema.ts require one of author/ authors and one of security/securityContacts). - Publishing prerequisites match the same required-fields story. - Bundle flag documentation uses kebab-case (--out-dir, --validate-only) to match the post-rename CLI (#1091). - your-first-plugin scaffolding example bumps emdash to >=0.13.0 (the first release exposing the emdash/plugin entrypoint) and pins @emdash-cms/plugin-cli to 0.2.0 (exact pin per the publishing page's experimental-registry guidance). * docs(plugins): address second round of review feedback on #1059 - api-routes: clarify that the route URL segment is the plugin's slug (the same value as ctx.plugin.id at runtime) — previously phrased as <plugin-id> without explaining what that is. - api-routes: SandboxedRouteContext is non-generic in emdash/plugin (input is unknown; authors narrow with a route-level Zod schema). The earlier reference snippet showed a TInput generic that doesn't exist in the exported type. - cli: --json is supported by the non-interactive output commands (whoami, validate, search, info, login, publish), not all commands — logout, switch, init, build, dev, bundle do not define a json arg. * docs(plugins): align discovery flag and prose on registry terminology The CLI flag for overriding the discovery endpoint is being renamed from --aggregator to --registry-url in #1092, matching the EMDASH_REGISTRY_URL env var and the user-facing concept of a registry. Update the docs to use the new flag name and drop the user-facing mention of 'aggregator' in publishing.mdx in favour of 'registry'.
What does this PR do?
Normalises multi-word CLI flags on
@emdash-cms/plugin-clito kebab-case for consistency with thepublishsubcommand and standard Unix CLI convention.Today the CLI has both styles side-by-side:
publish:--author-name,--author-url,--security-email,--no-manifest(kebab)build/dev/bundle:--outDir,--validateOnly(camel)After this change, the three outliers use kebab too:
--outDir->--out-dir--validateOnly->--validate-onlyThe short alias
-ofor--out-diris unchanged. The programmatic API options onbundlePlugin()/buildPlugin()stay camelCase — they're JS function options, not CLI flags.Surfaced during review of #1059 (plugin authoring docs). The docs branch documents the kebab form, so this PR needs to land before — or together with — the docs PR.
Closes #
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.AI-generated code disclosure
Screenshots / test output
Tests: 256/256 passing in
packages/plugin-cli. Typecheck clean.