Skip to content

[Agent Setup] Add Command Code setup page - #32649

Merged
aron-cf merged 4 commits into
cloudflare:productionfrom
bas3line:agent-setup-command-code-page
Sep 8, 2026
Merged

[Agent Setup] Add Command Code setup page#32649
aron-cf merged 4 commits into
cloudflare:productionfrom
bas3line:agent-setup-command-code-page

Conversation

@bas3line

@bas3line bas3line commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new Agent Setup page for Command Code, matching the structure of the existing pages for Claude Code, Codex, Cursor, OpenCode, and Windsurf.

The page covers installing the CLI, installing Cloudflare Skills with cmd skills add, adding the Cloudflare MCP server over HTTP transport, and running a first session. It reuses the shared agent-setup components (AgentHeader, PlatformAccessSection, ExamplePromptsList, TipsList, FAQList, TroubleshootingList, OtherAgents) so the platform access matrix, example prompts, and cross-links stay in sync with the rest of the section.

Supporting changes:

File Change
src/components/agent-setup/agents.ts Registers the command-code entry so it appears in the agent catalog and grid
public/icons/agents/command-code/{light,dark}.svg Adds the light and dark theme icons the catalog renders

Like bionic.mdx, this page is not added to the curated landing-page list in src/components/agents.ts or to src/content/agent-setup/prompt.md, which cover a subset of agents plus an "all other agents" fallback.

This supersedes #32472, which was opened from a branch with unrelated build-artifact churn.

production has been merged into the branch, so it is no longer out of date.

Validation run locally at d7d27fe (the merge commit):

  • pnpm run check — 453 files, 0 errors / 0 warnings / 0 hints; worker tsc --noEmit clean
  • pnpm run lint — clean
  • pnpm run format:core:check — "All matched files use Prettier code style!"
  • pnpm run build — 8965 pages built, exit 0, no warnings; /agent-setup/command-code/ renders and the page is listed in /agent-setup/llms.txt
  • pnpm run test — 15 files, 159 tests passed

Screenshots (optional)

n/a — the page uses the shared agent-setup layout and components, so it renders identically to the sibling pages.

Documentation checklist

  • The change adheres to the documentation style guide. The docs bot's style-guide review reports no outstanding issues on b42c062, the last commit that changed page content.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes. — n/a: this adds a new page and does not correct existing information, so there is no issue to open.

@bas3line
bas3line marked this pull request as ready for review August 10, 2026 22:42
@bas3line
bas3line requested review from a team as code owners August 10, 2026 22:42
Copilot AI lite review requested due to automatic review settings August 10, 2026 22:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review

💡 1 suggestion found in commit 45fcb9d.

👉 Fix in your agent 👈
Fix the following review findings in PR #32649 (https://github.com/cloudflare/cloudflare-docs/pull/32649).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
  or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.

---

## Code Review

### Suggestions (1)

#### CR-f3c6fedb5d00 · Command will not run on Windows
- **File:** `src/content/docs/agent-setup/command-code.mdx` line 49
- **Issue:** Line 36 states the CLI alias is `cmd`, and `cmdc` on Windows, but every example command in the quickstart (lines 49, 57, 65), FAQ (110), and troubleshooting (117, 128, 154, 158) uses `cmd`. On Windows, `cmd` resolves to cmd.exe, so `cmd skills add ...`, `cmd mcp add ...`, and `cmd` will not run for Windows users following the guide.
- **Fix:** Optionally note in the quickstart that the examples assume macOS/Linux and that Windows users should substitute `cmdc`, or add a brief Windows variant note near the first command.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

Suggestions (1)
File Issue
agent-setup/command-code.mdx line 49 Command will not run on Windows — Line 36 states the CLI alias is cmd, and cmdc on Windows, but every example command in the quickstart (lines 49, 57, 65), FAQ (110), and troubleshooting (117, 128, 154, 158) uses cmd. On Windows, cmd resolves to cmd.exe, so cmd skills add ..., cmd mcp add ..., and cmd will not run for Windows users following the guide. Fix: Optionally note in the quickstart that the examples assume macOS/Linux and that Windows users should substitute cmdc, or add a brief Windows variant note near the first command.

Conventions

No convention issues found.

Style Guide Review

No style-guide issues found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@bas3line

Copy link
Copy Markdown
Contributor Author

Triage: skipping the 11 style-guide import findings

Skipping SG-828e287799bc, SG-836240258866, SG-bfde30cb9144, SG-45d0566bb264, SG-50d6f85b1caf, SG-db141ad7a6fb, SG-287e2e34336a, SG-c6d22ce1483e, SG-dbbbd8ee0c03, SG-8409f6d590d9, SG-035d5bca12d6 — all eleven ask for import { X } from "~/components" in place of the ~/components/agent-setup/*.astro paths.

The agent-setup components are not exported from the barrel. src/components.ts has no entry for AgentHeader, PlatformAccessSection, ExamplePromptsList, RandomPrompt, TipsList, FAQList, FAQItem, TroubleshootingList, TroubleshootingItem, BuildAgentsCallout, or OtherAgents, and no wildcard re-export. Applying the suggested fix would produce eleven unresolved imports and fail the build.

This matches the precedent from #32177, which received the same eleven warnings on bionic.mdx lines 11–21 and skipped them for the same reason. Every page in this section imports this way — 99 direct-path imports across the nine pages. Moving the section to the barrel would be a separate change touching all of them plus src/components.ts.

Fixing CR-b4176969ab76 (broken inline code span, line 108). Correct finding, slightly different mechanism than described: inline code spans can span lines in CommonMark, but the source indentation leaks into the span — compiling the page yields the code text cmd mcp add --transport http cloudflare \thttps://mcp.cloudflare.com/mcp, with a literal tab. The command is now on one line, pinned with {/* prettier-ignore */} since Prettier re-wraps it at 80 columns otherwise. Rendered output is unchanged.

bas3line added a commit to bas3line/cloudflare-docs that referenced this pull request Aug 13, 2026
Prettier wrapped the `cmd mcp add` command across lines, which leaked the
source indentation into the inline code span (the compiled code text
contained a literal tab). Keep the command on one line and pin it with
prettier-ignore so Prettier does not re-wrap it at 80 columns.

Rendered output is unchanged. Addresses CR-b4176969ab76 on cloudflare#32649.
bas3line and others added 2 commits August 13, 2026 20:22
Add a Command Code page to the Agent Setup section, covering install,
Cloudflare Skills, the Cloudflare MCP server, tips, FAQ, and
troubleshooting. Register the agent in the agent-setup catalog and add
its light and dark icons.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Prettier wrapped the `cmd mcp add` command across lines, which leaked the
source indentation into the inline code span (the compiled code text
contained a literal tab). Keep the command on one line and pin it with
prettier-ignore so Prettier does not re-wrap it at 80 columns.

Rendered output is unchanged. Addresses CR-b4176969ab76 on cloudflare#32649.
@bas3line
bas3line force-pushed the agent-setup-command-code-page branch from db319cf to b42c062 Compare August 13, 2026 14:54

@aron-cf aron-cf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks. I've moved the command code entry into the third row on the main grid, the top six are fixed.

@aron-cf
aron-cf merged commit 08745c3 into cloudflare:production Sep 8, 2026
11 checks passed
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.

4 participants