diff options
| author | Daniel Polito <[email protected]> | 2026-01-05 14:07:46 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-06 01:07:46 +0800 |
| commit | 8e9a0c4ad014eb54d7ddd8de3b5f321de931f2f7 (patch) | |
| tree | 6d999aaf07fe3382a6aac28c3c47a03648cdd0cd /packages/desktop/src/cli.ts | |
| parent | ced093e64641de9e4fb7ed100325c3ffe730cc5c (diff) | |
| download | opencode-8e9a0c4ad014eb54d7ddd8de3b5f321de931f2f7.tar.gz opencode-8e9a0c4ad014eb54d7ddd8de3b5f321de931f2f7.zip | |
Desktop: Install CLI (#6526)
Co-authored-by: Brendan Allan <[email protected]>
Diffstat (limited to 'packages/desktop/src/cli.ts')
| -rw-r--r-- | packages/desktop/src/cli.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/desktop/src/cli.ts b/packages/desktop/src/cli.ts new file mode 100644 index 000000000..965ed6ddc --- /dev/null +++ b/packages/desktop/src/cli.ts @@ -0,0 +1,13 @@ +import { invoke } from "@tauri-apps/api/core" +import { message } from "@tauri-apps/plugin-dialog" + +export async function installCli(): Promise<void> { + try { + const path = await invoke<string>("install_cli") + await message(`CLI installed to ${path}\n\nRestart your terminal to use the 'opencode' command.`, { + title: "CLI Installed", + }) + } catch (e) { + await message(`Failed to install CLI: ${e}`, { title: "Installation Failed" }) + } +} |
