Skip to content

Commit a86cb0f

Browse files
nelsonwittwerclaude
andcommitted
Fix search URL instead of deprecating it
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>
1 parent ab5836f commit a86cb0f

7 files changed

Lines changed: 5 additions & 32 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-
`shopify search` is now deprecated. Its behavior is unchanged — it still opens shopify.dev in your browser — but it prints a deprecation notice pointing to `agent-search`.
7+
Also fixes `shopify search` to open `https://shopify.dev/?search=<query>` so it once again opens shopify.dev with your query.

packages/cli/oclif.manifest.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5711,9 +5711,6 @@
57115711
"name": "query"
57125712
}
57135713
},
5714-
"deprecationOptions": {
5715-
"to": "agent-search"
5716-
},
57175714
"description": "Starts a search on shopify.dev.",
57185715
"enableJsonFlag": false,
57195716
"examples": [
@@ -5728,7 +5725,6 @@
57285725
"pluginAlias": "@shopify/cli",
57295726
"pluginName": "@shopify/cli",
57305727
"pluginType": "core",
5731-
"state": "deprecated",
57325728
"strict": true,
57335729
"usage": "search [query]"
57345730
},

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

Lines changed: 0 additions & 18 deletions
This file was deleted.

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ import {Args} from '@oclif/core'
55
export default class Search extends Command {
66
static description = 'Starts a search on shopify.dev.'
77

8-
// Deprecated in favor of `agent-search`, which returns JSON for programmatic use.
9-
// The browser behavior below is intentionally preserved so existing usage doesn't
10-
// break; oclif emits a runtime deprecation warning pointing to `agent-search`.
11-
static state = 'deprecated'
12-
static deprecationOptions = {to: 'agent-search'}
13-
148
static usage = `search [query]`
159

1610
static examples = [

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/?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/?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/?${searchParams.toString()}`)
77
}

packages/e2e/data/snapshots/commands.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
│ ├─ uninstall
9393
│ ├─ unlink
9494
│ └─ update
95+
├─ search
9596
├─ store
9697
│ ├─ auth
9798
│ └─ execute

0 commit comments

Comments
 (0)