01
Every tool invents its own format.
Studios can’t move content between tools without a rewrite.
OSF is an open, plain-text format for dialogues, characters and translations, with a strict schema and a validator. Any engine or tool can read it, so nobody has to write another exporter.
Spec status: v1
~/story $ osf validate the-last-lighthouse
the-last-lighthouse/arc_1_war/01_intro_scene.osf:24:13: error: OSF113 Node node_03, Option node_03_option_01: next: node "node_05" does not exist in Dialogue 01_intro_scene; did you mean "node_01"?
the-last-lighthouse/arc_1_war/01_intro_scene.osf:33:3: warning: OSF900 Node node_04 in Dialogue 01_intro_scene is never reached
the-last-lighthouse/story.osf:11:10: warning: OSF901 Jpn: 16 of 16 texts untranslated (not enforced)
1 error, 2 warnings.
Written by people. Checked by the validator. Read by every engine.
Versions {
language = "1"
story = "v1"
dialogue = "v1"
i18n = "v1"
}
Dialogue 01_intro_scene {
Node node_03 {
speaker: protagonist
text: "Am I dreaming?"
Option node_03_option_01 {
text: "Yes, you are."
set: { is_dreaming: true }
next: node_04
}
Option node_03_option_02 {
text: "No. Fool"
next: Dialogue.02_shadows_speak
}
}
}apiVersion: dialogue/v1
kind: Dialogue
data:
id: 01_intro_scene
nodes:
node_03:
content:
speaker: Character.protagonist
text: Am I dreaming?
options:
node_03_option_01:
set:
is_dreaming: true
next: node_04
content:
text: Yes, you are.
node_03_option_02:
next: Dialogue.02_shadows_speak
content:
text: No. Foolosf convert writes the resources as JSON or YAML, and a game engine reads them directly.The problem
01
Studios can’t move content between tools without a rewrite.
02
The same integration work is repeated by every vendor, for every engine.
03
So they hesitate to adopt new tools, including yours.
How OSF works
People write the .osf language, a brace-based syntax like Terraform’s HCL. It compiles to OSF resources: one YAML file per resource with apiVersion, kind and data, like Kubernetes manifests, described by a JSON Schema. A tool only has to read and write one of the two layers to interoperate.
Readable by people, diffable in Git, parseable by machines. Write .osf in VS Code with the Open Story Format extension for highlighting, folding and comment toggling. YAML resources get completion and validation in VS Code, JetBrains and Neovim through the JSON Schema.
@@ arc_1_war/01_intro_scene.osf @@
Option node_03_option_02 {
- text: "No. Fool"
+ text: "No, fool."
next: Dialogue.02_shadows_speak
}Every resource’s apiVersion is <plugin>/<version>. One Versions block pins them all, so an upgrade is a one-line change, and a compiler that doesn’t support a listed version stops instead of guessing.
Versions {
language = "1" // version of this syntax
story = "v1" // built in: Story, Character, Document, Variable
dialogue = "v1" // built in: Dialogue
i18n = "v1" // plugin: I18n settings and Locale blocks
}Every text has a stable key. Translations live in one folder per language. Per language, choose whether a missing line is an error or falls back to the source.
I18n {
source = Eng
Locale Rus "Russian" { enforce = true }
Locale Jpn "Japanese"
}| key | Engsource | Rusenforce = true | Jpnfalls back |
|---|---|---|---|
| Dialogue.01_intro_scene.nodes.node_01.content.text | Where am I? | Где я? | → Where am I? |
| Dialogue.01_intro_scene.nodes.node_03.options.node_03_option_01.content.text | Yes, you are. | Да, спишь. | → Yes, you are. |
| Dialogue.01_intro_scene.nodes.node_04.content.text | Strange | Странно | → Strange |
One CLI checks schema, references, variable types and translations, formats files for clean diffs, converts .osf to OSF JSON or YAML resources, and plays a story in the terminal. Install it on macOS, Linux or Windows.
$ osf validate example
example/arc_1_war/01_intro_scene.osf:24:13: error: OSF113 Node node_03, Option node_03_option_01: next: node "node_05" does not exist in Dialogue 01_intro_scene; did you mean "node_01"?
example/arc_1_war/01_intro_scene.osf:33:3: warning: OSF900 Node node_04 in Dialogue 01_intro_scene is never reached
example/story.osf:11:10: warning: OSF901 Jpn: 16 of 16 texts untranslated (not enforced)
1 error, 2 warnings.
$ osf convert example # after fixing the typo
example/story.osf:11:10: warning: OSF901 Jpn: 16 of 16 texts untranslated (not enforced)
Wrote json: 14 files in example-json (2 dialogues, 2 characters, 1 document, 1 variable, 16 texts).Why join
This is an invitation, not a sale. One shared format grows everyone’s market, and nobody has to build it alone.
Studios adopt your tool without migrating content, and can leave without fear, which makes them more willing to come in.
Support OSF once and read content written in every other OSF tool.
OSF is split into versioned plugins (story, dialogue, i18n), so the format grows by adding a plugin or a version, and files written for an earlier one keep their meaning.
Version 1 leaves some things out on purpose: grammatical agreement (gender, plural, case) in references, inline media in text, and richer Document content. Members help decide what a later plugin version adds.
Once your tool’s output passes validation, it appears on the members page.
Why plain text
A writer’s job is the scene, the choice and the line that lands. Not exporters, not broken links, not a missing translation found a week before launch.
OSF keeps the story as plain text with a strict schema, in your own Git repo. The validator catches the broken reference, the unreachable node, the wrong variable type and the missing translation. Every change is reviewed like any other pull request, and the story stays yours.
“The words are yours. The format just carries them.”
Already built on OSF
1Dialogue 01_intro_scene {2 Node node_01 {3 speaker: protagonist4 title: "..."5 text: "Where am I?"6 next: node_027 }89 Node node_02 {10 text: "Total Darkness surrounds you."11 next: node_0312 }1314 Node node_03 {15 speaker: protagonist16 text: """17 What is it all about?18 Am I dreaming?19 """20 ...01_intro_scene.osf in VS Code (code only, with the Open Story Format extension for syntax highlighting) and in LoreHub (visual node editor).How to join
docs/spec.md and schema/osf-v1.schema.json. The format is small: Story, Character, Document, Variable and Dialogue, plus the i18n plugin.
To your tool or engine. Read and write OSF YAML resources, the .osf language, or both.
Run osf validate on your output and on example/ from the spec repository.
Send the form below and get listed as compatible.
Join the foundation
Engine teams and narrative tool makers welcome. We read every request and reply by email.
Or write to hello@openstoryfoundation.com
FAQ
OSF is an open project started by Lostwood Games, the makers of LoreHub, inviting other tools to co-govern the spec.
MIT. The license covers the specification, the JSON Schema, the examples and the osf CLI in the open-story-foundation repository. The Open Story Format extension for VS Code is MIT as well.
Version 1 of the format is out, and the osf CLI is at 0.6.0. Each release adds to the format without changing what earlier files mean, so a project that an earlier osf accepts stays valid. A project pins every plugin version, and osf stops on a version it doesn’t support instead of guessing.
No. LoreHub is the first visual editor built on OSF, and one implementation among the ones we hope to list here. Any editor that reads and writes the format works.
Not as a third-party plugin yet. The format is built from plugins (story, dialogue and i18n are plugins themselves), but this version of osf only knows those, and an unknown plugin is an error (OSF102). Tell us what you need and it can become a plugin version.
Membership terms are not set yet. Write to hello@openstoryfoundation.com and tell us what you are building.
Yes. On macOS or Linux run curl -fsSL https://openstoryfoundation.com/install.sh | sh. For Windows and manual downloads, see Install.
Yes. Install the Open Story Format extension from the VS Code Marketplace, or run code --install-extension lostwood.osf. It highlights the whole .osf language as of OSF 0.6.0 and adds folding, bracket matching and comment toggling. Checking, formatting and playing a story is done by the osf CLI.