Skip to content

Opencode Tool

An opencode-like tool row: a quiet line with an icon per tool, or a tinted panel with its title on top when it has output or a diff.

On this page

Examples

The shared grammar with the look fixed: the same as <CliToolCall preset="opencode-like" />, so it reads as the opencode-like look on its own or inside a session. Every part in all eight looks is on Agent CLI.

Installation

npx knowns-ui@latest add agent-cli-opencode
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

tool / args
string
Any name (Read, Bash, MyPlugin.search) and what it was called with.
state
"waiting" | "running" | "done" | "failed" | "denied"
Default"done"
Where the call is.
output / streaming
string / boolean
Its output, folded after collapseAfter lines; streaming shows the newest lines.
summary / error
string
The one-line result, or what went wrong.
result
ReactNode
Your own view under the call.
diff
{ path, before, after } | { path, patch }
A change under the call.
collapseAfter
number
Default4
Lines before +N lines.
children
ReactNode
Nested calls.

When to use

When to use

  • Showing a plugin's tool as the opencode-like look prints it.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Opencode Tool to my app and wire it to my own data.
  • I need showing a plugin's tool as the opencode-like look prints it. Set that up with the Knowns UI Opencode Tool.
  • Which Opencode Tool props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "opencode-tool" }) and search_docs({ query: "opencode tool" }).

Need help?

Stuck on Opencode Tool, or found something off? We read every message.