Skip to content

dalekirkwood/opencode-btw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

opencode-btw

vibecoded — this entire plugin was built through a conversation with opencode. No manual coding involved.

A /btw command plugin for opencode that replicates the spirit of Claude Code's /btw feature — ask a quick side question without interrupting your main task.

What it does

When you're in the middle of a conversation with opencode and a random question pops into your head, type /btw followed by your question. It runs as a subtask with recent conversation context injected, so the answer is informed by what you're already working on.

/btw what does the bash tool do in this codebase?
/btw remind me, what's the difference between plan and build agents?
/btw how many golf balls fit in a jetta?

The answer appears inline in your chat as a subtask result, and your main session continues uninterrupted.

How it works

This plugin has two parts:

  1. Command (commands/btw.md) — Registers /btw as a custom command that runs as a subtask using the general agent. This means it gets its own child session and doesn't block your main conversation.

  2. Plugin (plugins/btw.ts) — A server-side plugin that hooks into command.execute.before. When it detects a /btw command, it grabs the last 10 messages from your current session and injects them as context into the subtask, so the answer is informed by what you're working on.

Install

Copy the files into your opencode config directory:

# Commands
cp commands/btw.md ~/.config/opencode/commands/

# Plugins (requires @opencode-ai/plugin dependency)
cp plugins/btw.ts ~/.config/opencode/plugins/

If you don't already have the plugin SDK installed:

cd ~/.config/opencode
npm install @opencode-ai/plugin

Requirements

  • opencode v1.3.13+
  • @opencode-ai/plugin (install via npm in your config directory)

How it differs from Claude's /btw

Claude Code's /btw is a deeply integrated UI feature that spawns a truly parallel session while the main AI is still running. This plugin uses opencode's subtask system, which runs as a child session. It works great for asking questions while idle, but won't run concurrently if your main session is actively processing.

License

MIT

About

A /btw command plugin for opencode — ask side questions without interrupting your main task. Vibecoded.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors