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
| Argument | Description |
|---|---|
[FILE] | Optional. A .urna file to open at start. Loading begins at once and switches to the corpus tab when done. |
Options
| Option | Default | Description |
|---|---|---|
-h, --help | Print 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
urnaopens the explorer only when both stdin and stdout are terminals. Otherwise it prints the help and exits2, so scripts that runurnawith no arguments fail visibly. A build without thetuifeature always prints the help and exits2. - 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_hashgate as urna ask, withk = 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
askanddoctorprint 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_COLORand the terminal probe described in colors and links.
Exit codes
| Code | Meaning |
|---|---|
0 | you quit the explorer |
1 | an error: the terminal could not be initialized, or the setup launched with s returned an error |
2 | usage error; also a bare urna without a terminal on both ends |
Examples
Open a corpus:
urna tui examples/quickstart/out/quickstart.urnaStart on the home tab, which lists the .urna files in the current directory and one level down:
cd ~/corpora && urna tuiForce the 256-color palette in a terminal that reports 24-bit color wrongly:
URNA_COLOR=256 urna tuiurna setup
Reference for urna setup, the installer that lays down the offline embedder payload and a Python env, then proves the install with the doctor checks.
The spec file
Reference for the urna build spec file: TOML, JSON and YAML formats, the seven tables, ${VAR} expansion, path resolution, validation and [corpus].