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.
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-app.
Documentation
The full documentation is in docs/caretline:
| Page | Covers |
|---|---|
| Overview | What it is, what it covers, the layers |
| Architecture | State, Msg, update, Effect, view; purity, revisions, replay; Helix inside |
| Rust API | The public API by task, with a complete example (examples/basic.rs) |
| Messages | Every message, effect and key binding; the key-script syntax |
| 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; licensing |
| Testing | Goldens, replay, the fuzzer, fixtures, tests from traces |
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).