docs(cli): bootstrap basic agent docs for the CLI#815
docs(cli): bootstrap basic agent docs for the CLI#815arcjet-rei wants to merge 4 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Arcjet Review — 🔴 High Risk
Decision: Blocked
Rationale: PR has merge conflicts. Resolve conflicts before review.
Review: 6067c42e | Powered by Arcjet Review
Add a /cli reference page, an Option C section on agent-get-started, and a CLI block in llms.txt so AI coding agents can discover and use the CLI as a low-round-trip path for environment introspection. Lead with `npx -y @arcjet/cli@latest` since it works on macOS, Linux, and Windows with no install step. Frame `arcjet auth login` as the default and ARCJET_TOKEN as the headless escape hatch. Closes ENG-711. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
308b57f to
f70b8da
Compare
There was a problem hiding this comment.
Arcjet Review — 🟢 Low Risk
Decision: Approved
Rationale: Docs-only PR adding a new CLI documentation page (cli.mdx), updating the agent get-started guide with an Option C section, adding a CLI section to llms.txt, and registering the new page in the sidebar. No code, dependency, infra, auth, or migration changes. The previous review blocked on merge conflicts; the diff now applies cleanly. Found one likely-broken self-referential anchor link worth fixing before merge but it does not warrant blocking.
Summary of Changes
Adds new /cli documentation page and a CLI option (Option C) to the agent get-started guide, mirrors the CLI surface into llms.txt, and adds a CLI sidebar entry. Documentation-only change.
Notes
Previous block (merge conflicts) appears resolved — the diff applies cleanly. No security-review skill load needed for a pure docs change; nothing in the diff exposes secrets, auth flows, or executable code paths.
Review: 47af423d | Powered by Arcjet Review
- Renumber Option C steps to C1–C4 in agent-get-started.mdx so the
headings produce unique anchor slugs and don't collide with Option B's
Step 3 / Step 4. Inline the .env snippet in Step C2 instead of relying
on a self-referential anchor that resolved to the wrong section.
- Update cross-reference to Option B's framework-specific steps with
explicit step titles ("Step 3: Install the SDK" / "Step 4: Add
protection") so the link text and target are unambiguous.
- Add `<id>` placeholder to `arcjet analyze dry-run-impact --site-id`
in both cli.mdx and llms.txt — it now matches the rest of the table.
- Add `<id>` placeholder to `arcjet analyze ip --site-id --ip <ip>` in
both files for the same consistency reason.
- Shorten `arcjet requests list` row description to
"List recent requests; filter by conclusion." so the column doesn't
overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adding the "CLI" entry to the For Agents sidebar group shifted every sidebar-bearing page by one row, producing a pixel diff on every page screenshot. Also refreshes the llms.txt text snapshot to include the new ## CLI section. Regenerated using mcr.microsoft.com/playwright:v1.58.2-jammy (matches the chromium-linux baseline used by CI). All 167 tests pass on a clean verification run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The two troubleshooting screenshots regenerated locally on Apple Silicon under Rosetta-emulated linux/amd64 still diverged from CI's amd64 rendering by ~4000px each (ratio 0.01). Other 165 snapshots stayed under the 100-pixel `maxDiffPixels` threshold; troubleshooting's text-heavy "Common errors" section pushes the diff over. The HTML output is byte-identical between CI's `dist/` and the local build (verified by md5sum), and CI's actual rendering is internally deterministic across initial run and retry — so the divergence is purely in Chromium font rasterization between native amd64 and Rosetta-emulated amd64. The CI-rendered actuals are the right baselines for a CI-only test fixture, so committing CI's bytes is strictly correct. Captured from #815 run 24935705869, blob-report-4 artifact. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| - You need to answer questions about the user's Arcjet environment without standing up an MCP server. | ||
| - The user has not yet configured an MCP connection or the Arcjet plugin. | ||
|
|
||
| If the user has Node.js available, every command works with no install via `npx -y @arcjet/cli@latest <command>`. See [Install](#install) for permanent installation paths. |
There was a problem hiding this comment.
This should go underneath Install below, since it's a prerequisite for npx
Summary
/clireference page under the For Agents sidebar group covering install, browser-based device auth, agent flags (--output json,--fields), command surface, and typical workflows.agent-get-started.mdxbetween Option B and Common agent prompts. Reuses Steps 3–4 of the existing flow for the framework-specific code.## CLIblock topublic/llms.txtso agents that fetch the canonical map see the CLI alongside the Plugin and MCP server./cliintosrc/lib/sidebars.ts(For Agents → CLI, between MCP Server and Arcjet Guards).npx -y @arcjet/cli@latestis the lead install path everywhere — works on macOS, Linux, and Windows with no install step.npm install -g @arcjet/cli, Homebrew, and release archives are listed as alternatives for permanent installs. The device authorization flow (arcjet auth login) is framed as the default;ARCJET_TOKENis the headless escape hatch.Closes ENG-711.
Test plan
npm run dev—/clirenders, sidebar entry appears under For Agents, internal links resolve./agent-get-startedwith intra-page anchors (#step-2-get-your-arcjet_key,#step-3-install-the-sdk,#step-4-add-protection) resolving to the existing steps.public/llms.txtis reachable and the new CLI block is positioned between the MCP Server section and Use cases.arcjet --helpfor the current CLI build.🤖 Generated with Claude Code