Docs
Omi CLI
An AI coding agent for your terminal. It works in the folder you start it in, on your computer, and asks before it changes anything.
Install
You need Node.js 18.17 or newer. Omi CLI has no other dependencies. Install it once:
Or run it without installing, or with the install script (it checks Node and runs the same npm install):
Update any time with omi update (Omi also tells you once a day when a new version is out). Remove with npm uninstall -g @builditomi/cli and delete ~/.omi.
Sign in
Omi CLI uses your BuildItOmi account (the same one as Omi Build and Omi Work; its plan and usage are separate). Run:
It shows a code like ABCD-EFGH and opens cli.builditomi.com/device. Sign in or create a free account, check the code matches, and approve. The terminal signs in by itself and prints ✓ Signed in. On a server or over SSH no browser opens: open cli.builditomi.com/device on any device (your phone works) and type the code. Each computer gets its own sign-in, which you can sign out on your account page. omi whoami (or omi usage) shows who you are, your plan and how much of your limits is used; omi logout signs this computer out.
What you will see:
$ omi login
Sign in to Omi CLI with your BuildItOmi account. It takes about a minute.
Your code:
ABCD-EFGH
Open this link and approve (the code is filled in):
https://cli.builditomi.com/device?code=ABCD-EFGH
Waiting for you to approve in the browser.
Signed in as you@example.com on the Free plan.Your first task
Open a project and start Omi. In a git repository it works from the repository root.
cd my-project
omi
› add input validation to the signup form and a test for itOr give the task straight away: omi "why does the build fail?". Omi reads the code it needs, shows a plan for bigger jobs, proposes each edit as a diff, runs your tests, and ends with a short summary and how much of your limits it used. Press esc or ctrl+c to stop it mid-task; end a line with \ to type more lines.
Next: /test fixes failing tests · /plan then /build for bigger jobs · omi usage shows what is left. Help: help.builditomi.com (answers in seconds; a person replies within 48 h).
Approvals and modes
Every edit shows a coloured diff. Answer y to apply, n to refuse, a to allow all edits for the rest of the session, or type what you want instead; Omi reads your answer and adapts. Commands work the same way; a allows that command for the session.
ask (default) | Asks before every edit and every command that isn't read-only. |
auto-edit | Applies edits without asking (you still see each diff); asks before commands. Start with omi --auto-edit. |
yolo | Runs everything without asking. Use it in a container or a clean git tree. Start with omi --yes. |
plan | Reads and plans only; refuses every change. Start with omi --plan. |
File tools only work inside the project folder. /undo reverts the last task's file changes, with or without git.
Plan, then build
For bigger changes, ask for a plan first. Omi investigates and writes a numbered plan without touching anything. Read it, ask for changes, then build:
› /plan move the auth code from callbacks to async/await
… (Omi reads, then shows a plan)
› /buildTests and the fix loop
/test finds the project's test command (from package.json, pyproject.toml, Cargo.toml, go.mod, Maven, Gradle or a Gemfile), allows it for the session, runs it, and fixes failing code until the tests pass or it is sure a failure can't be fixed in the project. It changes a test only when the test itself is wrong, and tells you when it did. Give your own command with /test npm run test:unit.
Git
Each turn Omi knows the branch, uncommitted files and recent commits. It never commits, pushes or switches branches unless you ask. /diff shows what changed; /branch fix-login creates a branch; /commit writes a message in your repository's style from the staged diff, which you approve or replace.
Sessions
Every conversation is saved to ~/.omi/sessions after each step, with the plan and the file checkpoints that /undo uses.
omi --continue # the last session in this project
omi --resume # list this project's sessions
omi --resume 20261120-a1b2c3Long sessions keep only the start of old tool output, so each turn stays fast and cheap. /compact summarises the whole conversation when you want a clean slate with the context kept; Omi also does this by itself when a session gets very long.
Project memory
OMI.md at the project root is read at the start of every turn: build, test and lint commands, conventions, things to avoid. /init writes it for you after exploring the project; /memory always use pnpm adds a line; Omi adds notes with its remember tool when it learns something lasting. AGENTS.md, CLAUDE.md and GEMINI.md are read too, and ~/.omi/OMI.md holds your own preferences for every project. Commit OMI.md so your team shares it.
Files and images
Mention a file with @path and it is attached to your message in full; @folder/ attaches the folder's file list. Screenshots and other images (PNG, JPG, WebP, GIF, up to 5 MB) attach the same way and Omi can see them. Press Tab after @ to complete a path, or after / to complete a command.
› why does @src/cart.js round wrong? the bug report: @docs/bug-42.md
› make the header match @design/header.pngSlash commands
| Every command and option. | |
| Plan mode: Omi reads, searches and writes a plan, and changes nothing. | |
| Back to build mode. Right after /plan, it applies the plan. | |
| Runs your tests and fixes failures until they pass. Finds the command itself (npm test, pytest, cargo test, go test …) when you don't give one. | |
| What changed: git diff against HEAD, or the session's own changes outside git. | |
| Writes a commit message from the staged diff (offers to stage everything first); you approve or type your own. | |
| Shows the branch, or creates and switches to a new one. | |
| Puts back every file the last task changed (new files are removed). | |
| Lists the tasks, or goes back to before task n: files and conversation, or just one of them. | |
| Subagent types (.omi/agents, .claude/agents) and this session's subagents with their status. | |
| Starts a background agent, or lists them. | |
| Starts a cloud agent on GitHub Actions, or lists recent runs. | |
| Makes a git worktree for parallel work, or lists them. | |
| Your custom commands, skills and hooks. A custom command runs as /<name>. | |
| Lists the models, or switches to one (deepseek, hydrogen, flash …). Remembered for next time. | |
| Switches how much Omi asks before acting. | |
| Deeper thinking for hard problems (slower, uses more of your limit). | |
| Explores the project and writes OMI.md, the project memory. | |
| Shows OMI.md, or adds a note to it. | |
| After every task that edits files, runs the project's type check and tests (or your command) and fixes what fails, up to two rounds. | |
| Summarises a long conversation so the next turns are faster and cheaper. | |
| Starts a new session (the old one stays saved). | |
| Lists this project's sessions · opens one. | |
| The MCP servers running and their tools. | |
| 5-hour and weekly limits: % used and reset times · what this session used. | |
| Sign in, sign out, leave (ctrl+c twice also leaves). |
What the agent can do
These tools run on your computer. Omi can call several in one turn when they don't depend on each other.
list_files, glob | See the project's files (respects .gitignore) and find files by pattern. |
grep | Search contents with a regular expression (uses ripgrep if installed). |
read_file | Read a file, or part of a big one, with line numbers. |
edit_file, write_file, delete_file | Change files. You see a diff and approve each one (unless auto-edit or yolo). |
run_command | Run a shell command in the project root. Read-only commands (ls, cat, git status, git diff …) run without asking; anything else asks. |
explore | Send a research question to a helper agent that reads the code by itself and reports back with file:line references. Several run at once. |
subagent, merge_subagent | Hand a coding task to a subagent that edits and tests in its own git worktree; several run at once. merge_subagent brings one's changes in as approved edits, or discards them. |
browser | Test a web app in headless Chrome: open, click, type, press, wait_for, text, eval, screenshot, console, resize, close. Reports console errors and failed requests. |
web_fetch | Read a web page or link (docs, a GitHub file) as text. Asks for each new site unless you allow it. |
web_search | Search the web and get an answer with source links. Uses about as much as two or three turns, so it asks first in the default mode. |
mcp__server__tool | Tools from your MCP servers. Each call asks first unless you allow it. |
update_plan | Show its plan and tick off steps as it goes. |
ask_user | Ask you a question when it truly needs a decision. |
remember | Save a lasting fact to OMI.md. |
Subagents in parallel
When a job splits into independent parts, Omi hands each part to a subagent in the same turn, and they work at the same time. Each subagent gets its own git worktree: a full copy of your project as it is right now (uncommitted changes and new files included) on its own branch. It reads, edits and runs your tests there, then reports what it changed and how it checked it. Your files don't change until Omi merges it.
merge_subagent brings a subagent's changes in as normal edits, approved like any other and covered by /undo and /rewind. A file you changed in the meantime is merged three-way; lines you both changed get conflict markers (<<<<<<< yours … >>>>>>> subagent) and are reported, never lost. Merged subagents leave no worktree or branch behind. Ask for it in plain words, or let Omi decide:
› add the billing API route, its tests and the docs page; use subagents for the parts
⇉ subagent api-route own copy on omi/sub-api-route-3f2a
⇉ subagent tests own copy on omi/sub-tests-91c0
⇉ subagent docs own copy on omi/sub-docs-77de
› /agentsSubagent edits never ask, because they stay in the subagent's copy. Its commands run like yours in yolo mode; otherwise they run sandboxed to its copy where the sandbox works (macOS; Linux with bubblewrap), or ask you one at a time, each question naming the subagent. Each output line starts with the subagent's name. Subagents need a git repository with at least one commit.
Define subagent types in .omi/agents/<name>.md (this project) or ~/.omi/agents/ (every project): front matter with name, description, tools (for example Read, Grep, Bash) and model, then the instructions. Claude Code's .claude/agents files work as they are.
Browser testing
The browser tool opens your app in a real Chrome, headless, with its own throwaway profile: never your browser, history or sign-ins. Omi opens pages, clicks (by CSS selector or by the button's text), types, presses keys, waits for text, reads the page, runs JavaScript, resizes to a phone, and takes screenshots it looks at. Every step reports new console errors and failed requests, so it notices what a user would hit.
› start the dev server, then check that signing up works and nothing errors in the console
$ npm run dev > /tmp/dev.log 2>&1 &
◱ browser open http://localhost:3000/signup
◱ browser type #email "test@example.com"
◱ browser click Sign up
↳ Welcome · 1 console errorlocalhost and other local addresses open without asking; another site asks first in ask mode, and plan mode can't use the browser. It needs Chrome, Chromium, Edge or Brave (or OMI_CHROME set to one) and Node.js 22 or newer. OMI_BROWSER_HEADED=1 shows the window.
Background and cloud agents
Background agents keep working on your computer after you close the terminal. Each works in its own git worktree on branch omi/bg-<id>, starting from your last commit (Omi tells you if uncommitted changes are left out). It runs with --yes, commands sandboxed where the sandbox works, and commits its work on its branch with its report.
omi bg "upgrade to React 19 and fix the tests"
omi bg # list them
omi bg log bg-1a2b3c # its report, or the live log
omi bg merge bg-1a2b3c # merge its branch into yours
omi bg stop bg-1a2b3c
omi bg discard bg-1a2b3c # remove its worktree and branchCloud agents run on GitHub's computers, on your repository's GitHub Actions, so your computer can be off. Set up once: omi github writes .github/workflows/omi.yml; add your token (the token in ~/.omi/credentials.json) as the repository secret OMI_TOKEN; commit and push. Then:
omi cloud "fix issue 42 and add a test"
omi cloud # recent runs, with linksIt checks out the branch you're on (push it first), does the task, pushes branch omi/cloud-<run> and opens a pull request with its report, which also shows in the run's summary. You can start one from GitHub too: Actions → Omi → Run workflow. omi cloud needs a GitHub token on your computer: GITHUB_TOKEN, or the GitHub CLI signed in. Runs use your GitHub Actions minutes and your Omi limits.
Your own models
Put a provider in front of the model name. ollama: and lmstudio: run on your computer and need no BuildItOmi sign-in. openai:, anthropic:, gemini: and deepseek: use your own key from OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY or DEEPSEEK_API_KEY; byo: talks to any OpenAI-compatible server at OMI_BYO_BASE_URL. Those turns go straight from your computer to that provider and never count against your Omi limits.
omi -m ollama:qwen3-coder
ANTHROPIC_API_KEY=… omi -m anthropic:claude-sonnet-5-5
OMI_BYO_BASE_URL=http://localhost:8000/v1 omi -m byo:my-modelHooks, commands, skills
Hooks run your commands on SessionStart, UserPromptSubmit, PreToolUse, PostToolUse and Stop, set in .omi/settings.json or ~/.omi/settings.json. Each gets the event as JSON on stdin; exit code 2 blocks (and stderr goes to Omi). Project hooks run only after you trust that exact file (--trust-hooks in scripts). Claude Code's hook format works.
Custom commands: each .omi/commands/<name>.md becomes /<name>, with $ARGUMENTS and $1…$9. Skills: a folder with SKILL.md in .omi/skills/; Omi reads one when a task matches. Commands and skills in .claude/ work as they are.
Worktrees and sandbox
omi -w <name> works in a git worktree at .omi/worktrees/<name> on branch omi/<name>, so several sessions can work on one repository at once. --sandbox lets commands write only inside the project and temp folders, with no network (--sandbox-net allows it): macOS's built-in sandbox, or bubblewrap on Linux. omi review --base main reviews your branch and prints Markdown.
MCP servers
Omi CLI connects to MCP (Model Context Protocol) servers that run on your computer over stdio: issue trackers, databases, browsers, internal tools. Their tools appear to the agent as mcp__server__tool, and every call asks first unless you allow it. Servers are saved in ~/.omi/mcp.json in the usual mcpServers format, so a config from another agent works as it is.
omi mcp add github GITHUB_TOKEN=ghp_… -- npx -y @modelcontextprotocol/server-github
omi mcp list
omi mcp remove githubAllow a server's tools without prompts in a script with --allow-tool "mcp__github__*". An MCP server runs with your permissions: add only servers you trust.
Models and usage
auto (default) | Auto · Everyday turns run on DeepSeek V4.1 Flash, and gpt-oss-120b steps in when you're close to a limit. Pictures run on Gemini 3.5 Flash-Lite and /think high on Gemini 4 Hydrogen (on Google's servers). |
deepseek (Auto’s everyday pick) | DeepSeek V4.1 Flash · uses the limit 1× · The default: strong at code and tool use, at a low price. |
flash-lite | Gemini 3.5 Flash-Lite · uses the limit 4.1× · Quick questions and small edits; reads screenshots. Our busy-time backup for every other model. |
flash | Gemini 3.8 Flash · uses the limit 8.6× · Fast all-rounder with images. |
hydrogen | Gemini 4 Hydrogen · uses the limit 17.3× · Google's Gemini 4 model, for harder and longer tasks. |
flash-3.5 | Gemini 3.5 Flash · uses the limit 18.3× · It answered every turn of our first public benchmark run (10 of 10 solved). |
gpt-oss | gpt-oss-120b · uses the limit 1× · Open-weights model, very cheap. |
gemma-4 | Gemma 4 26B · uses the limit 1.6× · Small open model. |
deepseek-1017 | DeepSeek V4.1 Flash · uses the limit 1× · Dated snapshot of the default. |
| flash-lite-3.1, flash-3, flash-3.6, flash-3.7 | Not available right now (older Gemini models with no path in our current setup) |
To use one model all the time, pick it with omi -m gpt-oss or /model gpt-oss; /model auto goes back to Auto and /model alone lists them. The status line after each answer names the model that answered. The older name standard still means DeepSeek (fast and max pointed at Gemini models, which are not available right now). Every plan can use every model; a pricier model just uses your limits faster (the × above, on our benchmark's token mix). See all models, including the ones we are still testing.
Each plan has a 5-hour limit and a weekly limit. Your first message starts both windows; each turn uses some of both, by the tokens it really used at the model's price. omi usage shows the percent used and when each resets, and every answer ends with a one-line status. When a limit is reached Omi stops, says when it resets and links the plans. If the chosen model is overloaded, Omi says so in the status line. A turn that fails uses nothing.
Scripts and CI
-p runs one task, prints the answer and exits. Without --yes it refuses changes when no one is there to approve them. Pipe text in as context:
omi -p "summarise what this repo does"
npm test 2>&1 | omi -p --auto-edit --allow "npm test" "fix these failures"
omi -p --output-format json "list the TODOs in src/" > todos.json
OMI_TOKEN=omi_… omi -p --yes -m fast "update the changelog for this diff"--allow "npm test" lets exactly that command (and ones starting with its first two words) run without asking; --allow-tool does the same for web_fetch, web_search or MCP tools. --output-format json prints one JSON object: result, filesChanged, tokens, usage (your 5-hour and weekly limits) and sessionId.
For CI, sign in once on your computer and copy the token from ~/.omi/credentials.json into a secret named OMI_TOKEN. It uses your account's limits; sign it out on the account page if it leaks.
Files and settings
~/.omi/credentials.json | Your sign-in token (only readable by you). |
~/.omi/config.json | Your default model. |
~/.omi/mcp.json | Your MCP servers. |
~/.omi/OMI.md | Your own preferences, read in every project. |
omi update | Installs the newest version (Omi also tells you once a day when one is out). |
~/.omi/sessions/ | Saved sessions. |
OMI_HOME | Keep all of the above somewhere else. |
OMI_TOKEN | Sign in without omi login (scripts and CI). |
OMI_NO_BROWSER=1 | Don't open the browser on login (print the link only). |
NO_COLOR=1 | Plain output without colours. |
Privacy and safety
The files Omi reads, the command output it sees and your messages are sent to our service only to run the model for that turn. We keep token counts and usage for your limits; we don't store your code or conversations, and we don't train models on them. Sessions are saved only on your computer. Omi refuses file paths outside the project, asks before changes in the default mode, and is told never to print secrets from .env files. Commands you approve run with your permissions, so read them before you say yes.
Troubleshooting
omi: command not found | npm's global folder isn't on your PATH. Run npm config get prefix and add its bin folder to PATH, or use npx @builditomi/cli. |
| Needs Node.js 18.17 | Install a current Node.js from nodejs.org (or with nvm). |
| Browser didn't open on login | Open cli.builditomi.com/device on any device and type the code. The code works for a few minutes; if it expires, run omi login again. |
| "You've reached your 5-hour (or weekly) limit" | The message says when it resets; omi usage shows both windows. For more, move up a plan on the pricing page; the next turn works at once. |
| "Omi is very busy" | The model was overloaded for a moment; Omi retries by itself. Nothing is charged for a failed turn. |
| Something else | Ask at help.builditomi.com. |