Skip to main content

Crate okf_studio

Crate okf_studio 

Source
Expand description

§okf-studio: an interactive terminal studio for OKF bundles

okf studio is the resident form of the okf engine: one process that holds a live, continuously re-validated model of a bundle and lets you navigate, audit, and refactor it interactively.

The crate is a library with a single entry point, run; the okf CLI’s studio subcommand (and cargo okf studio) are thin wrappers around it.

Architecture: Elm-style unidirectional flow. The UI thread owns app::App and renders from an immutable snapshot::Snapshot; a worker thread performs every load and write; a polling watcher reports external edits. See the workspace design document for the full picture.

Modules§

app
The application model: state, messages, commands, and the reducer.
graph
The bundle’s link graph: model extraction and force-directed layout.
keymap
The keybinding table: context → key → action, with a primary/alias flag.
markdown
A purpose-built markdown → styled-lines renderer for the document pane.
search
Fuzzy matching, the omnisearch index, and the shared query syntax.
snapshot
The immutable world model: one internally consistent view of the bundle, rebuilt in whole on the worker thread.
theme
The studio’s visual vocabulary: one glyph-and-color encoding per semantic dimension, used identically in every workspace.
ui
The view layer: every function here is a pure render of (&App, Frame).
watch
A std-only polling file watcher.
worker
The background worker: every disk touch — loads, refactors, fixes, and structured frontmatter edits — happens here, never on the UI thread.

Structs§

StudioOptions
Launch options for the studio.

Enums§

Tab
The four studio workspaces.

Functions§

run
Runs the studio over the bundle at options.root. Returns the process exit code.