import React from 'react'; import { RiFileCopyLine, RiCheckLine, RiExternalLinkLine } from '@remixicon/react'; import { isDesktopShell, isTauriShell, startDesktopWindowDrag } 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'; const INSTALL_COMMAND = 'curl -fsSL https://opencode.ai/install | bash'; const POLL_INTERVAL_MS = 3000; 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 OnboardingScreenProps = { onCliAvailable?: () => void; }; function BashCommand({ onCopy }: { onCopy: () => void }) { return (
curl
-fsSL
https://opencode.ai/install
|
bash
OpenCode CLI
wsl --install in PowerShell.Waiting for OpenCode installation...
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.