Squiffy
Squiffy is a free, open source tool for creating multiple-choice interactive stories. Write your story in a simple text format and publish it as HTML.
Squiffy 7 brings a new editor, a desktop app, a VS Code extension, a story map, importing from Twine and Quest, and many additions to the language: see What's new. Squiffy 6 stories still work in Squiffy 7. Squiffy 6 was a complete rewrite of Squiffy 5.
Quick Example
You wake up in a dark room. There is a [[door]] to the north and a [[window]] to the east.
[[door]]:
You open the door and step into a hallway. A [torch] flickers on the wall.
[torch]:
You grab the torch. It illuminates the hallway, revealing a staircase leading down.
[[window]]:
You look through the window. Moonlight streams in, but the glass is too thick to break.
Sections ([[door]]) are major story divisions - navigating to a new section disables all previous links. Passages ([torch]) are sub-divisions within a section where links remain clickable, allowing exploration within that section.
Getting Started
The easiest way to get started is with the web editor. For full documentation, see squiffystory.com.
Command-line usage
You can also compile and preview Squiffy stories from the command line:
npx @textadventures/squiffy-cli story.squiffy -s
The command-line tool can also check a story for problems (--check), play it as text (--play) or at random to find dead ends (--random), with --json output for AI agents, and convert stories from Squiffy 5 and 6, Twine and Quest. See Using Squiffy from the command line for all the options.
Writing with AI
This repo is also a Claude Code plugin marketplace, with a Squiffy skill for an agent helping you write a story:
/plugin marketplace add textadventures/squiffy
/plugin install squiffy@squiffy
See Writing with AI.
Features
- Sections and passages for structuring stories, which can be split across several files
- Variables, calculations, arrays and objects
- Conditional text and logic, with Handlebars-style helpers
- Dynamic text: animations, transitions, text effects, random text, live updates and timed text
- Player text input
- Images, music, sound and fonts
- Markdown formatting
- JavaScript integration
- Published stories with a Back button, saved games, panels, player settings and dark mode
- An editor that finds problems as you type, with a story map and an outline
- Import from Twine (Harlowe or SugarCube) and Quest gamebooks
- Multiple export formats (HTML files, single HTML file, zip)
- Embeddable in custom web pages via the runtime API, or in a web app with the Vite plugin
Development
This is a Lerna-managed monorepo. After cloning:
npm install
npm run build
npm install # run again to register local packages
Run the editor locally with npm run dev in app/, and the docs site with npm run dev in site/. ./electron.sh builds and runs the desktop app.
Packages