1Sponsor

Embedded Terminal

Embedded PTY terminal panel (requires node-pty peer)

Terminal

Installation

pnpm dlx shadcn@latest add https://termcn.dev/r/embedded-terminal.json

Usage

import { EmbeddedTerminal } from "@/components/ui/embedded-terminal";
<EmbeddedTerminal
  command="bash"
  args={["-c", "echo Hello world"]}
  width={80}
  height={24}
  onExit={(code) => console.log(`Exited with ${code}`)}
/>

API Reference

EmbeddedTerminal

PropTypeDefault
commandstringrequired
argsstring[][]
cwdstringundefined
widthnumber80
heightnumber24
onExit(code: number) => voidundefined