cli.ts 458 B

12345678910111213
  1. import { invoke } from "@tauri-apps/api/core"
  2. import { message } from "@tauri-apps/plugin-dialog"
  3. export async function installCli(): Promise<void> {
  4. try {
  5. const path = await invoke<string>("install_cli")
  6. await message(`CLI installed to ${path}\n\nRestart your terminal to use the 'opencode' command.`, {
  7. title: "CLI Installed",
  8. })
  9. } catch (e) {
  10. await message(`Failed to install CLI: ${e}`, { title: "Installation Failed" })
  11. }
  12. }