Skip to content

feat(cli): add @docsearch/cli for MCP setup and search#2911

Merged
dylantientcheu merged 5 commits into
v5from
feat/docsearch-cli
Jul 14, 2026
Merged

feat(cli): add @docsearch/cli for MCP setup and search#2911
dylantientcheu merged 5 commits into
v5from
feat/docsearch-cli

Conversation

@dylantientcheu

@dylantientcheu dylantientcheu commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new @docsearch/cli workspace package: an npm CLI (npx @docsearch/cli) that installs the hosted DocSearch MCP into AI coding agents and queries public developer documentation from the terminal.

setup

  • Interactive Project/Global scope prompt and agent multi-select, with explicit non-interactive flags.
  • Project-root detection using VCS roots, repository markers, package.json, then cwd.
  • Supports Cursor, Claude Code, Codex, OpenCode, and Gemini CLI MCP config, rules, and skills.
  • Preserves JSONC comments, trailing commas, unknown fields, TOML custom keys/subtables, and user-edited rule/skill files.
  • Rejects malformed or wrong-shaped config with path-specific errors and writes updates atomically.
  • Uses standards-compliant skill frontmatter and current agent config paths/shapes.

docs / resolve / query

  • Connects to the hosted MCP over Streamable HTTP; --endpoint overrides it.
  • Human-readable terminal Markdown with source URLs, code blocks, tables, score bars, and wrapping.
  • --json emits clean machine-readable results.
  • MCP isError results now return a non-zero process exit, and requests have explicit timeouts and cleanup.

Packaging and terminal UX

  • Landing page on bare invocation, interactive prompts, colors, Unicode/ASCII fallbacks, and NO_COLOR support.
  • npm README and package metadata included.
  • CLI build artifacts are validated, persisted, and restored by CircleCI before Changesets publishes.
  • prepack rebuilds a clean dist; the package intentionally exposes only its executable.

Notes

  • New dependencies: picocolors and jsonc-parser.
  • Version is managed by Changesets (minor).

Test plan

  • bun run --filter @docsearch/cli build
  • bun run --filter @docsearch/cli test (56 tests)
  • bun run --filter @docsearch/cli test:pack (18-file, 18.2 kB tarball)
  • bun run lint
  • bun run test:types
  • CircleCI YAML parse validation
  • Landing, piped setup prompts, and live DocSearch query smoke tests
  • `bun run test --run
  • bun run build

Add a new @docsearch/cli workspace package that helps users install the
hosted DocSearch MCP into their AI agents (Cursor, Claude Code, Codex,
OpenCode, Gemini CLI) and query it from the terminal.

- setup: interactive scope + agent prompts, git-root project detection,
  idempotent MCP config/rule/skill writers, --project/--global/--all flags
- docs/resolve/query: hosted MCP HTTP client with human and --json output
- colored terminal UI: landing wordmark, spinner, and markdown rendering

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for docsearch-demo ready!

Name Link
🔨 Latest commit 6ced6ed
🔍 Latest deploy log https://app.netlify.com/projects/docsearch-demo/deploys/6a50f5d4082ece0008924ade
😎 Deploy Preview https://deploy-preview-2911--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.

@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for docsearch ready!

Name Link
🔨 Latest commit 6ced6ed
🔍 Latest deploy log https://app.netlify.com/projects/docsearch/deploys/6a50f5d48014a2000806adfb
😎 Deploy Preview https://deploy-preview-2911--docsearch.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.

dylantientcheu and others added 3 commits July 9, 2026 20:39
Preserve user configuration during setup, return reliable query failures, and ensure release artifacts are validated and published.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prepare the first standalone DocSearch CLI package release without versioning the fixed DocSearch package group.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@dylantientcheu
dylantientcheu merged commit 218eac3 into v5 Jul 14, 2026
10 checks passed
@dylantientcheu
dylantientcheu deleted the feat/docsearch-cli branch July 14, 2026 14:46
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