Snowman
October 18, 2025 ยท View on GitHub
Snowman is an advanced Twine 2 story format designed for people who already know JavaScript and CSS. It was originally created by Chris Klimas and is currently maintained by Dan Cox.
Want to learn more?
The official Snowman documentation has more details.
What does Snowman offer?
Snowman does not use macros as found in sister story formats Harlowe and SugarCube. Instead, it provides template tags, <% ... %>, and a JavaScript API for accessing and manipulating the current story and its passages.
It also includes the JavaScript library jQuery.
Installing Snowman in Twine
To use Snowman as a story format in Twine 2:
- Open Twine 2.
- Go to Twine in the top-level menu.
- Click on Story Formats.
- In the sidebar, click on Add.
- Enter the JSONP URL for the version you want to use from the builds page
For example, to install the latest 2.X version, use:
https://videlais.github.io/snowman/builds/2.X/format.js
Major Branches
Snowman development is organized into major version branches:
- 1.X Branch - Legacy version
- 2.X Branch - Current stable version
- Main Branch - Development version
Building Snowman
To create a new build of Snowman from this repository:
-
Install dependencies:
npm install -
Run the build process:
npm run build -
Package the story format:
npm run package
The compiled story format will be available in the dist/ directory as format.js.
Development Workflow
For a complete build including linting and testing, use:
npm run all
For validation without coverage (faster):
npm run validate
For complete validation with coverage:
npm run validate:full
Testing
Run unit tests:
npm test
Run end-to-end tests (requires compiled HTML files):
npm run test:e2e
Compile e2e test files and run tests in one command:
npm run test:e2e:compile
Run all tests with coverage:
npm run test:all
End-to-End Testing
The e2e tests require HTML files to be compiled from .twee source files using ExTwee. The repository includes a compilation script:
bash compile-e2e-tests.sh
This script compiles all .twee files in the test/e2e/ directory to HTML files using the current story format. The test:e2e:compile npm script combines this compilation step with test execution for convenience.