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

CommandDoes
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 setupChooses 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 statusWhere 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 modelsOllama 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 aiWhere 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 emailWho 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 loginSigns in through your browser
oatmilk signupMakes 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 logoutSigns out of this machine and revokes the sign-in; a local account's saved password is forgotten too
oatmilk whoamiWho you're signed in as, the company, your role and permissions
oatmilk orgsThe 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 settingsThe 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 memoryMemory 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 keysEncrypted 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 migratePlans or resumes a verified organization data move; migrate plan, start, resume, status, verify, cutover, retention and cancel authenticate source and destination separately
oatmilk connectWhere 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 syncSyncs Wise and Stripe now; sync wise or sync stripe syncs one
oatmilk exportDownloads every record and file of the company into a folder
oatmilk wipeRemoves every sign-in, setting and history from this computer
oatmilk updateInstalls the newest version; --check only says whether there is one; update auto|notify|off chooses whether the app updates by itself
oatmilk hoursA 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 payWhere 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 chatsYour 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 mcpServes Oatmilk's MCP tools over standard input and output; mcp config prints setup for AI apps
oatmilk help, oatmilk versionThe 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:

sh
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 --json

A 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:

sh
oatmilk settings keys save anthropic --org ORG_ID
oatmilk settings keys show --org ORG_ID --json

Key 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:

Shell
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_key

Never 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

OptionDoes
--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, -jPrints JSON, including errors
--localUses the Oatmilk on this computer, starting it if it's stopped
--cloudUses Oatmilk Cloud
--offlineRefuses 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-setupShows the first-run setup again, or never
--no-startLeaves a stopped local Oatmilk stopped
--no-aiOpens 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
--debugPrints more detail when something fails
--help, -hThe help
--version, -vThe version

Options for one command

CommandOptionDoes
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-modelThe models to use instead of the ones setup picks
setup, models use, models eval--classifier-api chat|systemoneAsk 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, --companyYour local account and company
setup--download, --pull, --yesDownloads the source and missing Ollama models without asking
local password--resetSets a new password for your local account
models use--restartRestarts the local Oatmilk to use the new models
models eval--models, --model-url, --model, --vision-model, --classifier-modelChecks 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--jsonPrints 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-restartRestarts 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|sourceAn 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-exportCloses the company without questions, exporting first or not
settings memory--for organization|personalChooses shared workspace facts or only the caller's own memory
settings memory remove--yes, -yForgets 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, --forceWhere 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-setupReplace 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-dataAlso deletes the local Oatmilk's companies, accounts and files
connect--no-browserPrints the page's address instead of opening it
login--password, --emailSigns in to your own Oatmilk with an account's email and password
login--deviceSigns in on another device, then you paste the code
login--newMakes 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-browserPrints 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--allSigns 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, -yKeeps 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>, --jsonOne 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-testDownloads a missing model into Ollama, uses a model that didn't call a tool in the check, or skips the check
exec--ai oatmilk|localOatmilk's AI, or the model on this computer, for this request
exec--output-format, -otext, json or stream-json
exec--yes, -yApproves steps that delete, void, grant access or email people
exec--permission-mode ask|bypassUse approval prompts or run permitted changes without them (YOLO), overriding your saved choice for one request
exec--continueContinues 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, -qLeaves out the steps and links on standard error
exec--no-inputNever asks in the terminal; stops with exit code 7 instead
api--input key=valueSets one input field; repeat it for more
api--idempotency-key <key>Your own idempotency key for a change
api--compactPrints the JSON on one line
api--yes, -yRuns an action that deletes, voids, grants access or emails people without asking
actions--refreshReads 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

VariableDoes
OATMILK_HOSTThe default address, used when --host isn't given
OATMILK_ORGThe default company
OATMILK_API_KEYSigns in with an API key; wins over a saved sign-in
OATMILK_TOKENSigns in with an OAuth access token; wins over a saved sign-in
OATMILK_MIGRATION_DESTINATION_API_KEY, OATMILK_MIGRATION_DESTINATION_TOKENSeparate destination credentials for migration; otherwise its saved sign-in is used. Source environment credentials are never reused for the destination.
OATMILK_CONFIG_DIRWhere sign-ins and settings are saved
OATMILK_CACHE_DIRWhere the action list is cached
OATMILK_NO_BROWSER1 never opens a browser
OATMILK_DATA_DIRWhere a downloaded copy of Oatmilk's source and the dev server's log are kept
OATMILK_SOURCE_DIRThe Oatmilk source checkout that runs the local Oatmilk
OATMILK_OFFLINE1 refuses any Oatmilk on the internet, like --offline
OATMILK_SKIP_SETUP1 never shows the first-run setup
OATMILK_THEMEThe app's theme, like --theme
OATMILK_TERMINALlight or dark, when the app can't tell your terminal's background
OATMILK_NO_UPDATE1 never checks for new versions
OATMILK_LOCAL_PASSWORDThe local account's password for setup --local and local password --reset
RESEND_API_KEY, OATMILK_EMAIL_DOMAINThe Resend key and sending domain email use resend and setup --cloud-for email save when they aren't given
OLLAMA_HOST, LMSTUDIO_URLWhere to look for Ollama and LM Studio
NO_COLORTurns colours off
NODE_EXTRA_CA_CERTSA certificate authority file to trust, for a self-hosted Oatmilk on *.localhost

Exit codes

CodeMeans
0Done
1Failed
2Wrong usage
3Sign-in needed
4Not allowed
5Not found
6Rate limited
7Ask AI needs your input or approval (exec)
130Cancelled

Files it keeps

WhatWhere
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.