openpod

An opencode plugin that spins up a dedicated virtual machine for each session to isolate agent work.
git clone https://unitehenry.com/git/openpod.git
Log | Files | Refs | README

commit 86e4c79c888b971470e6a1ee1118a5df46634803
parent d2395d33e79fa43136c4019bc7516ba1e85ba9f0
Author: Henry Unite <unitehenry@gmail.com>
Date:   Sun, 18 Oct 2026 18:05:12 +0000

feat: verify limactl

Diffstat:
Mindex.ts | 20+++++++++++++++++++-
Mscripts/typecheck | 1+
2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/index.ts b/index.ts @@ -1,8 +1,26 @@ import { Plugin } from "@opencode/plugin" +import { execSync } from "child_process" + +function isCommandAvailable(command: string): boolean { + try { + if (process.platform === "win32") { + execSync(`where ${command}`, { stdio: "ignore" }) + } else { + execSync(`command -v ${command}`, { stdio: "ignore", shell: "/bin/sh" }) + } + return true + } catch { + return false + } +} export default Plugin.define({ id: "openpod", async setup(ctx) { - await ctx.storage.set("loaded", true) + if (!isCommandAvailable("limactl")) { + throw new Error( + "`limactl` is not installed. Lima is required for openpod. See https://lima-vm.io/", + ) + } }, }) diff --git a/scripts/typecheck b/scripts/typecheck @@ -14,4 +14,5 @@ npx --yes --package @typescript/native-preview tsgo --noEmit \ --lib esnext \ --esModuleInterop \ --forceConsistentCasingInFileNames \ + --types node \ index.ts