feat(site): lead the browse install with the extension and list every cli method (#62492)

This commit is contained in:
Dax
2026-11-06 21:35:16 -05:00
committed by GitHub
Unverified
parent cdd413cd20
commit 93c65afbf0
21 changed files with 44 additions and 30 deletions
@@ -367,7 +367,11 @@ export function ProductDownload(props: { slug: PageSlug }) {
}
/** The extension pages' Install section, in the product pages' Download style, at #download. */
export function ExtensionDownload(props: { lead: string; command?: string }) {
export function ExtensionDownload(props: {
lead: string
command?: string
commands?: { method: string; command: string }[]
}) {
const i18n = useI18n()
const state = useCopy()
let root!: HTMLDivElement
@@ -377,15 +381,19 @@ export function ExtensionDownload(props: { lead: string; command?: string }) {
<SectionHeading id="download" title={i18n.t("download.action.install")} label />
<div data-slot="body" ref={root}>
<p data-slot="lead">{props.lead}</p>
<Show when={props.command}>
{(command) => (
<Show when={props.commands ?? (props.command ? [{ method: props.command.split(" ")[0], command: props.command }] : undefined)}>
{(commands) => (
<ul data-component="download-list">
<CopyRow
item={{ id: "install", command: command() }}
method={command().split(" ")[0]}
copies="extension"
state={state}
/>
<For each={commands()}>
{(item) => (
<CopyRow
item={{ id: item.method, command: item.command }}
method={item.method}
copies="extension"
state={state}
/>
)}
</For>
</ul>
)}
</Show>
@@ -18,7 +18,7 @@ type Extension = {
intro: string
features: { title: string; body: string }[]
/** How to get it: a command to copy, or where to find it in the desktop app. */
install: { lead: string; command?: string }
install: { lead: string; command?: string; commands?: { method: string; command: string }[] }
/** The Chrome Web Store listing, when there is one. The page's main action. */
store?: string
source: string
@@ -51,8 +51,13 @@ export const extensionPages: readonly Extension[] = [
{ title: "Allowlists", body: "Limit a session's tabs to the sites you name." },
],
install: {
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.",
command: "curl -fsSL https://opencode.ai/browse/install | bash",
lead: "Install the Chrome extension first. It walks you through the rest of the steps. To install the CLI directly, use any of these.",
commands: [
{ method: "curl", command: "curl -fsSL https://opencode.ai/browse/install | bash" },
{ method: "powershell", command: "irm https://opencode.ai/browse/install.ps1 | iex" },
{ method: "npm", command: "npm install -g @opencode/browse && browse install" },
{ method: "bun", command: "bun add -g @opencode/browse && browse install" },
],
},
store: "https://chromewebstore.google.com/detail/mfnicocicmmlkpjnaffgihfjhdgjkdjg",
product: true,
@@ -157,7 +157,7 @@ export function ExtensionPage(props: { slug: ExtensionSlug; path?: string }) {
</For>
</ul>
<ExtensionDownload lead={extension().install} command={command()} />
<ExtensionDownload lead={extension().install} command={command()} commands={data().install.commands} />
<MoreFromAnomaly slot="more-from-anomaly" exclude={props.slug} />
</Site>
+1 -1
View File
@@ -198,7 +198,7 @@ export const content = {
allowlists: { title: "قوائم السماح", body: "اقصر علامات تبويب الجلسة على المواقع التي تحددها." },
},
install:
"سطر واحد يثبّت Browse، ويضيفه إلى الوكلاء الذين يجدهم ويقرن الإضافة. على Windows، شغّل irm https://opencode.ai/browse/install.ps1 | iex. أو اطلب من وكيلك إعداده.",
"ثبّت إضافة Chrome أولًا، وستُرشدك خلال بقية الخطوات. لتثبيت CLI مباشرة، استخدم أيًّا من هذه الأوامر.",
},
},
apps: {
+1 -1
View File
@@ -390,7 +390,7 @@ export const content = {
},
},
install:
"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.",
"Instale a extensão do Chrome primeiro. Ela guia você pelo resto dos passos. Para instalar a CLI diretamente, use qualquer um destes.",
},
},
apps: {
+1 -1
View File
@@ -269,7 +269,7 @@ export const content = {
allowlists: { title: "Hvidlister", body: "Begræns en sessions faner til de sites, du angiver." },
},
install:
"É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.",
"Installer Chrome-udvidelsen først. Den guider dig gennem resten af trinene. Vil du installere CLI'en direkte, så brug en af disse.",
},
},
apps: {
+1 -1
View File
@@ -302,7 +302,7 @@ export const content = {
allowlists: { title: "Allowlists", body: "Beschränke die Tabs einer Session auf die Websites, die du nennst." },
},
install:
"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.",
"Installiere zuerst die Chrome-Extension. Sie führt dich durch die restlichen Schritte. Um die CLI direkt zu installieren, nimm einen dieser Befehle.",
},
},
apps: {
+1 -1
View File
@@ -365,7 +365,7 @@ export const content = {
},
},
install:
"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.",
"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.",
},
},
apps: {
+1 -1
View File
@@ -365,7 +365,7 @@ export const content = {
},
},
install:
"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.",
"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.",
},
},
apps: {
+1 -1
View File
@@ -365,7 +365,7 @@ export const content = {
},
},
install:
"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.",
"Installa prima l'estensione di Chrome. Ti guida nel resto dei passaggi. Per installare la CLI direttamente, usa uno di questi.",
},
},
apps: {
+1 -1
View File
@@ -281,7 +281,7 @@ export const content = {
allowlists: { title: "許可リスト", body: "セッションのタブを、指定したサイトだけに制限できます。" },
},
install:
"1行でBrowseをインストールし、見つけたエージェントに追加して拡張機能とペアリングします。Windowsでは irm https://opencode.ai/browse/install.ps1 | iex を実行します。エージェントに設定を頼むこともできます。",
"まず Chrome 拡張機能をインストールしてください。残りの手順は拡張機能が案内します。CLI を直接インストールする場合は、次のいずれかを使ってください。",
},
},
apps: {
+1 -1
View File
@@ -232,7 +232,7 @@ export const content = {
allowlists: { title: "허용 목록", body: "세션의 탭을 지정한 사이트로만 제한하세요." },
},
install:
"한 줄로 Browse를 설치하고, 찾은 에이전트에 추가하고 확장 프로그램과 페어링합니다. Windows에서는 irm https://opencode.ai/browse/install.ps1 | iex 를 실행하세요. 에이전트에게 설정을 맡겨도 됩니다.",
"먼저 Chrome 확장 프로그램을 설치하세요. 나머지 단계는 확장 프로그램이 안내합니다. CLI를 직접 설치하려면 아래 명령 중 하나를 사용하세요.",
},
},
apps: {
+1 -1
View File
@@ -269,7 +269,7 @@ export const content = {
allowlists: { title: "Hvitelister", body: "Begrens fanene til en sesjon til nettstedene du oppgir." },
},
install:
"Én linje installerer Browse, legger det til i agentene den finner og kobler til utvidelsen. På Windows kjører du irm https://opencode.ai/browse/install.ps1 | iex. Eller be agenten din sette det opp.",
"Installer Chrome-utvidelsen først. Den guider deg gjennom resten av stegene. Vil du installere CLI-en direkte, bruk en av disse.",
},
},
apps: {
+1 -1
View File
@@ -390,7 +390,7 @@ export const content = {
},
},
install:
"Jedna linia instaluje Browse, dodaje go do znalezionych agentów i paruje rozszerzenie. W Windows uruchom irm https://opencode.ai/browse/install.ps1 | iex. Możesz też poprosić agenta o skonfigurowanie.",
"Najpierw zainstaluj rozszerzenie Chrome. Przeprowadzi cię przez pozostałe kroki. Aby zainstalować CLI bezpośrednio, użyj jednego z tych poleceń.",
},
},
apps: {
+1 -1
View File
@@ -269,7 +269,7 @@ export const content = {
allowlists: { title: "Списки доступа", body: "Ограничьте вкладки сессии указанными сайтами." },
},
install:
"Одна строка устанавливает Browse, добавляет его найденным агентам и связывает расширение. В Windows выполните irm https://opencode.ai/browse/install.ps1 | iex. Или попросите агента всё настроить.",
"Сначала установите расширение для Chrome. Оно проведёт вас через остальные шаги. Чтобы установить CLI напрямую, используйте любую из этих команд.",
},
},
apps: {
+1 -1
View File
@@ -235,7 +235,7 @@ export const content = {
allowlists: { title: "รายการที่อนุญาต", body: "จำกัดแท็บของเซสชันไว้เฉพาะเว็บไซต์ที่คุณระบุ" },
},
install:
"บรรทัดเดียวติดตั้ง Browse เพิ่มให้เอเจนต์ที่พบ และจับคู่ส่วนขยาย บน Windows ให้รัน irm https://opencode.ai/browse/install.ps1 | iex หรือให้เอเจนต์ตั้งค่าให้",
"ติดตั้งส่วนขยาย Chrome ก่อน แล้วส่วนขยายจะพาคุณทำขั้นตอนที่เหลือ หากต้องการติดตั้ง CLI โดยตรง ให้ใช้คำสั่งใดคำสั่งหนึ่งต่อไปนี้",
},
},
apps: {
+1 -1
View File
@@ -390,7 +390,7 @@ export const content = {
},
},
install:
"Tek satır Browse'u kurar, bulduğu ajanlara ekler ve eklentiyle eşler. Windows'ta irm https://opencode.ai/browse/install.ps1 | iex komutunu çalıştırın. Ya da ajanınızdan kurmasını isteyin.",
"Önce Chrome uzantısını yükleyin. Kalan adımlarda size yol gösterir. CLI'yi doğrudan yüklemek için bunlardan birini kullanın.",
},
},
apps: {
+1 -1
View File
@@ -275,7 +275,7 @@ export const content = {
allowlists: { title: "Списки доступу", body: "Обмежте вкладки сесії вказаними сайтами." },
},
install:
"Один рядок встановлює Browse, додає його знайденим агентам і зв'язує розширення. У Windows виконайте irm https://opencode.ai/browse/install.ps1 | iex. Або попросіть агента все налаштувати.",
"Спочатку встановіть розширення для Chrome. Воно проведе вас через решту кроків. Щоб установити CLI напряму, скористайтеся будь-якою з цих команд.",
},
},
apps: {
+1 -1
View File
@@ -194,7 +194,7 @@ export const content = {
allowlists: { title: "允许列表", body: "将会话的标签页限制在您指定的网站内。" },
},
install:
"一行命令安装 Browse,把它添加到找到的代理并配对扩展。在 Windows 上运行 irm https://opencode.ai/browse/install.ps1 | iex。也可以让代理帮你设置。",
"请先安装 Chrome 扩展,它会引导你完成其余步骤。如需直接安装 CLI,可使用以下任一命令。",
},
},
apps: {
+1 -1
View File
@@ -198,7 +198,7 @@ export const content = {
allowlists: { title: "允許清單", body: "將工作階段的分頁限制在你指定的網站內。" },
},
install:
"一行指令安裝 Browse,將它加入找到的代理並配對擴充功能。在 Windows 上執行 irm https://opencode.ai/browse/install.ps1 | iex。也可以請代理幫你設定。",
"請先安裝 Chrome 擴充功能,它會引導你完成其餘步驟。如需直接安裝 CLI,可使用以下任一指令。",
},
},
apps: {
@@ -152,6 +152,7 @@ export function extensionMarkdown(slug: ExtensionSlug) {
extension.store && `Add to Chrome from the ${link("Chrome Web Store", extension.store)}.`,
extension.install.lead,
extension.install.command && codeFence("bash", extension.install.command),
extension.install.commands && codeFence("bash", extension.install.commands.map((item) => item.command).join("\n")),
`Source: ${link(extension.source.replace("https://", ""), extension.source)}`,
"## More from Anomaly",
anomalyProducts