Skip to content

Terminal chat

virtuai chat opens a chat app in your terminal. It looks like web chat, with the same welcome screen, a composer card and its chips, and it shows the same parts of a turn. It’s also built for programming: the agent works in the folder you opened it in, you can run shell commands yourself, review and undo the agent’s file changes, and browse the folder as the agent changes it.

Before the agent runs a command on your machine, the command check decides whether it runs or whether you’re asked first.

  • The VirtuAI CLI, version 1.0.21 or newer (current: 1.0.30), paired with your workspace. Upgrade with pipx upgrade virtuai-cli.
  • An agent with CLI on in its Channels tab. Commands and file edits on your machine need a deep agent.
  • For agents that use a browser on your machine, install the CLI with the browser extra: pipx install --force 'virtuai-cli[browser]'. Use 1.0.20 or newer: on a fresh install, earlier versions had no browser. On macOS it uses your installed Google Chrome.
Terminal window
cd ~/projects/my-app
virtuai chat
Option What it does
--agent <id-or-name> Opens this agent. Without it, you pick one, unless the workspace has only one.
--workdir <path> The folder the agent works in. Default: the current folder.
-c, --continue Reopens your last conversation with this agent in this folder

The first time you run virtuai chat on a machine, it sets up the command check if pairing didn’t already. See Set up the command check.

  • Top bar. Your workspace, the agent and its model, and the connection (● live when the agent can work on this machine). In a Git repository it also shows the branch, commits ahead and behind, and how many files changed. Once the agent answers, you see how much of the model’s context window the conversation uses (ctx N%); use /compact when it fills up.
  • Conversation. Your messages sit on the left with an accent bar. The agent’s answer streams in under them.
  • Composer. Type in the card at the bottom. Under it, the chips show the agent and the model: select the agent chip to switch agents, or the model chip to switch models. The 📎 chip counts the files attached to your next message, and ⏸ plan shows while plan mode is on.
  • Footer. The main keys.
  • Enter sends. Shift+Enter, Ctrl+Enter or Ctrl+J starts a new line.
  • Type @ and part of a file name to give the agent a file from the folder. It’s sent with your message.
  • @shell sends the output of the last command you ran with !.
  • Type / for the slash commands. A menu opens over the composer: move with ↑ and ↓, and take one with Tab or Enter. Their arguments complete too: the agent’s models, the workspace’s agents, this agent’s conversations, paths in the folder and your attachments.

The terminal chat shows what web chat shows of a turn:

  • Steps, with how long each took and where it ran: 💻 and the machine’s name, 📦 and a Workstation’s name, or 🌐 browser. Commands and code appear in their language’s colours. Select a step to expand it and see the full command and output, or press Ctrl+E to expand or collapse them all.
  • Browser steps, when the agent drives a browser.
  • The command check’s decision on each command step. See What each step shows.
  • The model’s thinking, folded to Thought for and the time when it’s done. Select it to read it.
  • Web searches and pages the model read, with their sources.
  • Knowledge base sources under the answer.
  • Files the agent shares, with their size and type.
  • The agent’s plan as a checklist, and sub-agents with their own steps.
  • Short notes for Skill, 🧠 Memory updated, conversation compacted and Local model unavailable — answered by.

When an answer changed files, a line under it says how many and names them, with /review and /undo to check them.

If you’re in another window when a long answer finishes, the terminal rings and your desktop shows a notification.

Start a message with ! to run a shell command in the agent’s folder, for example !npm test. It doesn’t go to the agent as a prompt: it runs on your machine and its output streams into the conversation. Esc stops it.

The command and its output then go to the agent, so the conversation carries on from what you ran. If the agent is answering, they go with your next message instead.

  • Ctrl+V attaches a screenshot or image on the clipboard, or files you copied in Finder. A file path you paste or drag into the terminal attaches that file. Anything else pastes as text.
  • /attach <path> attaches a file. /attachments lists what’s attached, and /detach <n|name> removes one. /detach alone removes them all.

You can attach up to 3 files per message, 10 MB each: images (JPG, PNG, GIF, WebP), PDF, TXT, CSV, Markdown, and Word, Excel and PowerPoint files.

Ctrl+B shows or hides your conversations with this agent on the left. It opens on its own when the terminal is wide enough. Select + New conversation to start one, or a conversation to open it. When you switch agents, the list switches to the new agent’s conversations.

Ctrl+O shows or hides the files panel on the right:

  • At the top, what this conversation involves: Shared by the agent (press Enter to save the file into the folder), Attached to the next message, and In this conversation (✎ written, ◦ read).
  • Below, the folder itself as a tree, like a sandbox’s file explorer. ✎ marks a file the agent changed in this session, M a file changed in Git and U a new file. A folder that holds changes gets a dot. .git, node_modules, virtual environments and caches are left out.

In the tree, Enter previews a file, e opens it in your editor and r reloads the folder. It also reloads after each answer and each ! command. Esc closes the preview.

The CLI keeps a copy of each file before the agent writes it.

  • /review opens the files the agent changed, each compared with what it was. Press r to undo a file, k to keep it, e to open it in your editor, u to undo all of them, and Esc to close.
  • /undo undoes the agent’s file changes from its last answer.
  • /diff shows git diff of the folder.

Undoing a file the agent created deletes it. VirtuAI’s own files in .virtuai/ are left out.

  • Select text with the mouse and it’s copied. Ctrl+Y or /copy copies the last answer. Select a code block in a finished answer to copy it.
  • F2 or /select hands the mouse to your terminal for its own selection. Press F2 again to come back.
  • Ctrl+F searches the conversation. Enter goes to the next match.
  • Ctrl+↑ and Ctrl+↓ jump to the previous or next message.

The last 40 messages stay on screen, so a long session stays quick to scroll. Older ones are kept as text: select ▲ earlier messages at the top to bring back 10 at a time. Search counts matches in them too. Opening a long conversation draws only its end.

To keep more on screen, run virtuai config set max_messages <number>.

The terminal chat has a light theme and a dark theme. The dark theme uses your terminal’s own background and text colours, with VirtuAI’s indigo for what’s VirtuAI’s.

  • /theme switches to the other theme. /theme light and /theme dark choose one.
  • The command palette’s Theme does the same.

Your choice is kept for next time.

The app’s words follow your terminal’s language, English or Spanish. To choose, run virtuai config set language en or virtuai config set language es.

Press Shift+Tab or type /plan to turn plan mode on or off. In plan mode the same agent investigates and proposes a plan, but changes nothing: it can read and run commands that only look. The composer turns amber and shows ⏸ plan. When the plan is ready, choose Yes, carry it out, which turns plan mode off and starts the work, or No, keep planning and say what to change. See Plan mode.

When the agent wants to run a command on your machine, the command check decides first:

  1. Commands that only read run at once. These are programs such as ls, cat, grep, rg, find without actions, sed without -i, and git status, git log or git diff. A chain of them joined by |, &&, || or ; runs too, and so do a for loop, an if block or a $(…) whose parts only read.
  2. Commands that hide code are always asked: inline code such as python -c or bash -c, anything piped into a shell, eval, source and sudo.
  3. Everything else goes to Tev1, a small model (tev1:0.8b) that runs on your machine in Ollama. It says what the command does: reads, runs tests, writes, deletes, installs, uses the network, reads secrets, or changes the system. If it only reads or runs the project’s tests or build, it runs. Otherwise, you’re asked.

A command that names a place outside the agent’s folder, such as an absolute path, ~, .. or a variable like $HOME, is never run without asking.

The check works inside virtuai chat, on the commands sent to the runner it starts. It also runs under virtuai run on your own computer, where it asks in web chat, and in VirtuAI Desktop. virtuai ask doesn’t check commands.

The prompt ⚠ The agent wants to run shows the command and what the check thought of it, for example tev1:0.8b: deletes, p_safe 0.02 or always asked: inline shell. Choose with the number keys, the arrow keys and Enter, or a click:

Option What happens
Run it — I authorize it The command runs, this time only.
Run it, and allow npm install in this conversation The command runs, and so does any later npm install in this folder, until the conversation ends or you close virtuai chat.
Run it, and allow npm install for 1 hour The same, for the next hour, in any conversation.
Run it, and always allow npm install in this folder The same, from now on, in this folder.
No — I’ll run it myself with ! The command doesn’t run. It’s left in the composer as !command, so you can edit it, run it yourself or delete it. The agent is told you didn’t authorize it and that, if you run it yourself, it will get the output.

The three middle options show the command’s base, here npm install, and appear only when the command can have a standing permission. Otherwise you get Run it — I authorize it and No only.

No is highlighted by default. If you don’t answer before the command’s time limit, it doesn’t run.

Once you answer, the prompt goes away, so only the pending prompt is ever on screen. The decision stays on the command’s step.

A standing permission answers the check ahead of time, for one command base in one folder. The base is the program, such as pytest, and for tools such as npm, git, make or uv, also its subcommand: npm install, npm run build, git commit, make test. Allowing npm install doesn’t allow npm publish.

Some commands are asked every time, whatever you allowed before: what deletes, reads secrets or changes the system, what reaches outside the folder, what hides code (bash -c, | sh, eval, sudo), and commands such as rm, git push, git reset or kill.

Permissions for a conversation or for an hour last while the runner runs. Permissions for a folder are kept on your computer. To see and remove them:

Terminal window
virtuai guard grants
virtuai guard grants --revoke <id>
virtuai guard grants --all

The same permissions apply under virtuai run and in VirtuAI Desktop, where you can also give them from web chat’s approval card.

The agent can list, read and search its folder freely. To read anywhere else, it has to ask. The prompt ⚠ The agent wants to read outside the folder shows the read as the command that would do it, such as cat ~/.aws/credentials or ls /, with what Tev1 makes of it. Reading ~/.aws, for example, comes out as reading secrets.

Option What happens
Allow this once This read goes ahead.
No The agent is told the path is outside its working folder and that you didn’t allow it, and to work in its folder or ask you.
Allow reads in a folder for this session This read, and any later read in that folder, goes ahead until you close virtuai chat.

Each command step carries the check’s decision after 🛡:

Mark Meaning
read-only The command only reads, so it ran unasked.
tev1:0.8b: tests, with a score Tev1 cleared it, so it ran unasked.
allowed (…) A standing permission covered it, for example allowed (this conversation), allowed (42 min left) or allowed (always in this folder).
you authorized it You were asked and chose to run it.
you refused it You were asked and said no.

The check is set up once per machine, after virtuai pair or the first time you run virtuai chat. Run virtuai guard setup to set it up again at any time.

  1. The CLI checks whether Tev1 fits this machine.

  2. It checks for Ollama 0.35 or newer. If Ollama isn’t installed, it offers to install it with Homebrew on macOS, or points you to Ollama’s download page. If Ollama isn’t running, it offers to start it.

  3. It offers to download tev1:0.8b, 811 MB.

  4. It tries the check on two commands, pytest -q, which should run, and rm -rf build, which should be asked, and prints Command check ready.

If Tev1 doesn’t fit the machine, or you decline a step, there’s no command check. The CLI says the agent’s commands won’t be checked and are your responsibility, and asks you to accept that. If you don’t, nothing changes. If you do, the top bar in virtuai chat shows ⚠ commands unchecked, and the agent’s commands run as described in Command approvals.

From CLI 1.0.28, virtuai run and VirtuAI Desktop honor the same choice: on a computer where the check is off, they don’t check the agent’s commands, and VirtuAI’s own prompt asks in web chat when the agent’s Ask before running commands is on.

When the chat opens with the check on, the status line says 🛡 commands checked by tev1:0.8b. If Ollama isn’t reachable or the model is missing, it says why, and anything but a read is asked.

Command What it does
virtuai guard status Shows whether commands are checked: on, rules only or off
virtuai guard test "<command>" Shows what the check would do with a command: run or ask
virtuai guard setup Sets up the check again
virtuai config set command_classifier off Keeps the check without Tev1: anything but a read is asked
virtuai config set command_guard off Turns the check off
  • Its folder. The agent is told it works in the folder where you opened the CLI, that reading anything outside needs your permission each time, and that its changes may need your approval. When a read outside is refused, it’s told why.
  • Your agents’ skills. The skills of the agents you can talk to are copied to .virtuai/skills/ in the folder, so the agent can run a skill’s scripts on your machine. The runner checks for changes when it connects and every 15 minutes. Agents that work in a Workstation get their skills there instead.
  • Large tool results. A tool result too large for the conversation is saved on your machine, under .virtuai/large_tool_results/ in the folder, and the agent is told where, so it can search it with the shell. When the machine can’t take it, VirtuAI stores it instead.
Command What it does
/help Lists the commands and keys
/plan Turns plan mode on or off. /plan on and /plan off also work.
/agents Lists the workspace’s agents
/agent <id-or-name> Switches agent and starts a new conversation
/review Reviews the files the agent changed: undo, keep, open
/undo Undoes the agent’s file changes from its last answer
/diff Shows git diff of the folder
/theme [light|dark] Switches between the light and dark theme
/compact Summarizes the older messages to free up context. The status bar shows ctx N%; nothing is summarized until you ask
/clear or /new Starts a new conversation
/copy Copies the last answer
/select Turns your terminal’s own text selection on or off (also F2)
/attach <path> Attaches a file to your next message
/attachments Lists the files attached to your next message
/detach <n|name> Removes an attachment. /detach alone removes them all.
/history Lists this agent’s recent conversations
/load <id> Opens a past conversation
/models Lists the models available for this agent
/model <id> Switches the model for your next messages
/connect <service> Connects a Google account: google_gmail, google_drive, google_calendar, google_chat or google_people
/accounts Lists your connected Google accounts
/exit or /quit Closes the app
Key What it does
Enter Sends the message
Shift+Enter, Ctrl+Enter, Ctrl+J New line in the message
Esc Closes the open window, menu or search first. Otherwise, stops a running ! command or cancels the answer in progress.
Tab Completes the slash command
Shift+Tab Plan mode on or off
Ctrl+V Pastes. An image or copied files attach.
Ctrl+B Conversations panel
Ctrl+O Files panel
Ctrl+E Expands or collapses every step
Ctrl+F Searches the conversation
Ctrl+↑, Ctrl+↓ Previous or next message
Ctrl+Y Copies the last answer
F2 Hands the mouse to your terminal for selection
Ctrl+L New conversation
Ctrl+C Quits

The top bar shows ⚠ commands unchecked : The command check was turned off at setup, or with virtuai config set command_guard off. Run virtuai guard setup to set it up.

Every command that isn’t a read is asked : Tev1 isn’t available: Ollama isn’t running, or tev1:0.8b isn’t downloaded. The status line says which. Start Ollama, or run virtuai guard setup.

The agent says a read was refused : It tried to read outside its folder and you chose No, or didn’t answer. Open virtuai chat in the folder the agent needs, or choose Allow reads in that folder for this session next time.

The agent’s browser doesn’t start : Install the browser extra with pipx install --force 'virtuai-cli[browser]', and upgrade to 1.0.20 or newer. Earlier versions couldn’t start the browser inside virtuai chat, and on a fresh install failed with No module named 'pydantic_settings'. On macOS, make sure Google Chrome is installed.

The theme looks wrong in my terminal : Switch with /theme light or /theme dark. The dark theme takes your terminal’s own colours.