cuj-tui 0.1.0

cui — a read-only TUI browser for cuj vaults
Documentation

cui-rs

cui is the TUI browser for cuj vaults: an Evernote-shaped, keyboard-only terminal interface to the jots a cuj (protocol 0.5) vault holds. Crate and binary are both named cui.

The layout is a jot list on the left and the selected jot on the right — a metadata strip (identity, creation time, tags, categories, references, attachment names, todo counts) above the content. Global commands live in the top bar, context commands for the focused panel in the bar below it, and an ex-style : command line (with ↑/↓ history) sits at the bottom. No menus, no mouse.

Both command bars render directly from the binding table that dispatches key presses, so what a bar shows is by construction the binding that fires. ? opens the full table.

  • browse per profile (p cycles, :profile <name|all> jumps), Tab/Enter/h move focus, j/k/g/G/d/u navigate
  • content is Jot Syntax highlighted: construct spans come from the jots parser (never a re-implementation of the grammar), so tags, categories, references, URLs, bookmarks, and todo spans are styled in place without rewriting the text
  • / (:search) is hybrid full-text via zetetes — logopsis BM25 and semopsis semantic rankings fused by reciprocal rank fusion at the pinned zetetes-state — falling back to plain BM25 (and saying so) when the vault has no zetetes chain; f (:find) compiles tags / categories / dates / --todo / --filter to taxopsis queries, m doubles a search's result cap; b (:backlinks) lists the jots whose effective index references the selected one; :goto --N / --profile--N jumps by reference, and a #bookmark / :N suffix scrolls the view to its line
  • x toggles transclusion in the content view: suffix-carrying references (--42#intro, --7:2-5) expand inline through cuj's show --expand path, depth-bounded and cycle-guarded
  • e hands the selected jot to $EDITOR (the cuj edit flow: export to a temp file, edit, commit if changed) and reloads — the one write path in cui; everything else commits nothing and never reindexes. Extension chains are opened at their pinned state; when an index lags the vault head, results are served anyway and the status line says so (run cuj reindex to catch up)
  • reads are one owned snapshot of the metatheca fact queries (rebuild with r / :reload); content blobs load lazily

Status

0.1.0 — browsing surface against protocol 0.5, on the cuj crate as a library, plus $EDITOR hand-off. Other writes (create, label, todo, rm, mv) stay in the cuj CLI by design. Not yet surfaced from 0.5: file-jot browsing (observed spaces) and the today/agenda views — planned for the next line.

Build and test

cargo build
cargo test

The dependencies on cuj, jots, and the metatheca family (taxopsis / logopsis / zetetes) are path dependencies on sibling checkouts until those crates publish.

Quick start

cuj init
cuj -- "capture the ..urgent idea ::work::alpha"
cui

cui opens the vault named by ~/.cuj/config.toml (or CUJ_CONFIG), scoped to the active profile.