Command line

The Oatmilk CLI

Oatmilk in a terminal: a full-screen app, Ask AI, scripts, CI and a bridge for AI agents.

The Oatmilk command line, oatmilk, opens your workspace in a terminal. It has the same pages, records and actions as the web app, with Ask AI in a message box at the bottom. Scripts, CI jobs and other agents can use it without the full-screen app, and agents that can only start a command can reach Oatmilk's MCP tools through it.

It works with Oatmilk Cloud and with your own installation, and it signs in as you: your role in each company decides what it can see and do. You can also keep everything on your computer, with no account at all.

Try it in a minute

You need Node.js 22 or newer.

Start it
npx @getoatmilk/cli

The first time

The first time it starts, the app asks one question: how you want to use Oatmilk.

  • Sign in to Oatmilk. Use your Oatmilk account. Nothing to install. If Ollama or LM Studio is running with a model that calls tools, it offers to run Ask AI on it, so your questions stay on your computer while your books stay in Oatmilk Cloud.
  • Make an Oatmilk account. New here? Make one in your browser, then come back. Oatmilk may put you on a short waitlist and emails you when you're in; until then the app says you're on the waitlist, and r checks again. See No account yet?.
  • Keep everything on this computer. No account needed. Your books, files and AI models all stay on your computer. It needs Docker, Bun and Ollama or LM Studio, and a copy of Oatmilk's source, which setup downloads with git. Setup checks for these before it asks anything and says how to get what's missing. Then it picks models that fit, downloads missing ones into Ollama, asks your name and your company's name, starts Oatmilk and signs the terminal in. The first start takes about 10 minutes; ⌃C stops it. Run Oatmilk on this computer covers setup and every day after it.
  • More options. Choose for each part (sign-in, books, files, Ask AI and the agents, classifiers, reading documents, email and web research, each on your computer, with your own cloud services, or off), use your own cloud services with AI on your computer, or connect to an Oatmilk you or your team already run.

Each step shows where you are (2/5), and the setup says how local it is in words, like 85% local.

Shell
oatmilk setup                               # choose again
oatmilk setup --local --yes                 # everything on this computer, without questions
oatmilk setup --local --cloud-for agents --yes
oatmilk status                              # where each part runs, the server, the models, Ask AI
oatmilk local start                         # also: stop, restart, logs, open, password, backup, wipe
oatmilk models                              # the models Oatmilk uses; models test, models pull <name>
oatmilk ai use ollama                       # Ask AI in the terminal on a model on this computer
oatmilk email use resend                    # send email: paste a Resend API key; email test you@example.com checks it

--local and --cloud pick where any command goes, --offline refuses an Oatmilk on the internet, --no-start leaves a stopped local Oatmilk stopped, and --no-ai opens the app without Ask AI.

Sign in

On an Oatmilk that setup made on your computer, the terminal signs itself in. Otherwise the app asks how to sign in: choose the browser, approve, and you land on Home. On Oatmilk Cloud, the same menu has Make an account. From a command line, the same steps are:

Shell
npm install -g @getoatmilk/cli   # or keep using npx
oatmilk signup                   # no account yet? make one in your browser, then sign in here
oatmilk login                    # opens your browser; approve, then go back to the terminal
oatmilk                          # the full-screen app

On an SSH session or a machine without a browser, run oatmilk login --device and paste back the code Oatmilk shows you on any other device.

Browser sign-in is the same OAuth flow AI assistants use for MCP, and your role in each company still decides what you can do. An API key belongs to one company and keeps exactly the permissions it was given. Sign-ins are saved for your user only, and oatmilk logout revokes them. On your own Oatmilk, oatmilk login --password signs in with an account's email and password.

Your data

An administrator can download the company's database records and stored files, or close the workspace:

Shell
oatmilk export                 # database records and stored files, into a folder
oatmilk orgs close             # offers an export, then asks for the company's name
oatmilk wipe                   # remove every sign-in and setting from this computer
oatmilk local backup           # the Oatmilk on this computer: its database and files, to restore later

The workspace has the same in Settings › Your data.

Exports do not include hosted EVE chat transcripts, Redis memory or provider backups. Closing removes database records and stored files, and requests removal of the sign-in organization; chats, backups and outside accounts need a separate review.

Moving between your computer and the cloud

Books don't move by themselves when you change where Oatmilk runs, and the app says so before you switch.

  • Restore the same self-hosted installation: oatmilk local backup, then restore the database and stored files with the same self-host/.env (Operate). Redis memory and hosted EVE conversation state need their own backup and restore.
  • Move between online, local and your own cloud workspaces: sign in to both installations, then run oatmilk migrate plan --to <destination-host> --to-org <destination-org>. Start the migration from the CLI, map people, resume interrupted copies, verify the database and files, then explicitly cut over to the destination. The source remains read-only until its administrator removes it separately.

Passwords, provider keys and bank or tax numbers are left out of an export, so connections are made again in a new Oatmilk.

After transfer, run oatmilk migrate retention --job JOB_ID. Check source database records, stored files, Redis memory, EVE conversations, backups, provider credentials and sign-in access with the source operator. Record evidence for each checklist item. A completed transfer still needs that review before you describe the workspace as fully offline; the confirmations record what an administrator checked, rather than automatically erasing external copies.

What you can do with it

UseStart withGuide
Browse and act on the books in a full-screen appoatmilkUse the full-screen app
Add receipts and invoices from filesoatmilk add receipt.pdfAdd a receipt
Log hours and send your timesheet, as a contractoroatmilk hours add 2h "Design review"Log hours as a contractor
See where your data comes from, and connect moreoatmilk connectConnect your data
Ask AI on Ollama or LM Studio, with your books in Oatmilkoatmilk ai use ollamaAsk AI on a model on your computer
Ask AI one question from a scriptoatmilk -p "What needs me today?"Scripts and CI
Run any API actionoatmilk api entries.list '{"limit":5}'Scripts and CI
Give an agent Oatmilk's toolsoatmilk mcpConnect agents through the CLI

Guides

  1. Install the CLI: npm, other package managers, standalone binaries or from source.
  2. Sign in and choose a company: make an account, then sign in with the browser, another device or an API key, against Oatmilk Cloud or your own Oatmilk.
  3. Run Oatmilk on this computer: oatmilk setup --local, what goes online, your models, and running it every day.
  4. Use the full-screen app: the sidebar, lists, records, the ⌃K palette and Ask AI.
  5. Log hours as a contractor: log time, send your timesheet and say when you had no hours.
  6. Scripts and CI: exec, api, actions, search, JSON output and exit codes.
  7. Connect agents through the CLI: a local MCP server for Claude Code, Codex, Cursor and agents on local models.
  8. Command reference: every command, option, environment variable and exit code.

In scripts

Set OATMILK_API_KEY instead of signing in, and read results as JSON.

Ask AI and the API without the app
oatmilk -p "Which receipts am I missing this month?" --output-format json
oatmilk exec "Categorize the Uber rides as Travel" --yes
oatmilk api entries.list '{"limit":5}'

When Ask AI needs an approval or an answer it couldn't get, exec exits with code 7, and the JSON result lists what it is waiting on. Run it again with --yes to approve. The command reference lists every exit code.