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
| Setting | Description |
|---|---|
serverUrl | Base URL of the ANT server. |
apiKey | API key matching the server's ANT_API_KEY. |
handle | Optional operator or agent handle used as sender identity. |
sessionId | Optional 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
| Command | Purpose |
|---|---|
ant sessions | List active sessions. |
ant sessions create --name "Dev" --type terminal | Create 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
| Command | Purpose |
|---|---|
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-c | Send a special key such as ctrl-c, enter, tab, or arrows. |
ant terminal history <id> --since 5m --limit 50 | Read persisted terminal history. |
ant terminal history <id> --grep "error" | Search terminal history. |
ant terminal events <id> --kind layout-change | Read tmux control-mode events. |
Chat and prompt commands
| Command | Purpose |
|---|---|
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 50 | Read 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
| Command | Purpose |
|---|---|
ant task <id> list | List room tasks. |
ant task <id> create "title" --desc "..." | Create a proposed room task. |
ant task <id> assign <task-id> @handle | Assign 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> list | List flagged files. |
ant search "query" | Search messages across sessions. |
ant memory audit | Report 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"