Skip to content

Deprecate and fix search#7778

Draft
nelsonwittwer wants to merge 5 commits into
mainfrom
add-agent-search-command
Draft

Deprecate and fix search#7778
nelsonwittwer wants to merge 5 commits into
mainfrom
add-agent-search-command

Conversation

@nelsonwittwer

@nelsonwittwer nelsonwittwer commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What

Deprecates shopify search and fixes its browser URL. (Earlier revisions of this PR added a top-level agent-search command; that has been dropped — the JSON search now lives at doc search, added in #7770.)

Why

  • Fixes a bug. shopify search opened https://shopify.dev?search=<query>, which 301-redirects to https://shopify.dev/docs?search=<query>. It now opens that destination directly, so it no longer relies on a redirect.
  • Steers programmatic users to the right tool. Documentation search for agents/scripts is moving to the new doc namespace (doc search, returns JSON). search stays as the human, browser-based command and now points there.

Changes

search is marked state: 'deprecated' with deprecationOptions = {to: 'doc search'}:

  • It still opens the browser when invoked — existing usage does not break.
  • oclif emits a runtime warning: The "search" command has been deprecated. Use "doc search" instead.
  • It's hidden from the advertised command tree/listings (still runnable directly, and via commands --deprecated).
  • The URL it opens is now https://shopify.dev/docs?search=<query> (no redirect).

Related

Notes

🤖 Generated with Claude Code

Introduce `shopify agent-search`, which queries the shopify.dev vector
store and prints the most relevant documentation chunks as JSON to stdout
(filters: --api-name, --api-version). This is the non-breaking counterpart
to repurposing `search` itself: existing `shopify search` behavior is
preserved (it still opens shopify.dev in the browser) but is now marked
deprecated, so oclif emits a runtime warning pointing users to
`agent-search` and the command is hidden from listings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Jun 10, 2026
Rather than deprecating `shopify search`, restore the original browser
experience by opening `https://shopify.dev/?search=<query>`. The command
is no longer marked deprecated, so it stays in the command listings and
behaves as it did before. `agent-search` remains the JSON-returning
command for programmatic/agent discovery.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nelsonwittwer nelsonwittwer changed the title Add agent-search command; deprecate search Add agent-search command; fix search browser URL Jun 10, 2026
nelsonwittwer and others added 3 commits June 10, 2026 10:29
`https://shopify.dev/?search=<query>` 301-redirects to
`https://shopify.dev/docs?search=<query>`. Open that destination directly
so the browser doesn't follow a redirect.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update the description to state that `search` opens shopify.dev in the
browser for interactive human use, and point agents to `agent-search`
for JSON results.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per the doc-namespace plan, the JSON search will live at `doc search`
(added in a separate PR), so this PR no longer introduces a top-level
`agent-search` command. Instead it:

- keeps the `search` URL fix (opens https://shopify.dev/docs?search=<query>
  directly, no redirect), and
- marks `search` deprecated with `deprecationOptions = {to: 'doc search'}`,
  so oclif warns users at runtime and the command is hidden from listings
  while still working as a browser search for humans.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nelsonwittwer nelsonwittwer changed the title Add agent-search command; fix search browser URL Deprecate and fix search Jun 10, 2026
nelsonwittwer added a commit that referenced this pull request Jun 10, 2026
Per the doc-namespace plan, the JSON vector-store search lives at
`doc search` instead of repurposing the top-level `search` command:

- Add commands/doc/search.ts (class DocSearch), services/commands/doc/search.ts
  (docSearchService), and the colocated test; register as `doc:search`.
- Add a `doc` topic description.
- Revert the breaking change to top-level `search` — it goes back to the
  original browser behavior (handled/deprecated separately in #7778).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nelsonwittwer added a commit that referenced this pull request Jun 22, 2026
Per the doc-namespace plan, the JSON vector-store search lives at
`doc search` instead of repurposing the top-level `search` command:

- Add commands/doc/search.ts (class DocSearch), services/commands/doc/search.ts
  (docSearchService), and the colocated test; register as `doc:search`.
- Add a `doc` topic description.
- Revert the breaking change to top-level `search` — it goes back to the
  original browser behavior (handled/deprecated separately in #7778).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nelsonwittwer added a commit that referenced this pull request Jun 22, 2026
Per the doc-namespace plan, the JSON vector-store search lives at
`doc search` instead of repurposing the top-level `search` command:

- Add commands/doc/search.ts (class DocSearch), services/commands/doc/search.ts
  (docSearchService), and the colocated test; register as `doc:search`.
- Add a `doc` topic description.
- Revert the breaking change to top-level `search` — it goes back to the
  original browser behavior (handled/deprecated separately in #7778).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

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

Labels

Area: @shopify/cli @shopify/cli package issues no-pr-activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant