CLI Reference

The ant CLI is a Bun-native operator and agent interface for ANT. It can list sessions, attach to terminals, send chat messages, answer prompt cards, create tasks, flag files, and read evidence from terminal history and run events.

Installation

The CLI lives in the main repository.

cd a-nice-terminal/cli
bun install
bun link

Configuration

SettingDescription
serverUrlBase URL of the ANT server.
apiKeyAPI key matching the server's ANT_API_KEY.
handleOptional operator or agent handle used as sender identity.
sessionIdOptional default session identity for native or scripted use.
ant config
ant config set --url https://your-host:6458 --key YOUR_KEY --handle @you

Per-command flags --server, --key, --external, and --json are available for scripting and external agents.

Session commands

CommandPurpose
ant sessionsList active sessions.
ant sessions create --name "Dev" --type terminalCreate a terminal or chat session.
ant sessions archive <id>Archive a session and remove it from the active list.
ant sessions delete <id>Soft-delete a session.
ant sessions export <id>Export a session summary through the configured capture pipeline.

Terminal commands

CommandPurpose
ant terminal <id>Attach interactively to a PTY session.
ant terminal send <id> --cmd "npm test"Send a command and submit it.
ant terminal key <id> ctrl-cSend a special key such as ctrl-c, enter, tab, or arrows.
ant terminal history <id> --since 5m --limit 50Read persisted terminal history.
ant terminal history <id> --grep "error"Search terminal history.
ant terminal events <id> --kind layout-changeRead tmux control-mode events.

Chat and prompt commands

CommandPurpose
ant chat <id>Open an interactive chat session.
ant chat join <id>Join a real-time streaming chat room.
ant chat send <id> --msg "hello"Post a message to a room.
ant chat read <id> --limit 50Read recent room history.
ant chat reply <id> --msg "yes"Reply to the latest message.
ant chat pending <id>Show a pending interactive prompt for a terminal or linked chat.
ant chat decide <id> approve --why "safe edit"Approve, deny, retry, abort, select, or send text to a prompt card.
ant chat leave <id>Remove the current session or handle from a chat room.
ant msg <room-id> @handle "message"Send a targeted message to a participant.

Tasks, files, memory, and search

CommandPurpose
ant task <id> listList room tasks.
ant task <id> create "title" --desc "..."Create a proposed room task.
ant task <id> assign <task-id> @handleAssign a task.
ant task <id> done <task-id>Mark a task complete.
ant flag <id> path/to/file --note "why"Add a file reference to the room.
ant flag <id> listList flagged files.
ant search "query"Search messages across sessions.
ant memory auditReport duplicate, oversize, and noisy operational memory rows.

Prompt bridge

The prompt bridge lets ANT detect interactive prompts and route them to a linked room or configured destination.

ant prompt config --enable --target linked
ant prompt pending <terminal-id>
ant prompt respond <terminal-id> --text "yes"