integration
Using OpenCode with Lacy Shell
Type questions in your terminal. They go to OpenCode automatically.
How it works
When OpenCode is your active AI tool, Lacy routes natural language queries using opencode run -c "your query". You don’t type opencode yourself. Just type your question and press enter.
Shell commands still run normally. ls -la runs in your shell. “What files changed today?” goes to OpenCode. The indicator next to your prompt shows which will happen.
Setup
- Install Lacy:
curl -fsSL https://lacy.sh/install | bash - Install OpenCode (see opencode-ai/opencode)
- Set OpenCode as your tool:
tool set opencode
Or skip step 3. If OpenCode is the only AI CLI installed, Lacy auto-detects it.
Background server (preheating)
OpenCode supports a background server mode. Lacy can start the server on plugin load (opencode serve) so your first query responds instantly instead of waiting for cold start. Enable this in~/.lacy/config.yaml under preheat.eager: true.
What you get
| Without Lacy | With Lacy |
|---|---|
opencode run -c "explain this error" | explain this error |
opencode run -c "refactor this function" | refactor this function |
opencode run -c "write tests for auth" | write tests for auth |
Real-time feedback
As you type, the indicator tells you where your input will go:
- Green = shell (e.g.,
go build) - Magenta = OpenCode (e.g.,
why is this build failing)
No surprises. You always know what will happen before you hit enter.