Documentation menu

Introduction

Install

osf is a single binary with no dependencies. It formats, validates and builds Open Story projects.

macOS and Linux

$ curl -fsSL https://openstoryfoundation.com/install.sh | sh

The script picks the build for your system and CPU, checks it against the release checksums, and puts osf in ~/.local/bin. If that folder is not on your PATH, the script tells you the line to add.

Windows

In PowerShell:

> irm https://openstoryfoundation.com/install.ps1 | iex

This puts osf.exe in %LOCALAPPDATA%\Programs\osf and adds that folder to your user PATH. Open a new terminal afterwards.

Check the install

$ osf version
osf v0.6.0
language 1, plugins: story/v1, dialogue/v1, i18n/v1

Next, write your first project.

Options

Both scripts read two environment variables:

VariableDefaultWhat it does
OSF_VERSIONlatestInstall a specific version, such as 0.1.0.
OSF_INSTALL_DIR~/.local/bin, or %LOCALAPPDATA%\Programs\osf on WindowsWhere to put the binary.
$ curl -fsSL https://openstoryfoundation.com/install.sh | OSF_VERSION=0.1.0 sh

Download manually

Download the archive for your system. The links always point at the latest release; checksums.txt has their SHA-256 sums. Earlier versions are at https://openstoryfoundation.com/cli/<version>/, for example /cli/0.1.0/.

SystemFile
macOS, Apple siliconosf_darwin_arm64.tar.gz
macOS, Intelosf_darwin_amd64.tar.gz
Linux, x86-64osf_linux_amd64.tar.gz
Linux, ARM64osf_linux_arm64.tar.gz
Windows, x86-64osf_windows_amd64.zip
Windows, ARM64osf_windows_arm64.zip

Unpack the archive and move osf (or osf.exe) to a folder on your PATH. On macOS, a binary downloaded with a browser is quarantined; clear that with xattr -d com.apple.quarantine osf. The install script downloads with curl, so it does not need this step.

Update and uninstall

Run the install command again to update to the latest version. To uninstall, delete the osf binary.

Editor support

For VS Code, install the Open Story Format extension from the Marketplace, or run code --install-extension lostwood.osf. It highlights .osf files and adds folding, bracket matching, comment toggling and two-space indentation, the layout osf fmt writes.