Your First Script
In Yarn, everything is built from nodes and lines. Let’s write a script step by step using Try Yarn Spinner — no installation needed.
Open Try Yarn Spinner, copy this in, then press Run:
title: Start
---
Narrator: Hi, I'm the narrator for the documentation!
===
title and a value. In Try Yarn Spinner, the first node must be called Start.
Add these two new nodes below the first one:
title: Adventure
---
Narrator: We're going to go on an adventure!
===
title: Cave
Narrator: Let's look inside the spooky cave…
Press Run — you’ll notice nothing has changed! That’s because there’s no path from Start to these new nodes yet.

Update your Start node to include a jump command:
title: Start
---
Narrator: Hi, I'm the narrator for the documentation!
<<jump Adventure>>
===
<< and >>. The jump keyword tells the runner to continue in a different node, in this case Adventure.Press Run again. Now the story continues into the Adventure node after the first line!

Update your Adventure node to offer the player options:
title: Adventure
---
Narrator: We're going to go on an adventure!
-> OK! Let's go!
<<jump Cave>>
-> I don't want to go on an adventure...
Narrator: Oh, OK then.
===
->. All options at the same level are presented together as choices.Cave node.
You just wrote a branching Yarn Spinner script with:
- Nodes — self-contained blocks of dialogue
- Lines — text that gets displayed to the player
- Jump commands — connections between nodes
- Options — choices that let the player shape the story
That’s the foundation of everything in Yarn Spinner. Here’s the complete script — hit play to try it:
title: Start
---
Narrator: Hi, I'm the narrator for the documentation!
<<jump Adventure>>
===
title: Adventure
Narrator: We're going to go on an adventure!
-> OK! Let's go!
<<jump Cave>>
-> I don't want to go on an adventure…
Narrator: Oh, OK then.
title: Cave
Narrator: Let's look inside the spooky cave…