Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

tui-console

/tui-console

Steruje bez terminala interfejsem TUI poleceń dagger przez HTTP: pobiera ekran, wysyła klawisze i przechodzi po spanach, by odtworzyć problemy z renderowaniem.

Repozytorium
dagger ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
23.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 23.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

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

Co robi i kiedy

Steruje bez terminala interfejsem TUI poleceń dagger przez HTTP: pobiera ekran, wysyła klawisze i przechodzi po spanach, by odtworzyć problemy z renderowaniem.

Oryginalny opis (EN)

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.

Jak działa

  1. Enable it
  2. Drive it
  3. Cleanup
  4. Notes
Sekcje z nagłówków SKILL.md, w oryginale · 130 linii, 912 słów
Podgląd SKILL.md
---
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.

Wersje

W bazie nie ma innych skilli o nazwie tui-console.

Migawka bazy z 13.11.2026 · wersja paczki 9d712f961093 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90tui-surfacing
    Wyjaśnia, jak TUI Dagger wynosi głębokie spany, takie jak testy i rozmowy LLM, na najwyższy poziom, i pomaga debugować ich widoczność w dagql.
  • 100terminal-control
    Steruje aplikacjami terminalowymi w prawdziwym PTY: czyta ekran, wysyła klawisze, czeka na tekst i zapisuje nagrania do testów TUI.
  • 100terminal-emulator
    Testuje interaktywne aplikacje CLI i TUI przez @microsoft/tui-test: prompty, nawigację strzałkami i wejście wymagające TTY.
  • 100hex1b
    Automatyzuje aplikacje terminalowe, w tym TUI, powłoki i REPL, uruchamiając proces w wirtualnym terminalu, przechwytując ekran, wysyłając klawisze i nagrywając sesje.
  • 100dagger-design-proposals
    Pisze, recenzuje i poprawia propozycje projektowe funkcji Dagger, takie jak dokumenty projektowe i RFC.
  • 100tuistory
    Steruje aplikacjami terminalowymi przez tuistory: nazwane sesje PTY, czekanie na zdarzenia, zrzuty ekranu i wpisywanie poleceń.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.