Skip to content

fix(plugin-cli): rename --aggregator flag to --registry-url#1092

Merged
ascorbic merged 1 commit into
mainfrom
fix/plugin-cli-rename-aggregator-flag
May 18, 2026
Merged

fix(plugin-cli): rename --aggregator flag to --registry-url#1092
ascorbic merged 1 commit into
mainfrom
fix/plugin-cli-rename-aggregator-flag

Conversation

@ascorbic
Copy link
Copy Markdown
Collaborator

What does this PR do?

The discovery commands (search, info) on @emdash-cms/plugin-cli accept a --aggregator <url> flag to override the registry endpoint. The env var, the default URL host (registry.emdashcms.com), and the user-facing concept all speak of the registry. Three surface words for adjacent concepts hurts the read-out-loud test:

emdash-plugin search "image" --aggregator https://registry.example.com
EMDASH_REGISTRY_URL=https://registry.example.com emdash-plugin search "image"

Rename the flag to --registry-url to converge on one user-facing term.

emdash-plugin search "image" --registry-url https://registry.example.com

Internally the helper still queries an aggregator service. The registry is the broader system (atproto records on PDSes plus aggregator indexers); an aggregator is one indexer of it. The rename only changes what users type, not what the code does — resolveAggregatorUrl() and DEFAULT_AGGREGATOR_URL stay as-is.

Surfaced during review of #1059.

Also fixes the README's --json description while we're at it (it mirrored the out-of-date "all commands accept --json" claim being corrected in the docs PR).

Closes #

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Do not include messages.po changes except in translation PRs — a workflow extracts catalogs on merge to main.
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: https://github.com/emdash-cms/emdash/discussions/...

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude Opus 4.7

Screenshots / test output

USAGE emdash-plugin search [OPTIONS] <QUERY>
    --capability    Filter to packages declaring this access category (e.g. 'email', 'network')
    --limit="25"    Max results per page (1-100, default 25)
        --cursor    Continuation cursor from a previous search result
  --registry-url    Override registry URL (defaults to EMDASH_REGISTRY_URL or experimental host)
          --json    Output as JSON

USAGE emdash-plugin info [OPTIONS] <PUBLISHER> <SLUG>
  --registry-url    Override registry URL
          --json    Output as JSON

Tests: 256/256 passing in packages/plugin-cli. Typecheck clean.

The discovery commands ('search', 'info') used '--aggregator <url>'
while the env var 'EMDASH_REGISTRY_URL', the default URL host
('registry.emdashcms.com'), and the user-facing concept all spoke of
the 'registry'. Three surface words for adjacent concepts hurt the
read-out-loud test.

Rename the flag to '--registry-url' to converge on a single user-facing
term. Internally the helper still calls into an aggregator service
(the registry is the broader system; an aggregator is one indexer of
it) — the rename only affects what users type.

Also fix the README's '--json' surface description, which mirrored the
out-of-date docs claim that 'all commands accept --json'.
Copilot AI review requested due to automatic review settings May 18, 2026 15:53
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

🦋 Changeset detected

Latest commit: cbab750

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@emdash-cms/plugin-cli Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch

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

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-perf-coordinator cbab750 May 18 2026, 03:51 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-i18n cbab750 May 18 2026, 03:51 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
docs cbab750 May 18 2026, 03:52 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache cbab750 May 18 2026, 03:52 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground cbab750 May 18 2026, 03:54 PM

ascorbic added a commit that referenced this pull request May 18, 2026
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'.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 18, 2026

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@1092

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@1092

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@1092

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@1092

emdash

npm i https://pkg.pr.new/emdash@1092

create-emdash

npm i https://pkg.pr.new/create-emdash@1092

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@1092

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@1092

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@1092

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@1092

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@1092

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@1092

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@1092

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@1092

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@1092

commit: cbab750

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns the @emdash-cms/plugin-cli discovery command flag naming with the rest of the registry surface by renaming the search/info override flag from --aggregator to --registry-url, and updates related docs/changelog entries.

Changes:

  • Rename discovery override flag from --aggregator to --registry-url in search and info.
  • Update shared config docs to reference the new flag name.
  • Update the plugin-cli README and add a changeset describing the rename.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/plugin-cli/src/config.ts Updates inline documentation to reference --registry-url.
packages/plugin-cli/src/commands/search.ts Renames the CLI flag to --registry-url and uses it when resolving the aggregator URL.
packages/plugin-cli/src/commands/info.ts Renames the CLI flag to --registry-url and uses it when resolving the aggregator URL.
packages/plugin-cli/README.md Updates CLI documentation for --json and the discovery override flag name.
.changeset/plugin-cli-registry-url-flag.md Adds release note for the flag rename.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +39 to 50
"registry-url": {
type: "string",
description: "Override aggregator URL (defaults to EMDASH_REGISTRY_URL or experimental host)",
description: "Override registry URL (defaults to EMDASH_REGISTRY_URL or experimental host)",
},
json: {
type: "boolean",
description: "Output as JSON",
},
},
async run({ args }) {
const aggregatorUrl = resolveAggregatorUrl(args.aggregator);
const aggregatorUrl = resolveAggregatorUrl(args["registry-url"]);
const limit = clamp(parseInt(args.limit, 10) || 25, 1, 100);
Comment on lines +38 to 49
"registry-url": {
type: "string",
description: "Override aggregator URL",
description: "Override registry URL",
},
json: {
type: "boolean",
description: "Output as JSON",
},
},
async run({ args }) {
const aggregatorUrl = resolveAggregatorUrl(args.aggregator);
const aggregatorUrl = resolveAggregatorUrl(args["registry-url"]);
const client = new DiscoveryClient({ aggregatorUrl });
Comment on lines +2 to +5
"@emdash-cms/plugin-cli": patch
---

Renames the `--aggregator` flag on `search` and `info` to `--registry-url` for consistency with the `EMDASH_REGISTRY_URL` env var and the rest of the user-facing surface. Internally the override still selects the aggregator service to query — the rename only affects what users type.
@ascorbic ascorbic merged commit 6788829 into main May 18, 2026
41 checks passed
@ascorbic ascorbic deleted the fix/plugin-cli-rename-aggregator-flag branch May 18, 2026 16:48
ascorbic added a commit that referenced this pull request May 18, 2026
* 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'.
@emdashbot emdashbot Bot mentioned this pull request May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants