Skip to content

Split Workers cmds into own page#28989

Open
ask-bonk[bot] wants to merge 2 commits intoproductionfrom
opencode/issue28987-20260313235120
Open

Split Workers cmds into own page#28989
ask-bonk[bot] wants to merge 2 commits intoproductionfrom
opencode/issue28987-20260313235120

Conversation

@ask-bonk
Copy link
Contributor

@ask-bonk ask-bonk bot commented Mar 13, 2026

Here is a summary of the changes made:

Changes

Problem

The Wrangler commands page at /workers/wrangler/commands/ made it hard to discover Workers-specific commands. All core Workers commands (dev, deploy, versions, rollback, etc.) were buried in a "General commands" page alongside unrelated utility commands like login, telemetry, and complete. Users searching for "Workers" on the page could not find where Workers commands lived.

Solution

1. New file: src/content/docs/workers/wrangler/commands/workers.mdx

  • Dedicated "Workers" commands page with sidebar order 1 (appears first)
  • Contains all Workers-specific commands: init, dev, deploy, delete, setup, secret, tail, versions, triggers, deployments, rollback, types
  • Title is simply "Workers" -- making it immediately discoverable when searching

2. Updated: src/content/docs/workers/wrangler/commands/general.mdx

  • Slimmed down to only truly general/utility commands: docs, login, logout, auth, whoami, telemetry, check, complete
  • Updated description to reflect the narrower scope
  • Sidebar order changed from 1 to 2 (appears after Workers)

3. Updated: src/content/docs/workers/wrangler/commands/index.mdx

  • Added a new "Workers commands" section at the top that directly calls out and links to the Workers commands page
  • Mentions the key commands (wrangler dev, wrangler deploy, wrangler versions) so they are findable via Cmd+F
  • Renamed the "Commands" heading to "All commands" above the <DirectoryListing />

Sidebar result

The commands sidebar now shows:

  1. Workers (first -- the most important commands)
  2. General commands (authentication, telemetry, etc.)
  3. Certificates, Containers, D1, Hyperdrive, KV, Pages, ... (alphabetical)

No broken links

  • Searched the entire codebase: only one internal link referenced /workers/wrangler/commands/general/ and it was a self-reference that is now correctly updated in workers.mdx
  • The general.mdx page still exists at the same URL, so no external links to that page will 404
  • Validation passed: npm run check (0 errors), npm run lint (clean)

Closes #28987

github run

Co-authored-by: irvinebroque <irvinebroque@users.noreply.github.com>
@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/workers/wrangler/ @cloudflare/wrangler, @irvinebroque, @cloudflare/pcx-technical-writing

@irvinebroque
Copy link
Contributor

/bonk the wrangler check command should be part of the Workers commands page. Please fix.

@irvinebroque
Copy link
Contributor

@kodster28 refs #28886

@MattieTK for review

Copy link
Contributor Author

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

3 issues to address before merge.

HIGH: Reviewer request — move wrangler check to Workers page. @irvinebroque requested that the wrangler check command (currently at lines 213–241 of general.mdx) be moved to workers.mdx. This command profiles Worker startup — it belongs with the other Workers commands.

MEDIUM: 3 full URLs should be relative paths. workers.mdx contains https://developers.cloudflare.com/... links at lines 65, 171, and 351. Per the style guide, internal links must use relative paths. Posted inline suggestions below.

Note (out of scope): ~160 links across ~70 files point to /workers/wrangler/commands/#<anchor> (the index page) with anchors like #dev, #deploy, #secret, #tail, #types, #versions-deploy, etc. These anchors do not exist on the index page — the commands live on subpages. This is a pre-existing issue not introduced by this PR, but worth a follow-up to update those links to point to /workers/wrangler/commands/workers/#dev (or equivalent subpage).

- Path(s) to [Wrangler configuration file](/workers/wrangler/configuration/). If not provided, Wrangler will use the nearest config file based on your current working directory.
- You can provide multiple configuration files to run multiple Workers in one dev session like this: `wrangler dev -c ./wrangler.toml -c ../other-worker/wrangler.toml`. The first config will be treated as the _primary_ Worker, which will be exposed over HTTP. The remaining config files will only be accessible via a service binding from the primary Worker.
- `--no-bundle` <Type text="boolean" /> <MetaInfo text="(default: false) optional" />
- Skip Wrangler's build steps. Particularly useful when using custom builds. Refer to [Bundling](https://developers.cloudflare.com/workers/wrangler/bundling/) for more information.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use a relative path for internal links:

Suggested change
- Skip Wrangler's build steps. Particularly useful when using custom builds. Refer to [Bundling](https://developers.cloudflare.com/workers/wrangler/bundling/) for more information.
- Skip Wrangler's build steps. Particularly useful when using custom builds. Refer to [Bundling](/workers/wrangler/bundling/) for more information.

- `--name` <Type text="string" /> <MetaInfo text="optional" />
- Name of the Worker.
- `--no-bundle` <Type text="boolean" /> <MetaInfo text="(default: false) optional" />
- Skip Wrangler's build steps. Particularly useful when using custom builds. Refer to [Bundling](https://developers.cloudflare.com/workers/wrangler/bundling/) for more information.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same fix — relative path:

Suggested change
- Skip Wrangler's build steps. Particularly useful when using custom builds. Refer to [Bundling](https://developers.cloudflare.com/workers/wrangler/bundling/) for more information.
- Skip Wrangler's build steps. Particularly useful when using custom builds. Refer to [Bundling](/workers/wrangler/bundling/) for more information.

It may take up to 1 minute (60 seconds) for a tail to exit sampling mode after adding an option to filter tail messages.
:::

If sampling persists after using options to filter messages, consider using [instant logs](https://developers.cloudflare.com/logs/instant-logs/).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use a relative path:

Suggested change
If sampling persists after using options to filter messages, consider using [instant logs](https://developers.cloudflare.com/logs/instant-logs/).
If sampling persists after using options to filter messages, consider using [instant logs](/logs/instant-logs/).

@ask-bonk
Copy link
Contributor Author

ask-bonk bot commented Mar 17, 2026

Review posted and fixes pushed. Here is what was done:

Review posted on PR #28989 with 3 inline suggestions and a summary comment.

Fixes committed (6137060):

  1. Moved wrangler check to Workers page (workers.mdx lines 493-522) per @irvinebroque's request. Removed it from general.mdx and updated the general page's intro text to drop "diagnostics."

  2. Fixed 3 full URLs to relative paths in workers.mdx:

    • Line 65: [Bundling](https://developers.cloudflare.com/workers/wrangler/bundling/)[Bundling](/workers/wrangler/bundling/)
    • Line 171: same fix
    • Line 351: [instant logs](https://developers.cloudflare.com/logs/instant-logs/)[instant logs](/logs/instant-logs/)

Out-of-scope note included in the review: ~160 existing links across ~70 files point to /workers/wrangler/commands/#<anchor> (the index page) with anchors that only exist on subpages. This is pre-existing and not caused by this PR, but worth a follow-up.

github run

Copy link
Member

@MattieTK MattieTK left a comment

Choose a reason for hiding this comment

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

lgtm, I wonder if there's a nicer way to do this in the future with .md where we can split this document out a bit like a skill + resources dynamically.

But understand that the page weight is currently far too large even for users with actual browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Wrangler commands docs page easier to discover Workers commands

2 participants