Skip to main content
o4 is a coding agent that runs in your terminal. You describe a task in plain language, and the model reads your code, edits files, runs commands, and checks its own work until the task is done. You watch each step and approve the actions that change things. o4 is a single binary for Apple silicon Macs and Linux. It works with the model provider you already use. Your settings and sessions live in ~/.o4 in your home directory, and per-project settings live in a .o4 folder in the project.

What o4 can do

  • Work through a task on its own. The model calls tools to read and search files, make edits, and run shell commands, and o4 feeds each result back to the model until it finishes.
  • Use many providers. Built-in providers include Anthropic, OpenAI, Google Gemini, Amazon Bedrock, DeepSeek, Moonshot (Kimi), Meta, xAI, z.ai, and Ollama for local models. You can also sign in with a Claude or ChatGPT subscription, or add any OpenAI-compatible endpoint.
  • Give you a full terminal interface. Output streams as it arrives, with syntax-highlighted code, collapsible tool output, a transcript reader, and themes.
  • Run without the interface. Print mode runs one prompt and prints the answer, so you can use o4 in scripts and pipelines.
  • Keep your sessions. Every conversation is saved, so you can resume it later, fork it, or rewind to an earlier turn.
  • Ask before it acts. An approval mode decides which tool calls run without asking. A sandbox limits what shell commands can reach.
  • Grow with your project. Add tools from MCP servers, and add commands, agents, and skills with plugins.

How it works

Each turn follows the same loop:
  1. You send a prompt.
  2. o4 sends it to the model, together with your project instructions and the list of tools the model may use.
  3. The model streams a reply. When it needs to act, it asks for a tool call, such as read, edit, or bash.
  4. o4 checks the call against your approval mode, permission rules, and sandbox. Calls that need your approval wait for you. Read-only tools like read, grep, and glob run without asking.
  5. o4 runs the tool and sends the result back to the model.
  6. The loop repeats until the model answers without asking for another tool.
You can interrupt a turn at any time with Esc, send a follow-up while the model is still working, or switch models between turns.

Get started

Install o4

Install with the script, Homebrew, or a release archive.

Quickstart

Connect a model and finish your first task.

Choosing a model

Pick a provider and a model for your work.

Permissions

Control which actions o4 takes without asking.