Skip to content

Commit 93c65af

Browse files
authored
feat(site): lead the browse install with the extension and list every cli method (#62492)
1 parent cdd413c commit 93c65af

21 files changed

Lines changed: 44 additions & 30 deletions

File tree

‎services/site/src/component/site/download-sections.tsx‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,11 @@ export function ProductDownload(props: { slug: PageSlug }) {
367367
}
368368

369369
/** The extension pages' Install section, in the product pages' Download style, at #download. */
370-
export function ExtensionDownload(props: { lead: string; command?: string }) {
370+
export function ExtensionDownload(props: {
371+
lead: string
372+
command?: string
373+
commands?: { method: string; command: string }[]
374+
}) {
371375
const i18n = useI18n()
372376
const state = useCopy()
373377
let root!: HTMLDivElement
@@ -377,15 +381,19 @@ export function ExtensionDownload(props: { lead: string; command?: string }) {
377381
<SectionHeading id="download" title={i18n.t("download.action.install")} label />
378382
<div data-slot="body" ref={root}>
379383
<p data-slot="lead">{props.lead}</p>
380-
<Show when={props.command}>
381-
{(command) => (
384+
<Show when={props.commands ?? (props.command ? [{ method: props.command.split(" ")[0], command: props.command }] : undefined)}>
385+
{(commands) => (
382386
<ul data-component="download-list">
383-
<CopyRow
384-
item={{ id: "install", command: command() }}
385-
method={command().split(" ")[0]}
386-
copies="extension"
387-
state={state}
388-
/>
387+
<For each={commands()}>
388+
{(item) => (
389+
<CopyRow
390+
item={{ id: item.method, command: item.command }}
391+
method={item.method}
392+
copies="extension"
393+
state={state}
394+
/>
395+
)}
396+
</For>
389397
</ul>
390398
)}
391399
</Show>

‎services/site/src/component/site/extension-data.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type Extension = {
1818
intro: string
1919
features: { title: string; body: string }[]
2020
/** How to get it: a command to copy, or where to find it in the desktop app. */
21-
install: { lead: string; command?: string }
21+
install: { lead: string; command?: string; commands?: { method: string; command: string }[] }
2222
/** The Chrome Web Store listing, when there is one. The page's main action. */
2323
store?: string
2424
source: string
@@ -51,8 +51,13 @@ export const extensionPages: readonly Extension[] = [
5151
{ title: "Allowlists", body: "Limit a session's tabs to the sites you name." },
5252
],
5353
install: {
54-
lead: "One line installs Browse, adds it to the agents it finds and pairs the extension. On Windows, run irm https://opencode.ai/browse/install.ps1 | iex. Or ask your agent to set it up.",
55-
command: "curl -fsSL https://opencode.ai/browse/install | bash",
54+
lead: "Install the Chrome extension first. It walks you through the rest of the steps. To install the CLI directly, use any of these.",
55+
commands: [
56+
{ method: "curl", command: "curl -fsSL https://opencode.ai/browse/install | bash" },
57+
{ method: "powershell", command: "irm https://opencode.ai/browse/install.ps1 | iex" },
58+
{ method: "npm", command: "npm install -g @opencode/browse && browse install" },
59+
{ method: "bun", command: "bun add -g @opencode/browse && browse install" },
60+
],
5661
},
5762
store: "https://chromewebstore.google.com/detail/mfnicocicmmlkpjnaffgihfjhdgjkdjg",
5863
product: true,

‎services/site/src/component/site/extension-page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export function ExtensionPage(props: { slug: ExtensionSlug; path?: string }) {
157157
</For>
158158
</ul>
159159

160-
<ExtensionDownload lead={extension().install} command={command()} />
160+
<ExtensionDownload lead={extension().install} command={command()} commands={data().install.commands} />
161161

162162
<MoreFromAnomaly slot="more-from-anomaly" exclude={props.slug} />
163163
</Site>

‎services/site/src/i18n/content/ar.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export const content = {
198198
allowlists: { title: "قوائم السماح", body: "اقصر علامات تبويب الجلسة على المواقع التي تحددها." },
199199
},
200200
install:
201-
"سطر واحد يثبّت Browse، ويضيفه إلى الوكلاء الذين يجدهم ويقرن الإضافة. على Windows، شغّل irm https://opencode.ai/browse/install.ps1 | iex. أو اطلب من وكيلك إعداده.",
201+
"ثبّت إضافة Chrome أولًا، وستُرشدك خلال بقية الخطوات. لتثبيت CLI مباشرة، استخدم أيًّا من هذه الأوامر.",
202202
},
203203
},
204204
apps: {

‎services/site/src/i18n/content/br.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ export const content = {
390390
},
391391
},
392392
install:
393-
"Uma linha instala o Browse, adiciona aos agentes que encontrar e pareia a extensão. No Windows, rode irm https://opencode.ai/browse/install.ps1 | iex. Ou peça ao seu agente para configurar.",
393+
"Instale a extensão do Chrome primeiro. Ela guia você pelo resto dos passos. Para instalar a CLI diretamente, use qualquer um destes.",
394394
},
395395
},
396396
apps: {

‎services/site/src/i18n/content/da.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export const content = {
269269
allowlists: { title: "Hvidlister", body: "Begræns en sessions faner til de sites, du angiver." },
270270
},
271271
install:
272-
"Én linje installerer Browse, tilføjer det til de agenter den finder, og parrer udvidelsen. På Windows skal du køre irm https://opencode.ai/browse/install.ps1 | iex. Eller bed din agent om at sætte det op.",
272+
"Installer Chrome-udvidelsen først. Den guider dig gennem resten af trinene. Vil du installere CLI'en direkte, så brug en af disse.",
273273
},
274274
},
275275
apps: {

‎services/site/src/i18n/content/de.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export const content = {
302302
allowlists: { title: "Allowlists", body: "Beschränke die Tabs einer Session auf die Websites, die du nennst." },
303303
},
304304
install:
305-
"Eine Zeile installiert Browse, fügt es den gefundenen Agents hinzu und koppelt die Extension. Unter Windows führst du irm https://opencode.ai/browse/install.ps1 | iex aus. Oder bitte deinen Agent, es einzurichten.",
305+
"Installiere zuerst die Chrome-Extension. Sie führt dich durch die restlichen Schritte. Um die CLI direkt zu installieren, nimm einen dieser Befehle.",
306306
},
307307
},
308308
apps: {

‎services/site/src/i18n/content/es.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export const content = {
365365
},
366366
},
367367
install:
368-
"Una línea instala Browse, lo añade a los agentes que encuentra y vincula la extensión. En Windows, ejecuta irm https://opencode.ai/browse/install.ps1 | iex. O pide a tu agente que lo configure.",
368+
"Instala primero la extensión de Chrome. Te guía por el resto de los pasos. Para instalar la CLI directamente, usa cualquiera de estos.",
369369
},
370370
},
371371
apps: {

‎services/site/src/i18n/content/fr.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export const content = {
365365
},
366366
},
367367
install:
368-
"Une ligne installe Browse, l'ajoute aux agents qu'il trouve et associe l'extension. Sous Windows, lancez irm https://opencode.ai/browse/install.ps1 | iex. Ou demandez à votre agent de l'installer.",
368+
"Installez d'abord l'extension Chrome. Elle vous guide pour le reste des étapes. Pour installer la CLI directement, utilisez l'une de ces commandes.",
369369
},
370370
},
371371
apps: {

‎services/site/src/i18n/content/it.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export const content = {
365365
},
366366
},
367367
install:
368-
"Una riga installa Browse, lo aggiunge agli agenti che trova e abbina l'estensione. Su Windows, esegui irm https://opencode.ai/browse/install.ps1 | iex. Oppure chiedi al tuo agente di configurarlo.",
368+
"Installa prima l'estensione di Chrome. Ti guida nel resto dei passaggi. Per installare la CLI direttamente, usa uno di questi.",
369369
},
370370
},
371371
apps: {

0 commit comments

Comments
 (0)