Interactive Fiction Engine

Write interactive fiction
in plain text

Kiny is a markup language for writing interactive fiction, with an engine, reader, and editor. A story is a .kin plain-text file that branches via choices and conditions — the reader's choices decide where it goes. Cross-platform, and friendly to Chinese.

Kiny
.kin · plain text · open source
Sample story

Night at the Foggy Harbor

A complete short piece written in Kiny — read it right in your browser.

“The last steamer drops you on the foggy harbor's pier, and in a blink the night fog swallows it whole.”

Interactive short

A foggy harbor night, a secret handoff

A steampunk harbor night. Commissioned by the Aether Engineering Academy, you must deliver a blueprint to a contact known as “Grey Falcon” — but the one who shows up may not be trustworthy.

Observe and probe in conversation; every choice changes where the story goes.

Start reading No install — runs in the browser.
Features

One plain-text file, a story that branches

Kiny keeps a story's text, choices, and state in one .kin file, with a companion editor that previews as you write.

Kiny Editor
Kiny desktop editor interface

Desktop editor · file tree on the left, editing in the middle, live preview on the right, instant syntax and semantic checks at the bottom.

01

Branching choices

Let readers decide with choices; different picks lead to different content and endings.

02

Variables and conditions

Track what the reader has been through, then show or hide content and steer what comes next.

03

Plain-text format

A story is a .kin text file — write it in any editor, friendly to version control.

04

Chinese & cross-platform

Supports Chinese punctuation and Chinese identifiers; works in the browser, on Windows, and macOS.

Syntax

A piece of .kin source

The source, side by side with how it plays for the reader.

foggy-harbor.kin
=== before_setting_out ===
* {!know_geo} [Spread out the map you carry]
  > By lamplight you unfold the oilcloth map.
  > A string of ports along the coastline…
  > ~ know_geo = true
  > -> before_setting_out
* [Pack up and push open the Rusty Anchor's door] -> sit_down
The reader sees

Linger a moment on the docks. Get your bearings in this foggy city first, or push straight into the tavern?

[ Spread out the map you carry ]
[ Pack up and push open the Rusty Anchor's door ]
{!know_geo} makes “look at the map” appear only when you haven't yet; ~ know_geo = true records the state, -> before_setting_out loops back so the option disappears, and -> sit_down moves to the next chapter.
=== chapter === knot * choice {!cond} condition ~ var = variable -> divert
Companion tools

Engine, reader, and editor

The same .kin story runs in the tools below.

Kiny Reader · Night at the Foggy Harbor
Kiny desktop reader reading Night at the Foggy Harbor

Desktop reader · immersive reading of Night at the Foggy Harbor, with prose and choices unfolding by scene.

ENGINE

Engine

The core that reads .kin and runs the story: parsing, static checks, runtime, and a terminal player.

WEB-READER

Web reader

A reader in the browser that can be built into a static site (this site's demo is powered by it).

READER

Desktop reader

A Tauri 2 desktop reader for offline reading.

MOBILE READER

Mobile reader Planned

Read on mobile devices and pick up an unfinished story anytime, anywhere.

EDITOR

Desktop editor

A Tauri 2 desktop editor for writing .kin with instant preview.

MOBILE EDITOR

Mobile editor Planned

Write and revise .kin stories on a phone or tablet.

Roadmap

Where we're headed next

The following capabilities are planned.

01AI support
02Mobile editor
03Mobile reader
04Export as a website
05Export as a desktop app
06Export as a mobile app
07More styles
···and more
Open source

Fully open source, ready to use

Kiny is fully open source, hosted on GitHub. The desktop editor and reader are available to download — no need to build them yourself.