CLI Interface
anyy is the single command-line entry point to Anyy. With no
arguments it opens the interactive terminal app; with a subcommand it runs a
one-shot action — send a prompt, check status, manage the gateway, configure
providers and channels, and more.
This page is a day-to-day usage overview: how to invoke the CLI, where global flags go, and what each command group is for. For the exhaustive per-command flag tables, see the CLI command reference.
Run The CLI
anyy is already on your PATH after installation. Confirm the build:
anyy --version
Anyy (anyy) version v0.1.57 channel stable commit 8627a748340f built 2026-06-15T08:03:45Z
Run with no arguments to launch the default interactive TUI, or pass a command to run a single action and exit:
anyy # interactive terminal app
anyy status # one-shot: print a status summary
anyy --help # full usage and command list
Command Modes
The CLI has three modes, distinguished by what (if anything) follows the binary.
Default interactive TUI
Running anyy with no command starts the resident terminal app — a
long-lived session UI with streaming replies, slash commands, and approvals.
This is the primary surface for interactive work; it is documented in detail on
the TUI page.
anyy
anyy --role assistant # start a new session with a specific Role
anyy --resume SESSION_ID # reopen an existing session
The TUI talks to the resident gateway. If no gateway is running, the app helps you start one — see the Gateway page.
One-shot chat
anyy chat sends a single prompt through the running gateway and prints
the reply, then exits. It is the scripting- and pipe-friendly counterpart to the
TUI.
anyy chat "summarize my unread mail"
anyy chat --json --yes "what's on my calendar today"
chat requires a running gateway. Without one you get a clear remediation hint:
✗ Could not create chat session
Reason:
dial unix /…/anyy.sock: connect: no such file or directory
Next:
start Anyy gateway, then run anyy chat again
See Chat for role selection, approvals, streaming, JSON mode, and exit codes.
Management commands
Every other subcommand performs a focused administrative action and exits —
managing the gateway, configuring providers and channels, inspecting health,
running maintenance, and so on. anyy --help lists them all; they fall
into a few groups:
| Group | Commands | What it does |
|---|---|---|
| Talk | chat, (default TUI) | Send a prompt or open the interactive session. |
| Runtime | gateway, dashboard, heartbeat | Start/stop the resident gateway and dashboard sidecar; inspect the heartbeat. |
| Health | status, doctor | Print a status summary or run diagnostic checks. |
| Setup | setup, config, update, uninstall | Run the configuration wizard, view config, update the binary, or remove the install. |
| Identity | profile, role | Manage profiles and Roles. |
| Channels | channels | Configure (setup channels) and reload messaging platforms. |
| Extend | skills, mcp, computer-use, browser | Install skills, manage MCP servers, and toggle computer-use / browser capabilities. |
| Schedule | cron | Manage scheduled jobs. |
| Data | backup, maintenance, memory | Create backups, run state maintenance, and manually preview or apply memory consolidation. |
Each command has its own --help. For example, the gateway group:
$ anyy gateway --help
Usage:
anyy gateway start [--home PATH]
anyy gateway restart [--home PATH]
anyy gateway status [--home PATH]
anyy gateway stop [--home PATH]
Manages the resident Anyy Gateway background service.
…and the setup group bundles the configuration wizards:
$ anyy setup --help
Interactive wizard to configure provider, model, messaging, and optional capabilities.
Usage:
anyy setup [--home PATH] full wizard
anyy setup model [--home PATH] provider/auth/default model
anyy setup aux [--home PATH] optional capabilities
anyy setup channels [--home PATH] messaging platforms only
…
Full flag tables for every command live in the CLI command reference.
Global Flags
Global flags configure profile, Role, and rendering, and must appear before the command. They are parsed by the top-level binary, not by individual subcommands:
| Flag | Purpose |
|---|---|
--profile NAME | Select the Anyy profile by name. |
--profile-root PATH | Use a non-default profile root directory. |
--role ROLE | Select the initial Role for new sessions. |
--no-color | Disable colored output. |
--version | Print version information and exit. |
--help, -h | Print usage and the command list. |
Because these are top-level flags, they go before the subcommand:
anyy --no-color status # ✓ global flag first
anyy --profile work chat "hi" # ✓
Putting a global flag after the command is rejected, because subcommands do not redefine it:
$ anyy status --no-color
✗ Invalid status arguments
Reason:
flag provided but not defined: -no-color
A few flags belong to the default TUI entrypoint only — --home,
--socket, and --resume. They select the home directory, gateway socket, and
session for the interactive app, and are only valid when no command is given:
anyy --home /path/to/home --resume SESSION_ID
Most subcommands accept their own --home, --socket, and --json flags
after the command (for example anyy status --home PATH --json). These
are command flags, not global flags, and --profile and a command's --home
cannot both be set. See the CLI command reference
for which flags each command takes.
Slash Commands
Slash commands (/help, /model, /new, /resume, /compact, …) are typed
inside the interactive TUI, not on the shell command line. They steer the
live session: switch model or Role, manage sessions, review approvals and change
plans, and more.
/help list available slash commands
/model switch the active model
/new start a fresh session
/resume reopen a previous session
For the complete list and what each one does, see the slash command reference. For how to use them in context, see the TUI page.
Multi-line Input
Multi-line input is a feature of the interactive TUI: compose prompts that span
several lines with the TUI's input bindings. See the TUI page for
the exact keys; current builds use Alt+Enter, Ctrl+J, or a trailing backslash
followed by Enter to insert a newline.
For the one-shot anyy chat command, pass the whole prompt as a single
quoted argument — newlines inside the quotes are preserved:
anyy chat "first line
second line"
Interrupting And Steering
In the interactive TUI you can interrupt a running reply and steer the agent mid-task; the TUI page covers the interrupt key and steering flow.
A one-shot anyy chat run is interrupted like any foreground command —
press Ctrl-C to cancel it and return to the shell.
Sessions
Conversations are persisted as sessions so you can pick up where you left off. Sessions are owned by the gateway and shared across surfaces; the Sessions page is the full guide.
Resume by id
From the shell, reopen a session in the TUI by id:
anyy --resume SESSION_ID
To continue a specific session for a single one-shot prompt, pass --session to
chat:
anyy chat --session SESSION_ID "and what about tomorrow?"
--resume cannot be combined with --role, since a resumed session already has
its Role.
Resume from the TUI
Inside the interactive app, use the /resume slash command to browse and reopen
recent sessions without leaving the TUI, or /new to start a fresh one. See the
TUI page.
Session storage
Sessions and other state live under the Anyy home directory, which the
gateway manages. anyy status reports the active home:
$ anyy status
◆ Anyy status
Gateway stopped
Profile default
Default role default
Home /…/home
Timezone Asia/Shanghai (host)
Override the home for a single command with --home PATH (or, for the TUI
entrypoint, anyy --home PATH). See Sessions for the
on-disk layout and retention.
JSON Output
Commands that report data accept --json for machine-readable output, so you
can pipe results into scripts and other tools. Place --json after the
command:
anyy status --json
{
"home": "/…/home",
"profile": "default",
"default_role": "default",
"timezone": "Asia/Shanghai",
"gateway": "stopped",
"active_sessions": 0,
…
}
--json is supported by reporting and listing commands — for example status,
doctor, chat, profile list, role list, skills list, mcp list, and
cron list. The CLI command reference notes
which commands accept it. For chat specifically,
Chat → JSON Mode describes the event shape.
Troubleshooting
anyy chatsays it can't create a session — the gateway isn't running. Start it withanyy gateway start, then retry. See Gateway.- A global flag is "not defined" — you put it after the command. Move
--profile,--profile-root,--role, or--no-colorbefore the command (e.g.anyy --no-color status). - "profile and home cannot both be set" —
--profileand a command's--homeare mutually exclusive; use one or the other. - General diagnostics — run
anyy doctorfor configuration and connectivity checks, andanyy statusfor a live summary. See Status and Doctor and the troubleshooting reference.