Module

poke/cli

src/poke/cli.pooka

Review the things that changed before calling them expected.

The same entry point works through pooka run or an exported poke escript. Interactive EOF and quit leave pending files alone. Bulk accept/reject are explicit commands; running tests never invokes this module for you.

API reference

class

Options

src/poke/cli.pooka:21
class Options(
  command: String,
  directory: String,
  name: Option(String),
  plain: Bool
)
field

command

src/poke/cli.pooka:22
command: String
INFERREDString
field

directory

src/poke/cli.pooka:23
directory: String
INFERREDString
field

name

src/poke/cli.pooka:24
name: Option(String)
INFERREDOption(String)
field

plain

src/poke/cli.pooka:25
plain: Bool
INFERREDBool
constructor

new

src/poke/cli.pooka:22
INFERREDfn(String, String, Option(String), Bool) -> poke/cli.Options
enum

Choice

src/poke/cli.pooka:30
enum Choice
variant

Accept

src/poke/cli.pooka:31
Choice.Accept
variant

Reject

src/poke/cli.pooka:32
Choice.Reject
variant

Skip

src/poke/cli.pooka:33
Choice.Skip
variant

Quit

src/poke/cli.pooka:34
Choice.Quit
function

help

src/poke/cli.pooka:41
help() -> String
INFERREDfn() -> String
function

parse

src/poke/cli.pooka:58
parse(arguments: List(String)) -> Result(Options, String)
INFERREDfn(List(String)) -> Result(poke/cli.Options, String)

Parse without touching the filesystem or terminal. Invalid options never fall through to acceptance or rejection.

function

review

src/poke/cli.pooka:92
review(
  store: Store,
  mode: Mode,
  ask: fn() -> Result(Option(String), String),
  tell: fn(String) -> Result(Nil, String)
) -> Result(Nil, String)
INFERREDfn(poke/snapshot.Store, poke/palette.Mode, fn() -> Result(Option(String), String), fn(String) -> Result(Nil, String)) -> Result(Nil, String)

Inject input and output when testing the review conversation. The callbacks use Result so a closed output pipe cannot silently accept the next snapshot.

function

review_selected

src/poke/cli.pooka:102
review_selected(
  store: Store,
  names: List(String),
  mode: Mode,
  ask: fn() -> Result(Option(String), String),
  tell: fn(String) -> Result(Nil, String)
) -> Result(Nil, String)
INFERREDfn(poke/snapshot.Store, List(String), poke/palette.Mode, fn() -> Result(Option(String), String), fn(String) -> Result(Nil, String)) -> Result(Nil, String)
function

review_selected_with_width

src/poke/cli.pooka:114
review_selected_with_width(
  store: Store,
  names: List(String),
  mode: Mode,
  ask: fn() -> Result(Option(String), String),
  tell: fn(String) -> Result(Nil, String),
  measure: fn() -> Int
) -> Result(Nil, String)
INFERREDfn(poke/snapshot.Store, List(String), poke/palette.Mode, fn() -> Result(Option(String), String), fn(String) -> Result(Nil, String), fn() -> Int) -> Result(Nil, String)

Supply a live content-width reader when embedding the reviewer. The normal entry point reads terminal geometry again for each redraw and candidate.

function

run

src/poke/cli.pooka:357
run(options: Options) -> Result(Nil, String)
INFERREDfn(poke/cli.Options) -> Result(Nil, String)
function

main

src/poke/cli.pooka:408
main()
INFERREDfn() -> Nil