# TerminalScene

Type a command and reveal its output on the Remotion timeline.

Page: https://20cuts.com/docs/components/terminal-scene

## Installation

Run from your product repository:

```sh
npx -y https://20cuts.com/releases/v0.3.0/20cuts-create-0.3.0.tgz video/20cuts
cd video/20cuts
npm ci
npm run studio
```

The installer includes this component, its source dependencies, runnable examples,
and skills for Codex and Claude Code. If 20cuts is already installed, import the
component from its existing source directory.

## Usage

```tsx
import { TerminalScene } from "./system";

export default function VideoScene() {
  return (
    <TerminalScene title="Video workspace" steps={[{command: "npm run studio", at: 0.4, typeSeconds: 1, lines: [{text: "Preview ready.", after: 0.5, positive: true}]}]} />
  );
}
```


## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| steps (required) | TerminalStep[] | None | Commands, typing durations and output rows. |
| title | string | "Product demo" | Window title. |
| accent | string | "#bcf269" | CSS color for prompts and positive output. |
| style | React.CSSProperties | None | Styles applied to the component wrapper. |

Each output row's after value is measured from the end of its command's typing, not from the command start.

## Complete example

This is the source of the fictional component demonstration. Replace its content
with supported behavior and assets from your product.

```tsx
import React, { type CSSProperties, type ReactNode } from "react";

import { AbsoluteFill } from "remotion";

import { TerminalScene } from "./system";

const ink = "#141414", lime = "#b6f36b";

const center: CSSProperties = { display: "flex", alignItems: "center", justifyContent: "center" };

function Stage({ children, dark = false, style }: {
    children: ReactNode;
    dark?: boolean;
    style?: CSSProperties;
}) {
    return <AbsoluteFill style={{ fontFamily: "Arial, Helvetica, sans-serif", color: dark ? "#fff" : ink, background: dark ? ink : "#f7f7f5", ...center, ...style }}>{children}</AbsoluteFill>;
}

export function TerminalSceneExample() { return <Stage><TerminalScene title="Video workspace" steps={[{ command: "npm run studio", at: 0.4, typeSeconds: 1.1, lines: [{ text: "Opening the preview…", after: 0.25 }, { text: "Your first frame is ready.", after: 0.8, positive: true }] }]} style={{ width: 1040, height: 420, fontSize: 30 }}/></Stage>; }
```

Save it as src/TerminalSceneExample.tsx. This demonstration uses
1280×720, 30fps and 180 frames.
For a separate entry point, replace src/index.tsx with this registration, then
run npm run studio:

```tsx
import { Composition, registerRoot } from "remotion";
import { TerminalSceneExample } from "./TerminalSceneExample";

registerRoot(() => (
  <Composition
    id="TerminalSceneExample"
    component={TerminalSceneExample}
    width={1280}
    height={720}
    fps={30}
    durationInFrames={180}
  />
));
```

## Source

- https://20cuts.com/animation-system/library/source/components.tsx

## Agent instructions

Use the 20cuts TerminalScene component in this project's Remotion composition. Demonstrate a command the product actually supports, then show truthful output after typing finishes. Keep motion frame-driven and put timing in seconds relative to the current Sequence. Use the product's actual copy and assets. Preview the composition before rendering.
