docsv0.5.1

urna tui

Reference for urna tui, the full-screen terminal explorer that opens a .urna file, shows its sections, asks it questions and runs the install checks.

urna tui opens the terminal explorer: a full-screen view with four tabs (home, corpus, ask, health) to open a .urna file, read its manifest and sections, ask it questions offline and check the install. A bare urna opens it too when run in a terminal. How to use each tab and every key binding are in the terminal explorer.

The subcommand exists only in builds with the default tui feature. cargo install urna --no-default-features has no tui.

Usage

urna tui [FILE]

Arguments

ArgumentDescription
[FILE]Optional. A .urna file to open at start. Loading begins at once and switches to the corpus tab when done.

Options

OptionDefaultDescription
-h, --helpPrint help.

Behavior

  • Runs full screen in the terminal's alternate screen, in raw mode, with mouse capture, at about 30 frames per second.
  • Needs at least 50 columns by 16 rows; below that it shows "urna tui needs at least 50x16".
  • A bare urna opens the explorer only when both stdin and stdout are terminals. Otherwise it prints the help and exits 2, so scripts that run urna with no arguments fail visibly. A build without the tui feature always prints the help and exits 2.
  • Opening a file reads it whole into memory and validates the header, section checksums, hashes, embedding values and search contract. It does not run the inlined-blob hash check of urna validate.
  • The ask tab embeds the query with the same routed offline embedder and model_hash gate as urna ask, with k = 10. On an installed binary it answers potion corpora only.
  • The health tab runs the checks of urna doctor in the background.
  • The interpreter note that ask and doctor print on stderr ([urna] embedder interpreter: ...) is not printed inside the explorer.
  • s (outside the ask tab) leaves the explorer, runs the interactive urna setup with default options, ignores its exit code, and reopens the explorer with the same corpus.
  • Colors follow NO_COLOR, URNA_COLOR and the terminal probe described in colors and links.

Exit codes

CodeMeaning
0you quit the explorer
1an error: the terminal could not be initialized, or the setup launched with s returned an error
2usage error; also a bare urna without a terminal on both ends

Examples

Open a corpus:

urna tui examples/quickstart/out/quickstart.urna

Start on the home tab, which lists the .urna files in the current directory and one level down:

cd ~/corpora && urna tui

Force the 256-color palette in a terminal that reports 24-bit color wrongly:

URNA_COLOR=256 urna tui

On this page