Documentation index: /llms.txt. Each page is also available as Markdown by adding .md to its URL.

Skip to content
Brief

Terminal

Animated terminal commands and output with shell highlighting and one-click copying.

Create a Brief project

Usage#

Wrap TerminalStep components in Terminal. Give each step a command and write its output in a terminal fence. Omit the fence for commands without output.

Header#

Set title to choose the header text.

Shell#

Set shell to bash for Bash or ps for PowerShell. It controls the prompt prefix and command highlighting. The default is bash.

Working Directory#

Set cwd to show a directory in the prompt. Override it on a step after a directory change.

cwd is display metadata. It does not execute a command or update automatically after cd. It also doesn't affect the copy output.

Height#

Set height=max to reserve space for every response screen. This is the default. Set a pixel height for a fixed, vertically scrollable terminal.

Inline output and imported cast files are compiled into recordings and included in the page response. Playback uses that data directly, without fetching a recording file. Dimensions are checked during compilation, so height=max reserves the output's space before playback starts.

Each recording must fit within the 2 MB limit, including recordings generated from inline output. Cast files are read during the build; changing a file updates the embedded recording when the page is rebuilt.

Long commands and output scroll horizontally together without wrapping.

Compact#

Set compact=true to align the terminal's borders with the text column without changing its inner padding. This only affects desktop layout; mobile terminals remain edge-to-edge.

Custom Input#

Use a terminal fence inside a step for line-by-line output. This format supports plain text, wait directives, and ANSI colors without a separate recording file.

Timing#

Lines in a terminal fence print instantly. Put \-300ms on its own line to wait 300 milliseconds before printing more output.

Empty lines are preserved. Wait directives do not add a line. Use \\-300ms to print a literal \-300ms line. A wait at the end delays the next step.

Colors#

Use ANSI color and style sequences in the output. Write the escape character as \x1b, and use \x1b[0m to reset the style.

Asciinema Recordings#

Use an asciicast .cast file for interactive prompts, per-character output, or progress lines that update in place. Versions 2 and 3 are supported.

  1. Step 1: Prepare the recording#

    Record each command separately so each file contains one step's response.
  2. Step 2: Add the file#

    Place the recording in the application's public folder, such as public/recordings/brief-init.cast.
  3. Step 3: Reference the recording#

    Set src on a TerminalStep to the file's site-root URL. Paths relative to the Markdown file are not supported.

    A step can have a recording or an inline fence, but not both.

Terminal Reference#

syncValueDefault undefined
string

Selection value when this surface is a direct child of synchronized CodeTabs.

titleDefault undefined
string

Header title. Defaults to the shell name when omitted.

shellDefault undefined
"bash" | "ps"

Default shell for the group. Defaults to bash.

cwdDefault undefined
string

Directory displayed before the command. This does not execute a directory change.

compactDefault false
boolean

Align borders with the content column on desktop without changing inner padding. Mobile terminals remain edge-to-edge.

heightDefault undefined
"max" | number

Viewport height in pixels, or max to reserve all response screens. Defaults to max.

TerminalStep Reference#

commandRequired
string

One command line, without the shell prefix. Copying uses this exact text.

shellDefault undefined
"bash" | "ps"

Shell for this command. Defaults to the parent Terminal shell.

cwdDefault undefined
string

Directory displayed before the command. This does not execute a directory change.

srcDefault undefined
string

Site-root URL of a public .cast recording. Use instead of an inline terminal fence.