AI assistants on the Linux terminal

Mascote do LinuxPro digitando no terminal com o assistente de IA respondendo em balões de conversa

The current generation of AI assistants has left the browser and entered the terminal — where sysadmins and developers actually work. They read files, explain errors, write scripts and execute commands with your approval. This post is the updated map for September 2026: what exists, how to install each one and what to do to avoid shooting yourself in the foot.

What changed since the first version of this post

Two things, and both matter:

  • Gemini CLI is over. Google shut down the command gemini in 18 June 2026, with no grace period for the free tier, and consolidated everything under the brand Antigravity. The replacement is agy. If you had a CI script calling gemini, it stopped working that day.
  • The field got crowded. In 2025 there were two or three. Today there are at least eight relevant CLIs, and the choice has become more about harness — the program that orchestrates the agent — than the model.

The options in September 2026

Command Tool Underlying model License
claude Claude Code (Anthropic) Claude Proprietary, subscription or API
codex Codex CLI (OpenAI) GPT Open source, ChatGPT account or API
agy Antigravity CLI (Google) Gemini Proprietary; successor to Gemini CLI
opencode OpenCode Any — you choose Open source
copilot GitHub Copilot CLI Several, via GitHub Proprietary, subscription
crush Crush (Charm) Several providers Open source
grok Grok Build (xAI) Grok Open source, Apache-2.0
ollama Ollama Local model, no cloud Open source

Claude Code

The agent that popularized the format: navigates the project, reads and edits files, runs commands and asks for approval before acting.

npm install -g @anthropic-ai/claude-code
cd ~/meu-projeto
claude

On first run it asks you to log in. Then just chat:

> explique o que esse script faz e onde ele pode falhar

> escreva um script bash que faça backup do /etc para
  /backup com data no nome e mantenha só os últimos 7

Codex CLI

OpenAI’s agent, written in Rust and open source. Authenticate with your ChatGPT account or an API key:

# instalador oficial
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# ou, se você já vive no npm
npm install -g @openai/codex

codex

It also runs non-interactively, which is useful for automation:

echo "resuma os erros deste log e sugira a causa" | codex exec -

Antigravity CLI (the agy)

The Gemini CLI replacement. Written in Go, focused on orchestrating multiple agents in parallel, with task handoffs between them and state that survives long sessions.

curl -fsSL https://antigravity.google/cli/install.sh | bash
agy

Those coming from gemini need a real migration: it is a new installation, not an alias. The skills, hooks and subagents you had remain valid, but the binary is different.

OpenCode

The wildcard on the list, and the most interesting for anyone who does not want vendor lock-in: it is open and model-agnostic — point it to Anthropic, OpenAI, Google, a local provider or whatever you want.

curl -fsSL https://opencode.ai/install | bash

# ou
npm install -g opencode-ai

opencode

GitHub Copilot CLI

It makes sense if your company already pays for Copilot and the code lives on GitHub — integration with issues and pull requests is the differentiator.

npm install -g @github/copilot
copilot

Grok Build

xAI’s agent, and the newest on the list — the repository xai-org/grok-build was opened in July 2026 under the Apache-2.0 license and already has over 26 thousand stars. It is written in Rust, which is noticeable at startup: it opens instantly.

The difference in format from the others is that it is not a prompt scrolling in the terminal, but a full-screen TUI — interactive, with mouse support — that understands the project, edits files, executes shell commands, searches the web and tracks long tasks.

# macOS e Linux
curl -fsSL https://x.ai/cli/install.sh | bash
grok --version

# rodar dentro do projeto
cd ~/meu-projeto
grok

Three things worth knowing before adopting it:

  • Headless mode. In addition to the TUI, it runs without an interface for scripts and CI — which lets you put it inside a pipeline.
  • ACP. It speaks the Agent Client Protocol, so you can embed the agent in the editor instead of switching windows.
  • Building from source is a hassle. It is possible, but the build requires the Rust toolchain pinned by rust-toolchain.toml plus DotSlash in PATH to resolve the protoc hermetically. For normal use, get the published binary.

An honest caveat about “open source”: the repository is the Rust source for the CLI and agent runtime, synchronized periodically from the company monorepo — it is not a community development project. The model remains a paid xAI service. You audit and modify the harness, not the brain.

No cloud: local model

For an isolated server, sensitive data or simple stubbornness, the way forward is running the model on your machine. It is slower and the results are worse than frontier models, but nothing leaves the network:

curl -fsSL https://ollama.com/install.sh | sh
ollama run qwen2.5-coder:7b

The complete walkthrough is in Running local AI on Linux with Ollama. To serve multiple users simultaneously with real throughput, see vLLM.

Which one to choose

  • Not sure where to start? Claude Code or Codex. They have the two most mature agent workflows.
  • Do not want to depend on one vendor? OpenCode, pointing to whichever provider you want.
  • Want an auditable harness in Rust with a full-screen TUI? Grok Build — the agent code is Apache-2.0.
  • Company already pays for GitHub? Copilot CLI, for integration.
  • Data that cannot leave the machine? Ollama, and accept weaker results.
  • Want them all installed without effort? The distro Omarchy already comes with all these CLIs prewired as stubs — nothing is downloaded until first use.

What these tools are actually good for

  • Explain the error in front of you: paste the stacktrace and ask for a diagnosis.
  • Generate boilerplate: systemd unit, Ansible playbook, nginx config, Dockerfile.
  • Read logs: “summarize the errors in this journalctl and group by service”.
  • Navigate someone else’s code: “where does this project validate the token?” solves in seconds what would take an afternoon of grep.
  • Learn: “why does this find use -print0 and xargs -0?”

And where they are bad: architecture decisions, anything depending on context you did not provide, and destructive commands. The model’s confidence has no relation to correctness.

Sysadmin precautions

AI makes mistakes confidently. Survival rules, in order of importance:

1. Leia TODO comando antes de aprovar a execução.
2. Nunca rode sugestão de IA como root em produção sem testar antes.
3. Senha, chave privada e token não entram no prompt — nem "só para
   o agente ver". O que entra no contexto sai da sua máquina.
4. Trabalhe em repositório com git limpo: o desfazer é o `git diff`.
5. Desconfie do modo automático. "Não pergunte, faça" economiza
   cliques até o dia em que economiza o seu /etc.
6. Em servidor isolado ou com dado regulado, prefira modelo local.

Item 5 deserves a paragraph. All these agents have an automatic approval mode, and enabling it is tempting. It is acceptable in a disposable container or a version-controlled repository you can revert. On a production server with root access, it is not.

What comes next: MCP and skills

Recent evolution is not in the model, but in what the agent can reach. Two mechanisms standardized this:

  • MCP (Model Context Protocol) — an open protocol for the agent to talk to external tools: your database, your WordPress, your internal API, Kubernetes. Instead of pasting command output into the prompt, the agent queries the source.
  • Skills — packaged instructions that teach the agent to perform a task your way, loaded only when needed.

We covered the subject in Vibe coding on Linux: four AI skills in the CLI.

Closing

The real gain is not “AI does it for me” — it is having a technical partner available 24 hours inside the terminal, who has already read all the documentation and never tires of explaining. Those who learn to use it well, with review and without outsourcing judgment, visibly produce more. Those who approve commands without reading sooner or later restore a backup.