Skip to main content

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:

GroupCommandsWhat it does
Talkchat, (default TUI)Send a prompt or open the interactive session.
Runtimegateway, dashboard, heartbeatStart/stop the resident gateway and dashboard sidecar; inspect the heartbeat.
Healthstatus, doctorPrint a status summary or run diagnostic checks.
Setupsetup, config, update, uninstallRun the configuration wizard, view config, update the binary, or remove the install.
Identityprofile, roleManage profiles and Roles.
ChannelschannelsConfigure (setup channels) and reload messaging platforms.
Extendskills, mcp, computer-use, browserInstall skills, manage MCP servers, and toggle computer-use / browser capabilities.
SchedulecronManage scheduled jobs.
Databackup, maintenance, memoryCreate 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:

FlagPurpose
--profile NAMESelect the Anyy profile by name.
--profile-root PATHUse a non-default profile root directory.
--role ROLESelect the initial Role for new sessions.
--no-colorDisable colored output.
--versionPrint version information and exit.
--help, -hPrint 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
note

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 chat says it can't create a session — the gateway isn't running. Start it with anyy 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-color before the command (e.g. anyy --no-color status).
  • "profile and home cannot both be set"--profile and a command's --home are mutually exclusive; use one or the other.
  • General diagnostics — run anyy doctor for configuration and connectivity checks, and anyy status for a live summary. See Status and Doctor and the troubleshooting reference.