Command

Pro

A command the agent ran: the row reads Ran pnpm test · 4.2 s and folds a well with the command, Copy and what it printed. Running, its output prints in, the clock ticks and Stop ends it; a failure reads red with its exit code.

Pro opens soon
npx shadcn@latest add @pixilui-pro/command

Preview

While it runs, the output prints in line by line and Stop ends it with ^C.
State

When to use

Use it when

  • A command the agent ran in a terminal, with what it printed: tests, a build, a CLI that streams.
  • A long-running command the person may stop.

Use something else when

  • A tool call with JSON arguments and a result: use Tool call.
  • Code the agent wrote: use Code block.

Installation

command.tsx315 linesPro
Pro opens soon

Join the waitlist and we'll email you when PixilUI launches. The preview, props and docs stay open until then.

Pro installs with the same CLI as the free items. One command adds command.tsx and the free button.tsx, the free kbd.tsx, the free tooltip.tsx and the free code-block.tsx it uses; your license key goes in once, as in Installation.

{
  "registries": {
    "@pixilui-pro": {
      "url": "https://pixilui.com/r/pro/{name}.json",
      "headers": { "Authorization": "Bearer ${PIXILUI_TOKEN}" }
    }
  }
}
Terminal
npx shadcn@latest add @pixilui-pro/command

Adds command.tsx with button.tsx, kbd.tsx, tooltip.tsx and code-block.tsx, and installs clsx and tailwind-merge. The CLI reads PIXILUI_TOKEN from .env.local; if this computer has not logged in yet, run npx pixilui@latest login once.

Usage

example.tsx
import { Command } from "@/components/pixilui/command";

<Command
  cmd={cmd}
  onOpenChange={onOpenChange}
  onStop={onStop}
/>

Fills its container; output wraps with a hanging indent, so a wrapped line stays one entry.

API reference

PropTypeDefault
cmdRequiredstring–The command: "pnpm test refunds". The row shows its first two words.
outputstring[][]The lines it printed. While it runs, lines added here print in.
timenumber0How long it ran, in seconds (running: where its clock starts).
state"done" | "running" | "failed" | "stopped""done"done (the default), running, failed or stopped.
exitnumber0The exit code of a command that failed.
defaultOpenbooleantrueOpen (default) or folded, uncontrolled.
openboolean–Open or folded, controlled.

Also takes every native <section> attribute except onToggle, and a ref.

Keyboard

TabReaches the row, Stop while it runs, Copy, and the output (it scrolls past 14 lines).
Enter SpaceFolds or opens the well from its row; stops it; copies the command.

Accessibility

  • The output is a log (aria-live polite while it runs); after Stop focus moves to the row and the status line says how long it ran.
  • Copy copies the command itself; a key in the output (sk_live_, whsec_, ghp_) renders masked, named with its last four.
  • Failed and Stopped are words, not only color.

Motion

  • A new line writes in from its left edge as it prints; the view follows the end unless you scrolled up to read.
  • The clock ticks in tabular figures with no motion of its own; the row's verb and Stop swap with the quiet blur swap.
  • Reduced motion: lines appear at once.
Tool callA secret in a tool's arguments stays masked, and Copy copies the mask, never the key.
Code blockA key in the code renders masked, and Copy copies the mask, never the key.
DiffKeep folds the old lines away, Undo erases the new ones, and the numbers stay right.

PixilUI Pro opens soon. The first 20 licenses are $99.