Text interface
The project in a terminal: a sidebar, pages, collections, boards and node screens (contours, rules, runs) through `shtukbase tui`. Open it, capture one screen without a terminal (for agents and checks), and a sensor: the binary exists, the project is readable, what the TUI does not show yet.
About the package
The text interface (TUI) is Shtukbase in a terminal: the project sidebar, pages, collections as a table, a kanban, a gallery and a feed, and node screens (automations, runs, rules, contours, resources, progress). It is the sb-tui crate in engine/tui of the Shtukbase repository; it is part of the shtukbase binary through the command shtukbase tui. The package changes nothing in the TUI: it finds the binary, gives it a node that reads this project, and prints screens as text.
Why the name tui: that is the name of the command (shtukbase tui), the crate (sb-tui) and the folder (engine/tui); shtuk run tui open reads without translation.
Actions
shtuk run tui open [address]: open the project in a terminal; with an address, straight on a page (work/tasks,@contours). Without a terminal (in a pipe, with an agent) it prints one line saying what to do and exits with code 2.shtuk run tui shot <kind> [address] [flags]: one screen as text, without a terminal. Kinds:sidebar [folders]: the sidebar: pages, collections with counters, boards; the address says which folders to expand (work,norms/rules);page <address>: a page as text (--lines 0..200);rows <address>: a collection as a table (--sort field,--desc,--find word,--limit 40);board <address>: a collection or its view as a board by a state field (work/tasks#tasks--board);screen [address]: the whole window as the terminal draws it (--view 1is the kanban,--preview,--width,--height,--keys enter,down,cpresses keys before the capture). Node screens:@contours,@rules,@runs,@automations,@resources,@progress.
shtuk run tui doctor: a sensor thatshtuk checkruns. It only looks and does not fail the check: the binary is found and of which version; the project is readable; how many of the project's collections and boards are visible in the sidebar. If there is no binary or node, a warning with what to do.
The flag --own-node on all three allows a temporary node in a project with automations (below).
Where the package looks for the binary
- The variable
SHTUK_TUI_BIN: a path to the file (an explicit choice outweighs everything). shtukbaseonPATH, if it has the TUI (shtukbase --versionprintstui: on).- A build in a Shtukbase checkout:
engine/target/<profile>/shtukbase, thenengine/target/<profile>/examples/tui. The checkout is looked for inSHTUKBASE_REPO, by the package source in.shtukbase/packages.lock, and in the folders around the project.
If it is not found: one line on how to install it, code 2.
How to install the binary
- From a release:
curl -fsSL https://releases.shtukbase.com/install.sh | sh(channel:-s -- --channel beta, version:-s -- --version 0.5.3). The binary lands in~/.local/bin/shtukbase; the TUI is on in it by default. - From source, from the
engine/folder of the repository:cargo build --release -p shtukbase→engine/target/release/shtukbase. The TUI alone, without a node:cargo build --release -p sb-tui --example tui→engine/target/release/examples/tui(it needs an already running node).
The node
The TUI does not read the project itself but through a Shtukbase node. The node serves the projects from its home: ~/.shtukbase/spaces.md (or $SHTUKBASE_HOME) → a space → projects:.
- If the project is added to the application and the application is running, the package works through that node.
- Otherwise the package starts a temporary node (
shtukbase serve) in a temporary folder where only this project is recorded, and stops it after the screen; it writes nothing into the project. This takes about a second. - If the project has pages in
/automations, a temporary node is not started without asking: the node could run them. Then add the project to the application or pass--own-node.
Keys
| Key | What it does |
|---|---|
| ↑ ↓ (j k) | up and down; in the sidebar a page opens at once |
| ← → | the sidebar, the middle, the right panel; in the sidebar → expands, ← collapses |
| ⌘↑↓, ⇧↑↓, J K | the next or previous document |
| Enter | open; on a collection row, open on the right |
| x, Esc | close the right panel |
| < > | narrow or widen the right panel |
| f | the page from the right panel to full width and back |
| ⌥← ⌥→, ⌘[ ⌘], H L | back and forward |
| v, 1–4 | the collection view: table, kanban, gallery, feed |
| ⇧← ⇧→, [ ] | scroll the table columns |
| Space, b | page down, up |
| g | go to an address, for example work/tasks |
| e | edit the page in $VISUAL/$EDITOR |
| Ctrl+P, : | the command palette and page search |
| s | sort the table by state |
| p, ⌘⇧↑↓ | another project |
| F3–F8 | node screens: automations, runs, rules, contours, resources, progress |
| r | re-read the screen |
| /, d | runs: the state filter; all time or the last day |
| Enter, Esc, c, o | contours: deeper, back, captures, open the row's page |
| ? | hints |
| q | quit |
On a Russian keyboard layout the keys work as on QWERTY in the same place. Your own keys are in ~/.config/shtukbase/terminal.toml (on macOS ~/Library/Application Support/shtukbase/terminal.toml). The TUI looks best in Ghostty, kitty, WezTerm or iTerm2: they show images and large headings.
What the TUI does not understand yet in projects on basic
The sensor writes this as warnings. It is fixed in the engine, not in the project:
- the BOARDS section of the sidebar is empty, although the basic collections declare views
layout: board; a board can be seen withshot board <collection>#<view>; rowsof a collection withitems: {mode: type}(Contours) and withrecursive: true(Rules) is empty, although the counter in the sidebar is right;- in a table the column headers are field names (
taskId), not thelabel; on a board the columns are phase names (todo), not theirtitle, and empty contour phases are not visible; screencaptures the window before the node has answered: the sidebar and the kanban there say "Loading…"; for agentssidebar,rows,board,pageare more reliable.
No norms
The TUI shows in the sidebar every collection of the project at any depth, even without a title and with a quoted type. A norm "every collection is visible in the TUI" would not catch a single project error; what the TUI does not show is the engine's business, and the doctor sensor sees it.
Actions 3
| Name | What it does | File | When |
|---|---|---|---|
| open | Open the project in a terminal: shtuk run tui open [address] | actions/open.ts | shtuk run |
| shot | One screen as text, without a terminal: shtuk run tui shot <kind> [address] | actions/shot.ts | shtuk run |
| doctor | Sensor: the binary is found, the version, the project is readable, what is missing from the sidebar (only looks) | checks/doctor.ts | check |
shtuk check runs the checks; shtuk run tui <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.
Package files 5
They go into .shtukbase/packages/tui/; actions run from there.