Skip to content

feat(website): one-command CLI install + Segment install-intent events on MCP docs#2917

Merged
dylantientcheu merged 6 commits into
feat/docusaurus-adapter-v5from
feat/mcp-install-cli-segment
Jul 15, 2026
Merged

feat(website): one-command CLI install + Segment install-intent events on MCP docs#2917
dylantientcheu merged 6 commits into
feat/docusaurus-adapter-v5from
feat/mcp-install-cli-segment

Conversation

@dylantientcheu

@dylantientcheu dylantientcheu commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What

Reworks the Install DocSearch MCP docs (docs/mcp/installation) so we can see who actually wants to install it, and gives the fastest path.

One-command install (design)

  • New terminal-style One-command install section in MCPInstall, between the client picker and the step-by-step panel — npx @docsearch/cli setup --<client>, with the flag crossfading as you switch clients (mirrors the MCP frontend hero).
  • Renders clean for clients the CLI actually supports (cursor, claude, codex, opencode — verified against packages/docsearch-cli flags) and shows default for the rest.
  • installation.mdx now introduces the CLI as the fastest path, with plugin/manual as the do-it-yourself routes.

Segment install-intent events

  • Adds @segment/analytics-next behind a small lazy-loaded, SSR-safe helper (src/lib/segment.js) — Segment only loads on the first tracked interaction.
  • Events (same source as the MCP frontend, so both sites funnel together; context.page tells them apart):
    • Install Command Copied — CLI one-liner copy (client, command)
    • Install Config Copied — any config code-card copy (client, mode, caption)
    • Install Button Clicked — Cursor one-click deeplink (client, mode)

Why based on feat/docusaurus-adapter-v5

The website only builds with the migrated themeConfig shape from #2904, so this stacks on top of it and should merge after it.

Test plan

  • bun run build in packages/website — client + SSR compile, static build succeeds
  • Not yet manually exercised in a browser — worth a quick pass over the picker (flag follows the selected client, section collapses for unsupported clients) and the Segment debugger before merging

🤖 Generated with Claude Code

…s on MCP docs

- MCPInstall: terminal-style 'One-command install' section between the
  client picker and the step-by-step panel; the setup flag follows the
  selected client and the section collapses for clients the CLI does not
  support (cursor, claude, codex, opencode only)
- Segment (lazy-loaded @segment/analytics-next): 'Install Command Copied'
  on the CLI one-liner, 'Install Config Copied' on config code cards
  (client/mode/caption), 'Install Button Clicked' on the Cursor deeplink
- installation.mdx: introduce the CLI as the fastest path

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for docsearch-demo ready!

Name Link
🔨 Latest commit 515f63c
🔍 Latest deploy log https://app.netlify.com/projects/docsearch-demo/deploys/6a566d3a015b780008f72642
😎 Deploy Preview https://deploy-preview-2917--docsearch-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vascobettencourt vascobettencourt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The quick-install path needs to be limited to the clients the CLI can actually configure. CI is green, but the current UI advertises a nonfunctional install command for every unsupported client.

</motion.div>

{/* Fastest path: supported clients include their setup flag; others use the interactive setup. */}
<AnimatePresence initial={false}>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This AnimatePresence always receives a child, so the quick-install panel never exits for unsupported clients. Selecting ChatGPT, Pi, VS Code, Windsurf, Zed, Conductor, Antigravity, or Other still shows npx @docsearch/cli setup and claims it adds the server/rules/skills to that selected client. The unflagged CLI only detects/prompts for Cursor, Claude, Codex, and OpenCode, so it cannot configure the selected unsupported client. Please gate the child on CLI_SUPPORTED_CLIENTS.has(selected.id) (which will also let this exit animation run), as described in the PR summary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

by default the setup command installs for most agents in the relevant folders.

those that are not listed is because it will justwork™️ without any specific install instructions

@dylantientcheu
dylantientcheu merged commit ce97308 into feat/docusaurus-adapter-v5 Jul 15, 2026
10 checks passed
@dylantientcheu
dylantientcheu deleted the feat/mcp-install-cli-segment branch July 15, 2026 12:59
8bittitan pushed a commit that referenced this pull request Jul 15, 2026
…s on MCP docs (#2917)

* feat(website): one-command CLI install + Segment install-intent events on MCP docs

- MCPInstall: terminal-style 'One-command install' section between the
  client picker and the step-by-step panel; the setup flag follows the
  selected client and the section collapses for clients the CLI does not
  support (cursor, claude, codex, opencode only)
- Segment (lazy-loaded @segment/analytics-next): 'Install Command Copied'
  on the CLI one-liner, 'Install Config Copied' on config code cards
  (client/mode/caption), 'Install Button Clicked' on the Cursor deeplink
- installation.mdx: introduce the CLI as the fastest path

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: ci

* fix: lint

* fix sizing

* fix

* rm: pnpm lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants