Skip to main content

CLI Interface

The anyy command opens the TUI by default and also provides script-friendly commands for setup, diagnostics, administration, and one-shot conversations.

Start the Interactive Interface​

anyy

Anyy resolves the active Profile, connects to its resident Gateway, and opens the terminal interface. Select another Profile or initial Role before the command:

anyy --profile personal --role research

Resume a known session directly:

anyy --resume SESSION_ID

See TUI for interactive commands and keyboard controls.

Send One Prompt​

Use anyy chat when a shell script or another program needs one response without opening the TUI:

anyy chat "Summarize my current tasks"

Send a new prompt in an existing conversation with --session:

anyy chat --session SESSION_ID "What should I do next?"

--session selects the conversation whose history the new prompt uses. If that session is busy, the prompt joins its follow-up queue. Opening an existing session in the TUI uses anyy --resume SESSION_ID.

Use --json for machine-readable output. Enabled tools execute directly through the resident Gateway, including state-changing calls. See Sessions for pending-input and abort behavior.

The command waits for the original submitted input and its actual run, even when another prompt later uses the same session. It reads that run's recorded result messages. A successful --json result includes submission_id, agent_run_id, outcome and the response text; see the chat result fields.

If the run needs clarification, the command exits with status 1 and prints no intermediate answer. Open the session in TUI or Dashboard to answer. Failure, interruption or a cleared queued input also produces a nonzero exit. A wait timeout or cancellation stops waiting; it does not withdraw the accepted prompt. Inspect the session before submitting it again.

Keep the Gateway running

anyy chat sends the prompt through the resident Gateway. Check it with anyy gateway status if the command cannot connect.

Select Conversation Tools​

The default TUI and chat accept tool names at their entrypoints:

anyy --tools '+codemode,+tool_search'
anyy chat --session SESSION_ID --tools 'read,bash' "Inspect the project"

Names/patterns and exact +name/-name modifier lists are separate forms. --exclude-tools removes names/patterns; --tools '' is an explicit empty allowlist. The Go CLI uses separate boolean --no-tools and --no-builtin-tools flags, not Pi's optional --no-tools builtin form. See the exact flag reference.

New Sessions receive the selection during creation. Explicit flags on an existing Session configure it before the prompt is admitted; busy or queued work returns a conflict and no new prompt is submitted. Without an override, an existing hot Session keeps its active names. Raw cold/branch restoration reads canonical declarations instead of applying a new SDK-style initial choice.

Codemode's on/only mode is a Profile setting; changing a Role does not select tools. Tool-search activation applies to later model requests in that Session. See Sessions for reload and restoration behavior.

Select the Right Profile​

Global selection flags must come before the command:

anyy --profile work status
anyy --profile work chat "Show today's priorities"
FlagPurpose
--profile NAMESelect a named Profile
--profile-root PATHUse a different root for named Profiles
--role ROLESet the initial Role for a new session
--home PATHPoint a supported command at one Profile home
--socket PATHOverride the Gateway socket where supported
--no-colorDisable colored terminal output

Prefer --profile for normal daily use. Reserve --home and --socket for diagnostics or explicit nonstandard layouts.

Command Groups​

GoalCommand
Configure Anyyanyy setup, anyy setup model, anyy setup channel
Inspect healthanyy status, anyy doctor, anyy config
Manage resident runtimeanyy gateway start|restart|status|stop
Open the web interfaceanyy dashboard
Manage capabilitiesanyy tools
Manage scheduled workanyy cron, anyy heartbeat status
Protect and maintain dataanyy backup, anyy maintenance

Run anyy --help for the installed catalog and anyy COMMAND --help before using unfamiliar flags.

Shell Scripting​

Use JSON output where the command offers it:

anyy status --json
anyy backup list --json
anyy heartbeat status --json

JSON mode writes a single structured result and is the stable choice for parsing. Human output is designed for reading and may use symbols or color.

Troubleshooting​

SymptomWhat to do
anyy opens the wrong dataPut --profile NAME before the command and verify with anyy status
One-shot chat cannot connectRun anyy gateway status, then anyy gateway start
A flag is rejectedRun the exact subcommand with --help; flags are not all global
A script breaks on formatted outputUse --json instead of parsing the human view

For the full command inventory, see CLI Command Reference.