import React from 'react'; import { RiFileCopyLine, RiCheckLine, RiExternalLinkLine } from '@remixicon/react'; import { isDesktopShell, isTauriShell } from '@/lib/desktop'; import { Input } from '@/components/ui/input'; import { Button } from '@/components/ui/button'; import { updateDesktopSettings } from '@/lib/persistence'; import { copyTextToClipboard } from '@/lib/clipboard'; import { restartDesktopApp } from '@/lib/desktop'; const INSTALL_COMMAND = 'curl -fsSL https://opencode.ai/install | bash'; const DOCS_URL = 'https://opencode.ai/docs'; const WINDOWS_WSL_DOCS_URL = 'https://opencode.ai/docs/windows-wsl'; type OnboardingPlatform = 'macos' | 'linux' | 'windows' | 'unknown'; type LocalSetupScreenProps = { /** Callback when user goes back */ onBack: () => void; /** Callback when CLI becomes available */ onCliAvailable?: () => void; /** Whether this screen was entered from recovery flow (shows "Connect to Remote" link) */ isFromRecovery?: boolean; /** Callback when user wants to switch to remote */ onSwitchToRemote?: () => void; }; function BashCommand({ onCopy }: { onCopy: () => void }) { return (
curl
-fsSL
https://opencode.ai/install
|
bash
Install OpenCode CLI to continue.
wsl --install in PowerShell.Click to check if OpenCode CLI is available. If successful, you'll automatically enter the main screen.
Prefer to use a remote server?
On Windows, install and run OpenCode in WSL for best compatibility.
If detection fails, set a native path (opencode.cmd/opencode.exe), wsl.exe, or wsl:/usr/local/bin/opencode.
Already installed? Make sure opencode is in your PATH
or set OPENCODE_BINARY environment variable.
If you see env: node: No such file or directory or env: bun: No such file or directory, install that runtime or ensure it is on PATH.