Themes
- Default
- Catppuccin
- Dracula
- High Contrast
- High Contrast Light
- Monokai
- Nord
- One Dark
- Solarized
- Tokyo Night
- AMOLED
- Aura
- Ayu
- Carbonfox
- Catppuccin Frappe
- Catppuccin Macchiato
- Cobalt2
- Cursor
- Everforest
- Flexoki
- GitHub
- Gruvbox
- Kanagawa
- Lucent Orng
- Material
- Matrix
- Mercury
- Night Owl
- OC-2
- One Dark Pro
- OpenCode
- Orng
- Osaka Jade
- Palenight
- Rose Pine
- Shades of Purple
- Synthwave '84
- Vercel
- Vesper
- Zenburn
Utility
AI
Terminal
tool-approval-demo
No opentui live preview is registered for this example yet.
Installation
$ pnpm dlx shadcn@latest add @termcn/tool-approval
Usage
import { ToolApproval } from "@/components/ui/tool-approval";<ToolApproval
name="execute_shell"
description="Run a shell command on the host machine"
args={{ command: "rm -rf ./dist" }}
risk="high"
onApprove={() => console.log("approved")}
onDeny={() => console.log("denied")}
timeout={30}
/>API Reference
ToolApproval
| Prop | Type | Default |
|---|---|---|
name | string | required |
description | string | - |
args | Record<string, unknown> | - |
risk | "low" | "medium" | "high" | "low" |
onApprove | () => void | required |
onDeny | () => void | required |
onAlwaysAllow | () => void | - |
timeout | number | - |