Std.Cli
Std.Cli — one-shot / interactive CLI backend (Layer 3 Sky source).
Types
type AppConfig model msg
Values
config : { init : a -> ( model, Cmd msg ) , update : msg -> model -> ( model, Cmd msg ) , view : model -> render , subscriptions : model -> Sub msg } -> AppConfig model msg
Build the app config from the four required fields. `view` renders a
program : AppConfig model msg -> Task Error ()
Run the CLI TEA loop until it exits.
readPassword : () -> Task Error Secret
Read one line from stdin with terminal echo disabled (passwords never
withDurable : durable -> AppConfig model msg -> AppConfig model msg
Attach durable wiring (from `Std.App.withDurable`); the runtime restores the
withGuard : (msg -> model -> Result Error ()) -> AppConfig model msg -> AppConfig model msg
Attach a per-Msg guard — `guard msg model` returns `Err` to reject the
withOnLine : (String -> msg) -> AppConfig model msg -> AppConfig model msg
Attach a stdin-line handler — `onLine line` yields a `msg` per line read.