> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Script

> Plan your video as a clip script, link each line to timeline items and see when they drift apart.

The clip script is the plan of your video: the idea, the scenes and the exact words to say. It lives next to the timeline, in **Library** → **Script**. You and your agent edit the same script, and every change is one undo step.

Screenshot coming soon

Library Script tab
State: Draft script with a Reference, an Angle and three Beat lines, two of them linked
Highlight: Status chip, Approve button and linked item chips

## Line kinds

Each line has a kind. Pick it in the kind menu at the start of the line.

| Kind | Use it for | Fields |
| - | - | - |
| **Reference** | Notes taken from a reference video | Title, text |
| **Angle** | The chosen idea or hook | Title, text |
| **Beat** | One scene, card or voice-over line | Title, **VO**, **On screen**, **Notes** |
| **Note** | Product context, caption ideas, compliance notes | Title, text |

In a **Beat**, **VO** holds the exact words to speak. **On screen** holds the text shown on the card or text item. Leave **On screen** empty when it is the same as **VO**.

## Write a script

**1. Open the Script tab**

Click **Script** in the Library rail. An empty project shows "No script yet". You can ask your agent to draft one, or write it yourself.

**2. Add lines**

Choose a kind in the **New line kind** menu, then click **Add line**. The new line goes after the line you last worked on.

**3. Fill in the fields**

Type in a field. Your change is saved when you leave the field or press `Ctrl+Enter` (`⌘Enter` on macOS). Press `Esc` to undo the typing.

**4. Order the lines**

Use the up and down arrows on a line to move it. Use the trash button to delete it.

**5. Approve the script**

Click **Approve** when the plan is final. The status chip changes from **Draft** to **Approved**. Click **Back to draft** to reopen it.

Approval is yours: it tells you and your agent that the plan is ready to build. An approved script can also become a project skeleton, see [Reference videos](/docs/library/reference-videos.md).

## Link lines to timeline items

A link connects a script line to the clips, text or voice made from it. CoClip then checks whether they still match.

**1. Select timeline items**

Select one or more items on the timeline, such as a text item and its voice clip.

**2. Link them**

Click **Link selection** (the link button) on the script line.

Linked items show as chips under the line. Click a chip to select that item on the timeline. A chip changes color when something needs your attention:

* **Warning**: the text or voice on the timeline no longer matches the line. For on-screen text, click **Use timeline text** to copy the timeline text into the line. For a voice, regenerate it from the line, see [Media and generate](/docs/library/media-and-generate.md).
* **Missing**: the item was removed from the timeline. Click **×** to unlink it.

A line can also say **Not on screen** or **Not spoken** when part of its text never appears or is never said.

## Expand the script

Click **Expand script** (the expand button at the top right of the tab) to open the script in a large editor. **VO** and **On screen** sit side by side and long text shows in full. Close the dialog to return to the panel.

Screenshot coming soon

Expanded Script dialog
State: Several Beat lines with VO and On screen side by side
Highlight: Expand script button

## Send a line to your agent

Drag the grip handle at the left of a line onto the **AI** dock. The agent receives a reference to that line, so you can say "rewrite this beat" without copying the text.

## Related

* [AI dock](/docs/ai-agents/ai-dock.md): talk to your agent next to the timeline.
* [Example prompts](/docs/ai-agents/example-prompts.md): prompts for drafting and building from a script.
* [Reference videos](/docs/library/reference-videos.md): turn a video you like into a script and a project skeleton.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.