Skip to content

Opencode Permission

The opencode-like permission panel: △ Permission required on an accent edge, and Allow once, Always allow and Reject as chips.

On this page

Examples

The shared grammar with the look fixed: the same as <CliPermission 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
string
The tool asking: its name goes into the session choice.
title / detail
string
What it wants to do, and the command or change as is.
onPick
(choice: "once" | "session" | "deny") => void
The answer. 1-3 or y, a, n pick; the arrows move; Escape says no.
pressed
"once" | "session" | "deny"
A choice shown as pressed (a scripted answer about to land).
autoFocus
boolean
Defaultfalse
Take focus on mount, for keyboard answers.

When to use

When to use

  • Asking before a tool runs, in the opencode-like look.

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 Permission to my app and wire it to my own data.
  • I need asking before a tool runs, in the opencode-like look. Set that up with the Knowns UI Opencode Permission.
  • Which Opencode Permission props do I need for a minimal setup? Show me a short example.

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

Need help?

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