caretline 0.3.0

A replayable, drivable text-editing engine: Helix's editing model in a pure Elm architecture. The whole editor is one serializable state; every input is a message.
Documentation

caretline

A standalone text-editing engine: Helix's editing model (rope, multi-range selections, transactions, undo history, grapheme-correct motion, soft wrap) inside a strict Elm architecture. State serializes to JSON and back without loss, update(&mut State, Msg) -> Vec<Effect> is pure and deterministic, and view(&State) -> Frame is a pure cell grid. No terminal I/O and no ratatui.

Scope. caretline is a text-editing engine only: text and navigation, carets and selections, undo and redo, generic structure (marks with payloads, blocks, folds, block operations), views, changes from elsewhere, rendering the editing surface, and state, messages, replay and the protocol. What your text means (tasks, statuses, anything) belongs in your app, added through host commands, input rules, mark payloads and decorations (Extending the engine).

Session wraps a state with a revision counter and the trace of everything applied, and answers the state protocol in process (Session::handle).

The terminal front end is caretline-cli. Try it in one line:

curl -fsSL https://caretline.app/install.sh | sh && caretline demo

Documentation

The full documentation is in docs/caretline:

Page Covers
Overview What it is and isn't, what belongs in your app, the layers
Architecture State, Msg, update, Effect, view; purity, revisions, replay; Helix inside
Rust API The public API by job, with a complete example (examples/basic.rs)
Messages Every message, effect and key binding; the key-script syntax
Keys and commands The command catalog and the default keymap as data
Structure Blocks, marks and payloads, folds, the layout, decorations
Markdown The block grammar, its editing rules, Markdown in and out
CLI The caretline command, end to end
Protocol The JSON-lines state protocol
Embedding Use it in your own app, as a library or a process; extend it; licensing
Testing Goldens, replay, the fuzzer, fixtures, tests from traces
cargo run -p caretline --example basic

License

MIT, except src/helix/, which is vendored from Helix and stays under the Mozilla Public License 2.0 (file-level; see src/helix/README.md and src/helix/LICENSE-MPL-2.0).