{"_id":"@amabush/runcommand-opencode","_rev":"3-89032714449ee5114a468399dce998e0","name":"@amabush/runcommand-opencode","dist-tags":{"latest":"0.3.1"},"versions":{"0.2.0":{"name":"@amabush/runcommand-opencode","version":"0.2.0","author":"Amir Abushanab","license":"MIT","_id":"@amabush/runcommand-opencode@0.2.0","maintainers":[{"name":"amabush","email":"amabush@outlook.com"}],"homepage":"https://github.com/Amir-Abushanab/runcommand/tree/main/integrations/opencode","bugs":{"url":"https://github.com/Amir-Abushanab/runcommand/issues"},"dist":{"shasum":"29d658a20572d432dfe0a1d63764ef21540fa189","tarball":"https://registry.npmjs.org/@amabush/runcommand-opencode/-/runcommand-opencode-0.2.0.tgz","fileCount":5,"integrity":"sha512-venVHlFfosZYo/a+M2DfJh3jERGy83OY3qe8Wc0WZPw6dmJfBAmh2higOdJiEfrYjXD/PPbNBrfqYsuGuE/Nxg==","signatures":[{"sig":"MEYCIQChPjlfueaUyHtPEZQQyh0U/oxosulCX4m8VeqI++CRFwIhAJg9r723TQK/wZsrKhb0mTbBTt+4y2keRNuNqOvluFxR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11405},"type":"module","exports":{"./tui":"./tui.tsx"},"_npmUser":{"name":"amabush","email":"amabush@outlook.com"},"repository":{"url":"git+https://github.com/Amir-Abushanab/runcommand.git","type":"git","directory":"integrations/opencode"},"description":"OpenCode TUI plugin: shows the project's run command + clickable live localhost ports (powered by runcommand).","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@opencode-ai/plugin":"^1.18.10"},"peerDependencies":{"solid-js":"^1.9.14","@opentui/solid":"^0.4.5"},"_npmOperationalInternal":{"tmp":"tmp/runcommand-opencode_0.2.0_1787228102250_0.16949992882538","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@amabush/runcommand-opencode","version":"0.3.0","author":"Amir Abushanab","license":"MIT","_id":"@amabush/runcommand-opencode@0.3.0","maintainers":[{"name":"amabush","email":"amabush@outlook.com"}],"homepage":"https://github.com/Amir-Abushanab/runcommand/tree/main/integrations/opencode","bugs":{"url":"https://github.com/Amir-Abushanab/runcommand/issues"},"dist":{"shasum":"1216e7340d5177cdfe40fe84a215bed1cdc25a49","tarball":"https://registry.npmjs.org/@amabush/runcommand-opencode/-/runcommand-opencode-0.3.0.tgz","fileCount":4,"integrity":"sha512-yEBDwGwD8k8BeYIahNUr85PgA7GlIVqZZyVK0akP3P5aTVvUJxcvEysrBTIzc5ZOYX4ahtRIKJoZ509p7jflYA==","signatures":[{"sig":"MEYCIQCeFhBak6r3ZqgBMX7uv/DgE3VCum972CbZ9mleCB3yBAIhAOETLOm4yuSj2e1xF0il5UAEyPYH/7o0ZE6VbxHvbSxh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@amabush%2fruncommand-opencode@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":14251},"type":"module","exports":{"./tui":"./dist/tui.js"},"scripts":{"build":"bun run build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1d88af89-1bf1-48c4-8796-6d81239db098"}},"repository":{"url":"git+https://github.com/Amir-Abushanab/runcommand.git","type":"git","directory":"integrations/opencode"},"description":"OpenCode TUI plugin: shows the project's run command + clickable live localhost ports (powered by runcommand).","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@opencode-ai/plugin":"^1.18.10"},"peerDependencies":{"solid-js":"^1.9.12","@opentui/core":">=0.4.5","@opentui/solid":">=0.4.5"},"_npmOperationalInternal":{"tmp":"tmp/runcommand-opencode_0.3.0_1787304625498_0.7850429944883988","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@amabush/runcommand-opencode","version":"0.3.1","description":"OpenCode TUI plugin: shows the project's run command + clickable live localhost ports (powered by runcommand).","author":"Amir Abushanab","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Amir-Abushanab/runcommand.git","directory":"integrations/opencode"},"homepage":"https://github.com/Amir-Abushanab/runcommand/tree/main/integrations/opencode","bugs":{"url":"https://github.com/Amir-Abushanab/runcommand/issues"},"publishConfig":{"access":"public"},"type":"module","exports":{"./tui":"./dist/tui.js"},"peerDependencies":{"@opentui/core":">=0.4.5","@opentui/solid":">=0.4.5","solid-js":"^1.9.12"},"devDependencies":{"@opencode-ai/plugin":"^1.18.10"},"scripts":{"build":"bun run build.mjs"},"_nodeVersion":"24.19.0","_id":"@amabush/runcommand-opencode@0.3.1","dist":{"integrity":"sha512-/AHZcV62FrY6IiVwGhCXm5bOLAXRPZllUBJF6QN+bO4NtBEX7CTnoUIBbQapPROi6K/YASYQ81jIjPlavt+Svg==","shasum":"20313da871960b688bde802efccfaa09365ae918","tarball":"https://registry.npmjs.org/@amabush/runcommand-opencode/-/runcommand-opencode-0.3.1.tgz","fileCount":4,"unpackedSize":14300,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@amabush%2fruncommand-opencode@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEr0mhHSMQ0JNkNbVlJcOdKN50WM26uw/8+JmtanmEJ6AiEAqhC/KVMjH0XxwbulnHbCLTkHCYX8lWAVWx6WpXn5rF8="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1d88af89-1bf1-48c4-8796-6d81239db098"}},"directories":{},"maintainers":[{"name":"amabush","email":"amabush@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/runcommand-opencode_0.3.1_1787744603784_0.8627851992831086"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-20T12:15:02.105Z","modified":"2026-08-26T11:43:24.203Z","0.2.0":"2026-08-20T12:15:02.418Z","0.3.0":"2026-08-21T09:30:25.647Z","0.3.1":"2026-08-26T11:43:23.933Z"},"bugs":{"url":"https://github.com/Amir-Abushanab/runcommand/issues"},"author":"Amir Abushanab","license":"MIT","homepage":"https://github.com/Amir-Abushanab/runcommand/tree/main/integrations/opencode","repository":{"type":"git","url":"git+https://github.com/Amir-Abushanab/runcommand.git","directory":"integrations/opencode"},"description":"OpenCode TUI plugin: shows the project's run command + clickable live localhost ports (powered by runcommand).","maintainers":[{"name":"amabush","email":"amabush@outlook.com"}],"readme":"# runcommand — OpenCode plugin\n\nShows the project's run command + **clickable** live localhost ports in the\nOpenCode TUI, in the persistent `app_bottom` slot:\n\n```\n▶ pnpm dev   ◉ :3000 :5173\n```\n\nUnlike Claude Code / Codex, OpenCode has no \"status-line command\" setting — it\nloads **TUI plugins** (Solid components rendered into host slots). This plugin is\nthat thin adapter: it shells out to `runcommand json` for the parts, so all\ndetection, caching, scoping and port filtering stay in the one CLI. Ports are real\nOpenTUI `<a href>` links, so they're clickable with your terminal's modifier\n(**⌘-click** on macOS, **ctrl-click** elsewhere).\n\n## Install\n\nThe plugin needs `solid-js` and `@opentui/solid` resolvable from here. They're\ndeclared as **peer** dependencies on purpose: a second copy of `solid-js` is a\nsecond reactive graph, and a second `@opentui/solid` is a second renderer, so a\nshared copy is the one that works.\n\n**From this checkout**, `pnpm install` at the repo root is enough — this directory\nis a workspace package, so pnpm provides both peers and resolves `@opentui/core`\ninside `@opentui/solid`'s own store directory.\n\n```sh\npnpm install           # from the repo root\n```\n\nDo **not** hand-symlink the peers into `node_modules/` here. That used to be the\nadvice for sharing one copy with another plugin, but pnpm now owns this directory\nand will replace some links and not others — a stale symlink pointing at a since\nemptied directory silently breaks plugin load, with nothing in the TUI to say why.\n\n**Standalone** (not from a checkout), install the peers however your OpenCode\ninstall resolves them:\n\n```sh\nbun install            # in the plugin directory\nbun run build          # bundles tui.tsx -> dist/tui.js\n```\n\n**Register a path that ends at `dist/tui.js`.** Two traps, both silent:\n\n- **A package name doesn't work.** OpenCode resolves plugin specifiers from the project\n  it's running in, not from `~/.config/opencode`, so `@amabush/runcommand-opencode/tui`\n  isn't on the resolution path and is simply never found — no error, no plugin.\n- **The path must reach the file.** `exports` maps `./tui` to the bundle, but exports\n  apply to package specifiers only, never to paths; a path stops at plain file\n  resolution.\n\n**The build is required, not optional.** `dist/` is what `exports` points at, and it\nisn't committed. It also isn't just a compile step: the bundle is produced with\n`--conditions=browser`, which pins the build to the **client** flavor of the bits it\nbundles. Loaded from source, `solid-js` resolves through the `node` condition to\n`dist/server.js` — Solid's server-rendering build, whose effects never run. The plugin\nthen loads, registers its slot, renders once with no data, and never updates again: an\nempty footer with no error anywhere.\n\n`solid-js`, `@opentui/solid`, `@opentui/core` and `@opencode-ai/plugin` are all\n**external** — the host provides them, and sharing one copy is what makes the plugin\nwork at all. Two traps hide here:\n\n- A second `solid-js` is a second reactivity graph. The host mounts slot content on its\n  own initial pass and skips an empty contribution; it can only re-mount later if the\n  *same* graph sees the signal change. Bundling our own copy would make the update fire\n  in an isolated graph the host's tree never reads — an empty footer even though the\n  bundle proves itself \"reactive\".\n- A second `@opentui/solid` (or `@opentui/core`) is a second renderer.\n\nWhen installed from npm these all come in as peer dependencies. From a checkout, the\nhost's copy is picked up via its own `node_modules` resolution at load time.\n\nThen register it in `~/.config/opencode/tui.json` (append — don't remove other\nplugins):\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/tui.json\",\n  \"plugin\": [\"/absolute/path/to/runcommand/integrations/opencode/dist/tui.js\"]\n}\n```\n\nRestart the OpenCode TUI.\n\n### Finding the CLI\n\nThe plugin shells out to `runcommand`, and looks for it in two places: the\nsibling checkout (`../../bin/runcommand.mjs`) when this directory lives inside the\nrepo, and otherwise plain `runcommand` on your `PATH`. So a clone works with no\nsetup, and a standalone install works as long as the CLI is installed too.\n`RUNCOMMAND_CMD` overrides both.\n\nPublished as [`@amabush/runcommand-opencode`](https://www.npmjs.com/package/@amabush/runcommand-opencode),\nso it can be installed without a checkout — as long as the CLI\n(`@amabush/runcommand`) is installed too:\n\n```sh\ncd ~/.config/opencode && npm i @amabush/runcommand-opencode\n```\n\nThen point `tui.json` at the installed file, **not** at the package name:\n\n```json\n{ \"plugin\": [\"/Users/you/.config/opencode/node_modules/@amabush/runcommand-opencode/dist/tui.js\"] }\n```\n\n## Config (env)\n\n| Var | Default | Purpose |\n| --- | --- | --- |\n| `RUNCOMMAND_CMD` | (auto) | Override how the CLI is invoked. Default: `../../bin/runcommand.mjs` under the current runtime when that sibling exists, else `runcommand` from `PATH`. |\n| `RUNCOMMAND_OPENCODE_REFRESH_MS` | `5000` | How often the line re-reads state. |\n\nEverything else (model, overrides, port filtering) is controlled by the CLI — see\nthe top-level [README](../../README.md).\n\n## Notes\n\n- The plugin only renders when there's something to show (run command, ports, or\n  a \"detecting…\" state); otherwise the slot is empty.\n- It reads the project directory from `api.state.path.directory`, so it follows\n  you as you switch worktrees.\n","readmeFilename":""}