Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pompom454/tea/llms.txt

Use this file to discover all available pages before exploring further.

Tea is distributed as a single format.js file. You can grab a prebuilt release from the GitHub releases page or build it from source. Once you have the file, follow the steps below for your authoring tool.
Twine 2 (version 2.1 and later) ships with a bundled story format, but you can add Tea alongside it. There are two ways: install a local copy you downloaded, or point Twine 2 at a CDN URL.
1

Download the release archive

Go to the Tea releases page and download the latest ZIP archive for Twine 2. There are separate archives for Twine ≥2.1 and Twine 2.0 — make sure you pick the one that matches your version.
2

Extract the archive

Unzip the archive to a stable location on your computer. Keep all the files together inside the extracted directory; note the full path to format.js.
3

Open the Formats dialog

Launch Twine 2 and click Formats in the sidebar.
4

Add the format

In the dialog that opens, click the Add a New Format tab. Paste a file:// URL pointing to format.js into the text box and click +Add.Construct the URL from the path you noted in step 2:
file:///home/soandso/Twine/StoryFormats/tea/format.js
On Unix-like systems, if your path contains shell escape sequences, convert them to percent-encoded form before pasting (for example, a space becomes %20).
5

Select Tea as the story format

Open your story in Twine 2, click Story in the toolbar, then Change Format, and select Tea.

Build from source

If you prefer to build Tea yourself rather than use a prebuilt release, you need Node.js ≥18.3.0 and Git.
1

Clone the repository

git clone https://github.com/pompom454/tea.git
cd tea
2

Check out the branch you want

The repository has two main branches: develop (active development) and master (stable releases). Switch to whichever you need:
git checkout master
3

Install dependencies

npm install
4

Run the build

node build.js
On success, both the Twine 1 and Twine 2 versions of the format are written to the build directory.
Run node build.js --help to see additional options such as debug builds or limiting output to a single Twine version.
Tea’s development dependencies are occasionally updated. If you get build errors, run npm update --save -D to refresh them. In persistent cases, run npm uninstall followed by npm install.

Build docs developers (and LLMs) love