Speaklna with OpenCode
Hear a one-sentence report when OpenCode finishes a turn, and ask it to read things aloud.
Needs the Speaklna app from the Mac App Store, opened at least once, and Node.js 18 or later.
Set it up
npm install -g speaklna
speaklna setup opencode
Or without installing: npx -y speaklna setup opencode. A global install is better, because the hook then points at a stable path.
Setup shows every change first and asks y/N. Originals are saved once as <file>.speaklna-bak.
What it changes
~/.config/opencode/opencode.json (or opencode.jsonc)adds the MCP server (mcp.speaklna) and one entry in instructions, each in a marked block~/.config/opencode/speaklna.mda new rules file, loaded through that instructions entry~/.config/opencode/plugins/speaklna.jsa new plugin that reads the last reply when a session goes idle
If you set OPENCODE_CONFIG_DIR, the files above live there instead.
Test it
Start a new OpenCode session and let it finish one turn, for example by asking a simple question. You should hear something like “OpenCode, myproject: …”. The name after the comma is the folder you ran it in.
To check only that the app and the package are connected, run this in a terminal:
speaklna say "Hello"
If the model did not end its reply with a 🔊 (speaker emoji) line, nothing is spoken. Starting a fresh session makes it read the rule.
Ask it to read something aloud
Setup also gives OpenCode the Speaklna tools. Just ask, for example:
Read the summary above aloud.
OpenCode calls the speak tool and Speaklna reads it with your chosen voice. This is separate from the automatic report. Press ⌥S any time to stop, or ask “stop reading”.
Good to know
- Setup does not create an AGENTS.md. OpenCode would then stop reading your ~/.claude/CLAUDE.md. The rule goes in through the instructions list instead.
- Replies from sub-sessions are not read; only the main session is.
- Reports queue, only the newest per session is kept, and AI is quiet while another app uses the microphone. ⌥T and ⌥S always win. Details.
Uninstall
speaklna uninstall opencode
It lists what it will remove for OpenCode and asks first. Only what setup added is removed.