Registry / ai-ml / opencode-q

opencode-q

JSON →
library1.1.4jsnpmunverified

opencode-q is a prompt queue plugin for OpenCode (an AI coding assistant) that provides a web-based UI at http://localhost:4321 to manage per-session prompt queues. Developers can stage prompts, send them one-by-one, and track status (queued → pending → sent → done/failed) across multiple projects and sessions. v1.1.4 (latest) uses Bun and must be installed globally. It persists all state to disk, surviving OpenCode restarts. Unlike CLI-based prompts, this is a pure web interface with no TUI commands. Alternative to manually copying prompts or using OpenCode's built-in chat without queuing.

npm install opencode-q
INSTALL
IMPORT
SIG · OPENCODE-Q
O
opencode-q
ai-mljavascriptv1.1.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import opencodeQ from 'opencode-q'
const opencodeQ = require('opencode-q')
The plugin is a global npm package; import is only for type definitions. The actual usage is via web UI after global install.
runQueue
import { runQueue } from 'opencode-q'
const { runQueue } = require('opencode-q')
runQueue is an internal function, not meant to be called directly. Use the web UI.
QueueStatus
import type { QueueStatus } from 'opencode-q'
import { QueueStatus } from 'opencode-q'
QueueStatus is a type, use type import for TypeScript.

Global install via npm, then open the web UI to manage prompt queues with per-session tracking.

npm install -g opencode-q # Ensure OpenCode is running in at least one project open http://localhost:4321 # In browser, select project and session, then: # - Add prompts (they appear as 'queued') # - Click 'Send' to send each prompt one-by-one # - Track status: queued → pending → sent → done/failed # - Reorder, edit, delete queued items; retry failed ones
Debug
Known issues
breakingMust be installed globally (npm install -g). Local per-project install is not supported.
fix
Use npm install -g opencode-q instead of npm install opencode-q in a project.
affects: >=1.0.0
gotchaWeb UI only works while at least one OpenCode instance is running. If all instances are closed, http://localhost:4321 becomes unreachable.
fix
Keep OpenCode open in at least one project. If stuck, restart OpenCode.
affects: >=1.0.0
gotchaPort 4321 must be free. If another process uses it, the web UI fails to start.
fix
Kill the process using port 4321 or configure OpenCode to use a different port (not directly supported yet).
affects: >=1.0.0
gotchaSession queues are independent per OpenCode instance. Reopening the same project in a new instance creates a separate queue.
fix
Use a single OpenCode instance per project to keep session queues consistent.
affects: >=1.0.0
Errors
Common errors & fixes
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/opencode-q'
Global install without sudo on macOS/Linux.
fix
Run with sudo: sudo npm install -g opencode-q
ReferenceError: Bun is not defined
OpenCode requires Bun runtime to run plugins. The plugin is run inside OpenCode's Bun context, but if you try to import directly in Node.js, it fails.
fix
Do not import opencode-q directly in Node.js. Only use it via OpenCode.
Cannot find module 'opencode-q'
Plugin not installed globally.
fix
Run npm install -g opencode-q
Upgrade
Version history
1.1.4latest on npm
Audit
Dependencies
opencoderequiredRuntime dependency: OpenCode must be installed and running for the plugin to function
Agent activity
30 hits · last 30 days
node
24
Amazon
1
OpenAI (training)
1
Resources
opencode-q — npm install opencode-q · libregistry