TUI Reference

Launch the TUI by running hain with no arguments in an interactive terminal. The TUI provides a full-screen file browser, space management, and real-time sync status.

Launching

hain

On first launch, you’ll be prompted to initialize a vault if one doesn’t exist.

Keyboard shortcuts

ShortcutAction
Up / DownMove selection
EnterOpen directory or select file
BackspaceGo to parent directory
EscDismiss overlay or go up
Ctrl+QQuit

File operations

ShortcutAction
Ctrl+NNew file
Ctrl+Shift+NNew folder
Ctrl+OImport from filesystem
F2 or RRename selected item
Delete or DDelete selected items
SpaceToggle file selection
Ctrl+ASelect all
Ctrl+C / Ctrl+X / Ctrl+VCopy / Cut / Paste
EEdit selected file in terminal editor

Command palette

ShortcutAction
/Open command palette
@Open space switcher
Ctrl+K or ?Show keyboard shortcuts
Ctrl+Shift+SShow share key

Screens

File Explorer

The main screen. Shows a breadcrumb path, file list, and status bar. Use the command palette (/) for all operations — creating files, switching spaces, importing content.

Vault Init

Shown on first launch. Prompts for a vault path with tab completion.

Settings

Access via /settings in the command palette. Lets you change the accent color and toggle contextual hints.

Command palette

Press / to open the command palette. It supports three modes:

File mode (default)

Type to search files by name. The palette also recognizes share keys — paste a 64-character hex string and it will offer to join the space.

Quick action buttons at the bottom:

Command mode (prefix /)

Type / followed by a command name:

CommandDescription
/new-file <name>Create new file
/new-folder <name>Create new folder
/import <path>Import from filesystem
/edit or /eEdit selected file
/renameRename selected file
/deleteDelete selection
/new-space [name]Create a space (Hain picks the folder)
/designate <path> [private|read-only] [name=<name>]Bind an existing folder as a space
/adopt <path>Re-bind a folder that already has a .context/
/join <key>Join space by share key
/rename-space <name>Rename active space
/relocate <new-path>Move the active space’s folder
/forgetDrop the active space’s binding (files preserved)
/leave yesLeave the active space
/share-keyShow share key
/settingsOpen settings
/detailsToggle details panel
/helpShow shortcuts
/themeCycle theme color

Tab completion is available for all commands.

Space mode (prefix @)

Type @ to list all spaces. Fuzzy search to filter. Space indicators:

Status bar

The bottom of the screen shows:

Details panel

Toggle with /details. Shows metadata for the selected file: