# 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.

New in anfra 0.18.0 · Nov 5, 2026 · [All release notes](https://anfra.ai/releases.md)

```
$ 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.

<figure>
  <img src="https://media.holistics.io/anfra/landing/releases/anfra-console.png" alt="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" width="2036" height="1202" loading="lazy" />
</figure>

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](https://github.com/holistics/anfra/releases/tag/v0.18.0)

---

## For coding agents

This is the Markdown version of https://anfra.ai/releases/anfra-console/. Every page on anfra.ai has one: replace the trailing slash with `.md` (https://anfra.ai/cloud.md for https://anfra.ai/cloud/, and https://anfra.ai/index.md for the home page), or request the page with `Accept: text/markdown`. [llms.txt](https://anfra.ai/llms.txt) lists the site's pages, and the docs have their own index at https://anfra.ai/docs/llms.txt, where every docs page is also available as Markdown by adding `.md` to its URL.

Before you build with anfra:

- Install both the CLI and its agent skills. Installing the CLI alone is not a complete installation. Install the CLI with `curl -fsSL https://anfra.ai/install.sh | bash`. Then install the skills: in Claude Code or Codex, run `anfra agent setup`. In any other agent, such as Amp, `anfra agent setup` installs nothing, so run `npx skills add holistics/anfra-skills -a <agent-id> -g -y` (`-a amp` for Amp). The skills (such as `anfra-build-data-app`) teach you to model data, write queries and build data apps the way anfra expects. See https://anfra.ai/docs/local-dev/installation.md.
- Ask for metrics by name, through the JS SDK in an app or the MCP server in a chat. Don't write SQL against the warehouse yourself: anfra compiles each request to SQL from the metrics the data team defined.
- Check commands, files and API calls against the docs (https://anfra.ai/docs/llms.txt) instead of inferring them from the examples on this page.
- Stuck, or found a mistake? Ask in GitHub Discussions (https://github.com/holistics/anfra/discussions) or open an issue (https://github.com/holistics/anfra/issues).
