Skip to main content

Module tui

Module tui 

Source
Expand description

§Unified TUI

scope tui (also scope interactive and scope shell) opens one full-screen terminal UI. Every CLI command runs inside it with the same flags and the same handlers as on the command line (issue #47).

 scope vX.Y.Z ──────────────────────────────────────── idle
scope:auto> address 0x742d…
┌─ Address Analysis ─…
──────────────────────────────────────────────────────────
┌scope:auto> ────────────────────────────────────────────┐
│ market summary USDC --venue binance                    │
└────────────────────────────────────────────────────────┘
 <next argument hint>
 chain auto · format Table · limit 100      help · exit

The output pane has a top and a bottom rule and no side borders. The top rule names the version and the pane state (idle, running, failed).

  • exec parses a line: session commands, or the CLI’s clap definition.
  • app holds the state and draws the screen.
  • journal keeps the history and the event log.

A command that reads stdin or draws its own screen (the setup wizard, the live monitor) runs in suspend mode: the TUI gives the terminal back while it runs. What it writes through its output also joins the scrollback when the TUI returns.

Modules§

app
TUI State and Rendering
clip
Copy and Save
complete
Tab Completion
crash
Crash log
exec
TUI Command Execution
fit
Fit Output to the Pane
grid
The watchlist grid (#47): the live view of a running watchlist.
hint
Inline Hints
journal
TUI Journal
palette
Command Palette
vocab
Completion Vocabulary
wizard
The monitor wizard (#47): builds or edits a watchlist in four steps.

Structs§

Settings
What the TUI’s commands run with: the config, and the chain clients built from it.
TuiExit
How the TUI ended.

Functions§

run
Runs the TUI until the user leaves or a signal ends it.
run_with
run, then start once the loop runs: scope monitor <args> opens the TUI with the monitor wizard (#47).
tui_terminal_ok
Checks that the TUI has a terminal to draw on and read keys from.

Type Aliases§

Reload
Reads the Settings again, after setup saved new ones (#99).