Skip to content
← All release notesNewanfra0.18.0

Work in a session with anfra console

`anfra console` opens a session at your terminal, as psql does: commands without the `anfra`, AQL typed directly, colored output and a warm server.

$ anfra console
> validate
> \-d sales
> c query
query> explore { dimensions { status: orders.status } measures { orders: count(orders.id) } };;

Each line runs a command, typed as after anfra. console query (or c query) switches to typing AQL, each query ending with ;;, and \c goes back. A line of flags, such as \-d sales, sets them for every command in the session.

An anfra console session in a dark terminal: the dataset flag set with \-d ecommerce, c query switching to AQL, a query's result as a grid of order counts by status, and the framed query prompt above a status line naming the repo, the dataset and the running server

Output is in the format for people, colored, with query results as a grid. History is kept between sessions, so Up reaches yesterday's entries. The console uses the repo's running anfra serve, or starts one for the session, so each query answers fast.

\? shows where you are and what you can type, and \q, exit or Ctrl-D leaves. It needs a terminal, so an agent never starts one by accident.

Full changelog (opens in a new tab)