Skip to content

Commit 4b8aac8

Browse files
nelsonwittwerclaude
andcommitted
Point search at /docs directly to avoid the 301
`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>
1 parent a86cb0f commit 4b8aac8

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.changeset/add-agent-search-command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
Add `shopify agent-search`, which queries the shopify.dev vector store and prints the most relevant documentation chunks as JSON to stdout. This makes it usable for programmatic and agent-driven discovery, and supports two optional filters: `--api-name` (for example `admin`, `storefront`, `hydrogen`) and `--api-version` (for example `2025-10`, `latest`, `current`). To download a full document verbatim, use `fetch-doc`.
66

7-
Also fixes `shopify search` to open `https://shopify.dev/?search=<query>` so it once again opens shopify.dev with your query.
7+
Also fixes `shopify search` to open `https://shopify.dev/docs?search=<query>` directly (avoiding the redirect from the site root) so it once again opens shopify.dev with your query.

packages/cli/src/cli/services/commands/search.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ describe('searchService', () => {
88
test('the right URL is open in the system when a query is passed', async () => {
99
await searchService('deploy app')
1010

11-
expect(openURL).toBeCalledWith('https://shopify.dev/?search=deploy+app')
11+
expect(openURL).toBeCalledWith('https://shopify.dev/docs?search=deploy+app')
1212
})
1313

1414
test('the right URL is open in the system when a query is not passed', async () => {
1515
await searchService()
1616

17-
expect(openURL).toBeCalledWith('https://shopify.dev/?search=')
17+
expect(openURL).toBeCalledWith('https://shopify.dev/docs?search=')
1818
})
1919
})

packages/cli/src/cli/services/commands/search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import {openURL} from '@shopify/cli-kit/node/system'
33
export async function searchService(query?: string) {
44
const searchParams = new URLSearchParams()
55
searchParams.append('search', query ?? '')
6-
await openURL(`https://shopify.dev/?${searchParams.toString()}`)
6+
await openURL(`https://shopify.dev/docs?${searchParams.toString()}`)
77
}

0 commit comments

Comments
 (0)