Command line
Command reference
Every oatmilk command, option, environment variable, exit code and file.
oatmilk --help prints a short version of this page.
Financial statements and their checks are available in the terminal. Press c on Financial statements to review a group's records, payments, balances or sources for the same fiscal period. The checks show one record at a time; press d for its reasons and evidence, Enter to open its transaction, or i to ask AI about the selected check. Missing sources and amounts keep the report a draft. Press r to return to the reports.
Commands
| Command | Does |
|---|---|
oatmilk [prompt] | Opens the full-screen app, and asks Ask AI the prompt if you give one |
oatmilk -p "<prompt>" | Asks Ask AI once without the app; the same as exec |
oatmilk setup | Chooses how to use Oatmilk: sign in to Oatmilk Cloud, keep everything on this computer, or a mix, saying how local it is (85% local); --local, --cloud or --host without questions |
oatmilk status | Where each part runs and how local, whether the local Oatmilk answers, the models, where Ask AI thinks, and who's signed in |
oatmilk local <start|stop|restart|status|logs|open|password|backup|wipe> | The Oatmilk running on this computer; backup saves its database and files (Docker) |
oatmilk models | Ollama and LM Studio on this computer, the models Oatmilk uses and when they were last checked; models start, models test, models pull <name>, models use, and models eval, which checks the models on Oatmilk's own tasks with a made-up company's books and says if they're good enough (exit 0) or not (exit 1) |
oatmilk ai | Where Ask AI thinks in the terminal; ai use ollama|lmstudio runs it on a model on this computer, ai use oatmilk goes back, ai test checks the model calls tools |
oatmilk email | Who sends Oatmilk's email, the domain it's sent from, whether it's on and why not, and the last email sent. On an Oatmilk you run: email use resend saves a Resend API key and the sending domain, email test [address] sends a test and waits to see it leave, email off stops sending and forgets the key. On Oatmilk Cloud, Oatmilk sends the email itself |
oatmilk login | Signs in through your browser |
oatmilk signup | Makes an Oatmilk Cloud account in your browser, then signs in here once you press ⏎; without a terminal it prints the address and the next command. The same as oatmilk login --new |
oatmilk logout | Signs out of this machine and revokes the sign-in; a local account's saved password is forgotten too |
oatmilk whoami | Who you're signed in as, the company, your role and permissions |
oatmilk orgs | The companies you can open; orgs create "Acme" creates a company; orgs personal opens your personal workspace; orgs use <name or id> switches; orgs close closes the company for good |
oatmilk settings | The organization's model and data settings; settings setup opens the guided review; settings update '<JSON patch>' changes shared defaults with a revision check |
oatmilk settings permissions [ask|bypass] | Read or save your Ask AI approval mode on this computer for your signed-in account and workspace |
oatmilk settings memory | Memory and dreaming: setup opens the native screen; show, list and status read settings, facts and run results; update '<JSON patch>' changes dream cadence and retention; save '<JSON>', remove '<JSON>' and dream use the same scoped actions as Ask AI and MCP |
oatmilk settings keys | Encrypted workspace provider keys: setup opens the native screen; show returns status and key hints; save anthropic takes a hidden prompt or stdin; remove anthropic removes that provider's key |
oatmilk migrate | Plans or resumes a verified organization data move; migrate plan, start, resume, status, verify, cutover, retention and cancel authenticate source and destination separately |
oatmilk connect | Where the company's data comes from: receipts by email, Gmail and Outlook, bank and cards, Wise, Stripe, Notion and Google Drive, each with its next step; connect <source> takes it |
oatmilk sync | Syncs Wise and Stripe now; sync wise or sync stripe syncs one |
oatmilk export | Downloads every record and file of the company into a folder |
oatmilk wipe | Removes every sign-in, setting and history from this computer |
oatmilk update | Installs the newest version; --check only says whether there is one; update auto|notify|off chooses whether the app updates by itself |
oatmilk hours | A contractor's pay period; hours add <time> "<what you did>" logs time, hours submit sends it for review, hours none says there were no hours, hours list, hours companies, hours use <company>, hours open |
oatmilk pay | Where contractor pay stands, from the same status the dashboard shows: each timesheet's amount, payday, where its payment is, what's left and who does it. pay review, pay unpaid, pay scheduled, pay paid, pay issues and pay upcoming show the other tabs; pay show --period <id> or --payout <id> shows one in full; pay config shows how payouts are prepared and sent. It never sends or schedules money: it prints the link to do that in Oatmilk |
oatmilk add <files…> | Adds receipts, invoices and saved emails (PDF, photos, .eml), like Add a receipt; adding the same file again does nothing |
oatmilk exec "<prompt>" | One Ask AI request, streamed to standard output |
oatmilk chats | Your recent Ask AI chats; chats show <id> prints one |
oatmilk search [words] | Searches transactions |
oatmilk api <action> [input] | Runs any API action and prints its JSON |
oatmilk actions [words or action] | Lists actions, or explains one |
oatmilk mcp | Serves Oatmilk's MCP tools over standard input and output; mcp config prints setup for AI apps |
oatmilk help, oatmilk version | The help and the version |
Memory and dreaming
Press Ctrl+K and search for memory, dream or cadence, or run oatmilk settings memory setup. Workspace facts and the person's own private memory stay separate. Finance can read workspace facts; administrators change them. Personal memory belongs only to the caller in the selected workspace.
Use --for organization or --for personal to choose the scope explicitly, and --org to select the workspace. A remembered contributor sign-in defaults to personal memory; without a remembered role, commands default to organization memory. Dream settings include enabled, cadenceDays and retentionDays. This example enables weekly reviews of your own future explicit preferences:
oatmilk settings memory update '{"enabled":true,"cadenceDays":7}' --for personal --org ORG_ID --json
oatmilk settings memory list --for personal --org ORG_ID --json
oatmilk settings memory dream --for personal --org ORG_ID --json
oatmilk settings memory status --for personal --org ORG_ID --jsonA queued dream is still waiting; status shows whether it completed or failed. Memory edits use revisions and idempotency keys. remove needs the memory's id and revision, plus --yes outside an interactive terminal.
Provider keys
Search Ctrl+K for Anthropic, credits or AI keys, or run oatmilk settings keys setup. To add an Anthropic key, sign in yourself with oatmilk login, select the workspace, and paste the key into the hidden prompt:
oatmilk settings keys save anthropic --org ORG_ID
oatmilk settings keys show --org ORG_ID --jsonKey writes need a current administrator membership and an OAuth sign-in with accounting read, write and admin permission. API keys cannot authorize provider-key writes. The server verifies the provider key and stores it encrypted for this workspace; responses show status and the last four characters. Provider secrets never pass through Ask AI or MCP tools.
For stdin in Bash, read the key without echoing it, pipe it to the command and clear the shell variable:
read -r -s -p 'Anthropic API key: ' oatmilk_provider_key
printf '%s' "$oatmilk_provider_key" | oatmilk settings keys save anthropic --org ORG_ID --json
unset oatmilk_provider_keyNever put the key itself in command-line arguments or an AI prompt. oatmilk settings keys remove anthropic --org ORG_ID removes it at the current revision. Use --idempotency-key to identify one save or removal; changed input or revision conflicts. After an interrupted write, check settings keys show before starting another change.
Options for every command
| Option | Does |
|---|---|
--host <address> | The Oatmilk to use. production and getoatmilk.com mean Oatmilk Cloud; localhost:3000 a development server. |
--org <id> | The company to work in, for this command |
--json, -j | Prints JSON, including errors |
--local | Uses the Oatmilk on this computer, starting it if it's stopped |
--cloud | Uses Oatmilk Cloud |
--offline | Refuses any Oatmilk on the internet: only this computer and its network. The app never looks for a new version, and oatmilk update refuses |
--setup, --no-setup | Shows the first-run setup again, or never |
--no-start | Leaves a stopped local Oatmilk stopped |
--no-ai | Opens the app without Ask AI; exec refuses to run |
--theme <id> | The app's theme for this run: system, or a theme like matcha or marathon |
--debug | Prints more detail when something fails |
--help, -h | The help |
--version, -v | The version |
Options for one command
| Command | Option | Does |
|---|---|---|
setup | --cloud-for <parts>, --off-for <parts> | Moves parts (account, database, files, agents, classifiers, documents, email, web) to the cloud, or turns them off |
setup | --models <server>, --model-url <address> | ollama, lmstudio or openai-compatible, and its address |
setup | --model, --vision-model, --classifier-model, --embedding-model | The models to use instead of the ones setup picks |
setup, models use, models eval | --classifier-api chat|systemone | Ask the classifier model as a chat model, or as a decision model (Ollama 0.35 or later) |
setup | --runtime docker|source, --source <folder> | Runs Oatmilk in Docker or from a source checkout; --source uses a copy of Oatmilk's source you already have instead of downloading one, in the setup screens too |
setup | --email, --name, --company | Your local account and company |
setup | --download, --pull, --yes | Downloads the source and missing Ollama models without asking |
local password | --reset | Sets a new password for your local account |
models use | --restart | Restarts the local Oatmilk to use the new models |
models eval | --models, --model-url, --model, --vision-model, --classifier-model | Checks these models instead of the ones Oatmilk uses, to try them before switching |
models eval | --only <tasks> | Checks only these tasks, separated by commas: charges, matching, receipts, ask-ai |
models eval | --timeout <seconds> | How long one answer may take before the check stops that task |
models eval | --json | Prints the whole report: each task's score, its bar, its speed and every case |
email use | --key <key> | The Resend API key (re_…); without it, RESEND_API_KEY, then standard input, then a hidden question, then the saved key |
email use | --from <domain> | The domain email is sent from, such as mail.example.com, verified in Resend; Oatmilk picks the part before @ for each kind of email |
email use, email off | --restart, --no-restart | Restarts Oatmilk in Docker to use the change, or never asks; bun run dev reads it by itself |
email use, email off | --source <folder>, --runtime docker|source | An Oatmilk the CLI didn't set up, such as a server made with bun run self-host setup: only its email settings change |
orgs close | --confirm "<name>", --export, --no-export | Closes the company without questions, exporting first or not |
settings memory | --for organization|personal | Chooses shared workspace facts or only the caller's own memory |
settings memory remove | --yes, -y | Forgets the specified memory without an interactive confirmation |
settings memory, settings keys | --idempotency-key <key> | Identifies one write; changed input or revision conflicts |
export | --out <folder>, --no-files, --force | Where to save it, without the files, or into a folder that isn't empty |
migrate | --to <host>, --to-org <id> | The destination Oatmilk and organization, signed in separately |
migrate | --job <id>, --map-user <old=new> | Resume a saved job and map people between installations; repeat the user mapping option for each person |
migrate | --replace-setup | Replace only the destination's empty setup records after previewing its plan |
migrate retention | --item <key>, --evidence "<details>" | Record an operator's source-removal check after transfer. Database records, files, Redis, EVE conversations, backups, provider credentials and identity access must all be checked before offline clearance. |
wipe | --local-data | Also deletes the local Oatmilk's companies, accounts and files |
connect | --no-browser | Prints the page's address instead of opening it |
login | --password, --email | Signs in to your own Oatmilk with an account's email and password |
login | --device | Signs in on another device, then you paste the code |
login | --new | Makes an account first, like oatmilk signup |
login | --api-key [key] | Saves an API key; asks for it, or reads it from standard input, when you leave it out |
login | --no-browser | Prints the sign-in address instead of opening a browser |
login | --scopes "<scopes>" | Asks for fewer permissions than the default, separated by spaces or commas |
logout | --all | Signs out of every address |
add | --for <transaction id> | Attaches the files to that transaction instead of letting Oatmilk match them |
hours add | --date <day> | The day of the work: today (the default), yesterday, a weekday like mon, or a date |
hours add, hours submit, hours none | --yes, -y | Keeps the same work twice, or sends without asking |
hours list | --from <day>, --to <day>, --limit <n> | Entries between two days |
pay | --contractor <id>, --limit <n>, --json | One contractor's timesheets; how many; the full status as JSON |
pay show | --period <id>, --payout <id> | The pay period or payout to show |
ai use | --model <name>, --model-url <address> | The organization's model and this computer's local server connection; only administrators change the shared model, members connect the model already chosen |
ai use | --pull, --yes, --no-test | Downloads a missing model into Ollama, uses a model that didn't call a tool in the check, or skips the check |
exec | --ai oatmilk|local | Oatmilk's AI, or the model on this computer, for this request |
exec | --output-format, -o | text, json or stream-json |
exec | --yes, -y | Approves steps that delete, void, grant access or email people |
exec | --permission-mode ask|bypass | Use approval prompts or run permitted changes without them (YOLO), overriding your saved choice for one request |
exec | --continue | Continues your latest chat |
exec | --chat <id> | Continues a particular chat |
exec | --page <path> | The workspace page Ask AI should look at, such as /finance/transactions |
exec | --quiet, -q | Leaves out the steps and links on standard error |
exec | --no-input | Never asks in the terminal; stops with exit code 7 instead |
api | --input key=value | Sets one input field; repeat it for more |
api | --idempotency-key <key> | Your own idempotency key for a change |
api | --compact | Prints the JSON on one line |
api | --yes, -y | Runs an action that deletes, voids, grants access or emails people without asking |
actions | --refresh | Reads the action list again instead of using the day-old copy |
search | --status <state> | needs_you, working, done or review |
search | --limit <n> | How many to show, up to 500 (default 25) |
mcp | --toolset <names> | Only these toolsets, separated by commas |
| app | --page <path> | Opens the app on this page |
api takes its input as a JSON object argument, @file.json, or - for standard input.
Environment variables
| Variable | Does |
|---|---|
OATMILK_HOST | The default address, used when --host isn't given |
OATMILK_ORG | The default company |
OATMILK_API_KEY | Signs in with an API key; wins over a saved sign-in |
OATMILK_TOKEN | Signs in with an OAuth access token; wins over a saved sign-in |
OATMILK_MIGRATION_DESTINATION_API_KEY, OATMILK_MIGRATION_DESTINATION_TOKEN | Separate destination credentials for migration; otherwise its saved sign-in is used. Source environment credentials are never reused for the destination. |
OATMILK_CONFIG_DIR | Where sign-ins and settings are saved |
OATMILK_CACHE_DIR | Where the action list is cached |
OATMILK_NO_BROWSER | 1 never opens a browser |
OATMILK_DATA_DIR | Where a downloaded copy of Oatmilk's source and the dev server's log are kept |
OATMILK_SOURCE_DIR | The Oatmilk source checkout that runs the local Oatmilk |
OATMILK_OFFLINE | 1 refuses any Oatmilk on the internet, like --offline |
OATMILK_SKIP_SETUP | 1 never shows the first-run setup |
OATMILK_THEME | The app's theme, like --theme |
OATMILK_TERMINAL | light or dark, when the app can't tell your terminal's background |
OATMILK_NO_UPDATE | 1 never checks for new versions |
OATMILK_LOCAL_PASSWORD | The local account's password for setup --local and local password --reset |
RESEND_API_KEY, OATMILK_EMAIL_DOMAIN | The Resend key and sending domain email use resend and setup --cloud-for email save when they aren't given |
OLLAMA_HOST, LMSTUDIO_URL | Where to look for Ollama and LM Studio |
NO_COLOR | Turns colours off |
NODE_EXTRA_CA_CERTS | A certificate authority file to trust, for a self-hosted Oatmilk on *.localhost |
Exit codes
| Code | Means |
|---|---|
| 0 | Done |
| 1 | Failed |
| 2 | Wrong usage |
| 3 | Sign-in needed |
| 4 | Not allowed |
| 5 | Not found |
| 6 | Rate limited |
| 7 | Ask AI needs your input or approval (exec) |
| 130 | Cancelled |
Files it keeps
| What | Where |
|---|---|
Sign-ins and settings (credentials.json) and message history | ~/.config/oatmilk, or $XDG_CONFIG_HOME/oatmilk; %APPDATA%\oatmilk on Windows |
How Oatmilk runs here (setup.json) | Beside the sign-ins |
The last five model checks (model-checks.json) | Beside the sign-ins |
| A downloaded copy of Oatmilk's source, the dev server's log | ~/.local/share/oatmilk, or $XDG_DATA_HOME/oatmilk; ~/Library/Application Support/oatmilk on macOS; %LOCALAPPDATA%\oatmilk\data on Windows |
| The action list | ~/.cache/oatmilk, or $XDG_CACHE_HOME/oatmilk; ~/Library/Caches/oatmilk on macOS; %LOCALAPPDATA%\oatmilk\cache on Windows |
Sign-ins are written so only your user can read them. Deleting the cache is always safe.