TUI v2 — Terminal User Interface
Mockarty ships a second-generation interactive terminal UI built on
bubbletea. It is designed for
engineers who prefer the keyboard over the browser, work over SSH on locked-
down servers, or need to embed Mockarty operations in shell pipelines.
The TUI talks to the same admin node as the Web UI, the SDKs and the
non-interactive CLI subcommands. Everything you can do in the TUI is also
reachable through mockarty-cli flags — the TUI is the discoverable, learn-
as-you-go front door.
Why use the TUI
- No browser required. Works over SSH, inside
tmux, on minimal Linux
images that don’t have X11. - Fast. Zero RTT to a web UI; key presses translate straight to API
calls. Welcome screen renders in under 50 ms on a cold start. - Scriptable deep-links. Every screen has a
mockarty-cli tui <name>
entry point so a CI step or shell alias can drop you on the exact screen
you care about. - Anonymous-mode-aware. When the CLI has no server / no license it
still launches and shows the welcome menu so first-time users can browse
the docs and the pricing link without authenticating.
Launch
| Command | Lands on |
|---|---|
mockarty-cli tui |
Welcome menu |
mockarty-cli tui auth |
Auth Status screen |
mockarty-cli tui test-plans |
Test Plan picker |
mockarty-cli tui results --plan ID |
Results viewer scoped to one test plan |
mockarty-cli tui mocks |
Mock list |
mockarty-cli tui perf |
Perf config list |
mockarty-cli tui fuzz |
Fuzz target list |
mockarty-cli tui chaos |
Chaos experiment list (pre-GA, see below) |
Set the language explicitly with MOCKARTY_LANG=ru mockarty-cli tui.
Otherwise the CLI follows LC_ALL, LANG, LANGUAGE, and falls back to
English when nothing matches.
Welcome menu
The welcome screen greets you with the MOCKARTY wordmark (rendered in ASCII
on terminals ≥ 70 columns, a compact one-liner below that) and the menu root. Letter shortcuts (case-sensitive where
noted) push you into the corresponding feature surface:
| Key | Screen |
|---|---|
A |
Auth Status — your mode, role, namespace |
T |
Test Plans picker |
R |
Recent Results |
K |
Mocks list (K for “mocK”, to leave M free for a future “More…”) |
P |
Perf configs (uppercase to avoid clash with p page-prev in child screens) |
F |
Fuzz targets |
C |
Chaos experiments |
Q |
Quit |
If the CLI is running in anonymous mode, an extra [L] Log in shortcut
appears under the menu, along with a footer hint pointing to the pricing
page. Use L to jump into the OAuth login flow without leaving the TUI
(see OAuth login walkthrough).
Enter from the welcome screen is a convenience that opens Auth Status —
the most common first-time action.
Global keybindings
These work on every screen unless documented otherwise:
| Key | Action |
|---|---|
? |
Open the help overlay (global bindings + this screen’s keys); any key closes it |
q |
Quit Mockarty |
ctrl+c |
Quit from anywhere — always works, even inside a text field |
esc |
Back to parent screen |
tab |
Move focus to the next field / pane |
shift+tab |
Move focus backwards |
enter |
Confirm / drill into highlighted item |
↑ / ↓ |
Move within a list |
p / n |
Page prev / next (where lists span multiple pages) |
While a text field is focused (a filter box, a wizard input), plain q
and ? are typed as text instead of triggering quit/help — so you never lose
a half-filled form to a stray keystroke. Use ctrl+c to quit unconditionally.
Per-screen tour
Auth Status (A or tui auth)
Without a token, shows a sign-in hint. After sign-in, shows your login,
email, system role, server URL, and active namespace. It does not display
the server’s licence mode or numeric limits; see
What works without a licence for those limits.
Test Plans picker (T or tui test-plans)
Lists every test plan you can read in the active namespace. Each row shows
the plan name, owner, last run status, and last-modified timestamp. Press
Enter on a row to view the plan’s items; press r to launch a run; press
l to see prior results.
Results viewer (R or tui results --plan ID)
Streams the latest result rows — passes, fails, durations, and the link out
to the full report. Without --plan it lists results namespace-wide; with
--plan it scopes to one plan’s history.
Mocks (K or tui mocks)
Browse mock stubs in the active namespace. Filter by method/path prefix
with / then the query string; Enter opens the stub details (headers,
matchers, response body preview).
Perf configs (P or tui perf)
The list of saved performance test configurations. From here you can launch
a run (r), open the script editor (e), or jump to historical reports
(l).
Fuzz targets (F or tui fuzz)
Lists every saved fuzz target (endpoint + dictionary + payload mutator).
Enter opens the target’s runs; r launches a fresh run.
Chaos experiments (C or tui chaos)
Bubbletea replacement for the legacy mockarty-cli tui chaos screen. Lists
prior experiments with status and target, plus a 5-step wizard
(name → target → fault → schedule → review) for new ones. Live polling
refreshes the table every 2 seconds.
Pre-GA notice. Chaos is currently in pre-GA preview. The TUI surface
runs in read-only mode unless you opt in via --i-know-this-is-preview or
MOCKARTY_CHAOS_PREVIEW=1. See Chaos pre-GA for the
full rationale.
Theming
The TUI uses lipgloss and
respects the terminal’s reported colour profile. Common knobs:
NO_COLOR=1— disables all colour, useful in dumb terminals.TERM=xterm-256color— enables 256-colour mode (rich highlights).COLORTERM=truecolor— enables 24-bit colour.
Troubleshooting
| Symptom | Cause / fix |
|---|---|
| Screen flickers / characters drift | Terminal is too narrow. The TUI wants ≥ 80 columns. Resize, then press any key. |
| Russian labels render as boxes | The terminal font lacks Cyrillic glyphs. Install a Unicode-complete font (DejaVu, etc.) |
| Colours look wrong on a light background | The TUI auto-adapts to the terminal background; if yours mis-reports it, try another terminal or NO_COLOR=1. |
? types a literal question mark |
A text field is focused — ? and q are text while typing. Press esc to blur, then ? opens help. |
| Welcome menu only — no other screen opens | The CLI is in anonymous mode and hasn’t been configured. Run mockarty-cli auth login or set MOCKARTY_API_TOKEN / MOCKARTY_SERVER. |
mockarty-cli tui exits immediately |
The command needs an interactive terminal; run it directly rather than piping its output. |
Where the TUI gets its data
- Server URL:
--serverflag (where supported) →MOCKARTY_SERVERenv →
~/.mockarty/config.yaml. - Auth token:
MOCKARTY_API_TOKENenv →~/.mockarty/auth.json→
device-flow login (OAuth-discovery only). - Language:
MOCKARTY_LANG→LC_ALL/LANG/LANGUAGE→ English.
If the server is unreachable, the authentication screen shows a connection
error. Check the URL and network before retrying. Local CLI commands have
their own offline limits; see What works without a licence.