Knot

A Twine IDE that actually understands your story. A Rust language server models your project as a graph of passages and tracks variables as they flow — giving you navigation, diagnostics, and insight that pattern-matching alone can't provide.

Why Knot

The bulk of Knot lives in a language server written in Rust that talks to editors through the Language Server Protocol. That design choice matters: Knot is not strictly tethered to VS Code. The VS Code extension is its first host, but the same Rust core can power other editors — and, in time, become a standalone IDE for Twine.

Structural understanding

Knot parses your project into passages and the links between them. It can answer questions like "where is this variable set?" or "is this passage reachable?" — questions that pure text matching gets wrong.

Variable tracker

See where every variable is set, read, and how it flows across passages. For SugarCube, tracking is JavaScript-aware via the oxc parser, so it understands <<set $x to 1>>, <<run $x++>>, and JS inside <<script>> blocks.

Passage diagnostics

A dedicated panel inspects any passage's links, variables, macros, and complexity. Real-time diagnostics cover broken links, unreachable passages, uninitialized variables, duplicates, and dead ends.

Story Map

An interactive graph visualization of your project. Nodes are passages, edges are links. Click any node to jump to that passage. The map is primarily for visualization and navigation today; deeper editing is planned.

Incremental analysis

Only affected passages are re-parsed after each keystroke, so large projects stay responsive even as your story grows into hundreds of passages.

Build & play, no setup

One-click build and play via Tweego. Knot downloads and manages Tweego and story formats for you — no manual compiler setup, no PATH fiddling.

Early development. Knot is still early in development and you may run into bugs or rough edges. Only SugarCube 2 has full language features today. Harlowe, Chapbook, and Snowman are placeholder implementations — the build pipeline works for all formats, but language features are not yet built out.

This is also the best time to get involved. The codebase is still small and the technical debt is low, so feature requests and design input from early users have an outsized impact on where Knot goes. Find us on Discord →

Get started in 60 seconds

  1. Install Knot from the VS Code Marketplace (search "Knot").
  2. Open a folder containing .tw or .twee files.
  3. Click Build in the status bar — Knot downloads Tweego and the right story format on first run.
  4. Click Play to open the compiled story in your browser.

Read the full onboarding guide →

Want to help shape Knot?

Knot is a passion project built and maintained by a solo developer. If it makes your interactive fiction workflow better, consider supporting its continued development — every contribution helps fund the format plugins, planned features, and ongoing maintenance.

Patreon Ko-fi Discord