Skip to content
Skills Library
Programming · Testing

tui-console

/tui-console

Drive any dagger command's live pretty TUI headlessly over HTTP via DAGGER_TUI_CONSOLE — GET the screen, POST keystrokes, navigate spans/checks/tests, zoom to a span — to explore or reproduce TUI rendering interactively without a pty. Use when investigating how a run or trace renders, reproducing a rendering bug, or operating the idtui frontend by hand.

Repository
dagger ↗
Licence
Apache-2.0
Last repository change
23.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Drive any dagger command's live pretty TUI headlessly over HTTP via DAGGER_TUI_CONSOLE — GET the screen, POST keystrokes, navigate spans/checks/tests, zoom to a span — to explore or reproduce TUI rendering interactively without a pty. Use when investigating how a run or trace renders, reproducing a rendering bug, or operating the idtui frontend by hand.

Original author description

Drive any dagger command's live pretty TUI headlessly over HTTP via DAGGER_TUI_CONSOLE — GET the screen, POST keystrokes, navigate spans/checks/tests, zoom to a span — to explore or reproduce TUI rendering interactively without a pty. Use when investigating how a run or trace renders, reproducing a rendering bug, or operating the idtui frontend by hand.

How it works

  1. Enable it
  2. Drive it
  3. Cleanup
  4. Notes
Original SKILL.md headings · 130 lines, 912 words
SKILL.md preview
---
name: tui-console
description: Drive any dagger command's live pretty TUI headlessly over HTTP via DAGGER_TUI_CONSOLE — GET the screen, POST keystrokes, navigate spans/checks/tests, zoom to a span — to explore or reproduce TUI rendering interactively without a pty. Use when investigating how a run or trace renders, reproducing a rendering bug, or operating the idtui frontend by hand.
---

# TUI Console

`DAGGER_TUI_CONSOLE=<addr>` makes any dagger command serve its **live pretty
TUI over HTTP** on a headless terminal instead of attaching to a real one. You
drive the real `frontendPretty` (and the command's real work) with `curl`
instead of keystrokes, so what you see is exactly what a user sees at a tty.

Use it to operate the interactive TUI by hand — explore how a run/trace renders,
reproduce a rendering bug, expand a check/test to see its detail, or step through
navigation — when you don't have (or don't want) a pty.

Complementary to `tui-qa`: that skill records a real pty session (asciinema) for
timing/hang/"what the user saw at time T" analysis; this one *interactively
drives* the live UI. Reach for `tui-qa` for timing and redraw behavior, this for
navigating and inspecting state.

This is a dev/debug affordance: off by default, bound to the address you give
(use localhost).

## Enable it

Prefix **any** dagger command with `DAGGER_TUI_CONSOLE=:<port>`. It's orthogonal
to what the command does or where its data comes from — it only changes how the
TUI is presented. From a dagger checkout, run the dev binary in the background
and wait for it to come up:

```bash
# any command works: call, check, a trace, ...
env DAGGER_TUI_CONSOLE=:7777 go run ./cmd/dagger call test &

# poll until ready:
for i in $(seq 1 60); do
  curl -s -o /dev/null -w '%{http_code}' localhost:7777/help | grep -q 200 && break
  sleep 2
done
```

(An installed `dagger` binary works the same: `DAGGER_TUI_CONSOLE=:7777 dagger …`.)

## Drive it

All endpoints return `text/plain`; screens are ANSI-stripped (add `?raw=1` to
keep color).

```bash
curl -s localhost:7777/screen                  # current frame
curl -s --data 'right'     localhost:7777/key  # expand the focused span
curl -s --data 'down down' localhost:7777/key  # navigate (keys: tuist.ParseKey names)
curl -s --data 'TestFoo'   localhost:7777/type # type a literal string (e.g. into / search)
curl -s 'localhost:7777/spans?q=TestFoo'       # list loaded spans matching a name
curl -s --data '<spanHex>' localhost:7777/zoom # jump straight to a span
curl -s --data '120x12'    localhost:7777/resize # resize the terminal (cols x rows)
curl -s --data 'DONE|ERROR' localhost:7777/wait  # block until the screen matches (body = regex)
curl -s -X POST 'localhost:7777/wait?quiet=2s&timeout=60s' # ... or until it stops changing
curl -s localhost:7777/toolset                 # a live agent/shell session's tool docs
curl -s localhost:7777/help                    # endpoints + keymap
```

`/wait` replaces polling `/screen` in a loop: with a body it returns as soon as
the (ANSI-stripped) screen matches that regex; without one it returns once the
screen has been unchanged for `?quiet=` (default 2s — note running spans keep
re-rendering elapsed times, so the screen only goes quiet once they finish).
Either way it returns the screen at `?timeout=` (default 60s, capped at 5m) at
the latest, without erroring — inspect the result.

State accumulates across requests like a real session. Each request settles
briefly so background lazy fetches land; if a screen still looks mid-load, just
GET `/screen` again.

The screen is **viewport-clipped to the current terminal size**, exactly like a
real tty: when the rendered frame is taller than `rows`, only the bottom `rows`
lines are shown and the top scrolls offscreen (tuist's alt-screen behaviour). So
`/resize` to a small height is how you reproduce overflow-only rendering bugs —
e.g. a focused row whose own promoted tests/logs are taller than the viewport,
pushing its own header off the top. Either dimension may be 0/omitted to keep
the current value (`x12` changes only rows).

### Keymap (for `/key`)

`←↑↓→` / `h j k l` move · `right`/`l` expand · `left`/`h` collapse · `enter`
zoom · `esc` back out · `r` jump to error origin · `L` logs · `+`/`-` verbosity ·
`/` search · `T` tests view. A `down*3` token repeats a key; commas or spaces
separate keys (`"down,down,right"`).

Key tokens are tuist names: named keys (`enter`, `esc`, `tab`, `space`,
arrows, `pgup`/`pgdown`, ...), single characters, or `+`-joined modifier
combos (`ctrl+s`, `alt+enter` — not emacs-style `C-s`). Unknown tokens get a
400 before any key in the script is applied, instead of being typed into the
TUI as literal text.

To type into the search field, open it with `/` then POST the query to `/type`
(which is *not* tokenized — spaces are typed verbatim), then submit with `enter`:

```bash
curl -s --data '/'           localhost:7777/key
curl -s --data 'TestFoo'     localhost:7777/type
curl -s --data 'enter'       localhost:7777/key   # jump to the match
```

### Typical flow: find a failure and inspect it

The `/spans` status column is `ERROR` when the span itself errored and `FAIL`
when it only *caused* a failure via a link (a test/check whose error rides on a
descendant or linked span), so match both:

```bash
SID=$(curl -s 'localhost:7777/spans?q=TestThatFailed' | grep -E 'ERROR|FAIL' | head -1 | awk '{print $1}')
curl -s --data "$SID" localhost:7777/zoom
curl -s --data 'right' localhost:7777/key      # expand for logs/detail
```

## Cleanup

Stop the background command (Ctrl-C / kill) when done — the console shuts down
gracefully on signal.

## Notes

- **Command requirements are unchanged.** The console doesn't add any. `dagger
  trace <id>` still needs Cloud access (run `dagger login`, or point
  elsewhere with `DAGGER_CLOUD_URL`); `call`/`check` still run locally. The
  console is just the presentation layer.
- Screens default to 120x40; verbosity is driven by the `+`/`-` keys.
- Implementation: `dagql/idtui/frontend_console.go` (`runWithConsole` + the HTTP
  handlers); forced on regardless of tty in `internal/cmd/dagger/main.go`.
- The deterministic counterpart for CI is the in-memory `traceSession` smoke test
  (`dagql/idtui/trace_session_test.go`), which asserts lazy-fetch behavior without
  a network or HTTP.

Versions

The database has no other skills named tui-console.

Database snapshot: 13.11.2026 · package version 9d712f961093 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90tui-surfacing
    How the Dagger pretty TUI surfaces deep spans (checks, tests, LLM conversations) to the top level — the reveal-independent SurfacedX computation, live promotion via passthrough, and the report-vs-live render split. Use when working in dagql/idtui or dagql/dagui: adding a new…
  • 100terminal-control
    Drive and verify terminal applications with the termctrl CLI in a real PTY - read visible screens, run named live sessions, send typed keyboard input, wait for text, save evidence, record timelines, and export edited videos. Use when an agent must operate or test a TUI, REPL,…
  • 100terminal-emulator
    Test interactive CLI/TUI applications using @microsoft/tui-test. Use when you need to test CLI tools with interactive prompts, TUI rendering, arrow key navigation, or any command that requires a TTY. Triggers include "test CLI", "test TUI", "run interactively", "automate…
  • 100hex1b
    CLI tool for automating any terminal application — TUI apps, shells, CLI tools, REPLs, and more. Use when you need to launch a process in a virtual terminal, capture its screen output, inject keystrokes or mouse input, take screenshots, record sessions, or assert on what's visible.
  • 100dagger-design-proposals
    Write design proposals for Dagger features. Use when asked to draft, review, or iterate on Dagger design documents, RFCs, or proposals.
  • 100tuistory
    Drive and test terminal apps (especially the Cline CLI TUI in apps/cli) through tuistory — named background PTY sessions that agents can read, wait on, snapshot, screenshot, and type into. Like Playwright/tmux for terminals, with reactive waiting instead of blind `sleep`. Use…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.