Command line

Command reference

Every oatmilk command, option, environment variable, exit code and file.

oatmilk --help prints a short version of this page.

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 and the models Oatmilk uses; models start, models test, models pull <name>, models use
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 loginSigns in through your browser
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 use <name or id> switches; orgs close closes the company for good
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 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

Options for every command

OptionDoes
--host <address>The Oatmilk to use. production and getoatmilk.com mean the hosted Oatmilk; 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
--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--runtime docker|source, --source <folder>Runs Oatmilk in Docker or from a source checkout
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
orgs close--confirm "<name>", --export, --no-exportCloses the company without questions, exporting first or not
export--out <folder>, --no-files, --forceWhere to save it, without the files, or into a folder that isn't empty
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--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
ai use--model <name>, --model-url <address>The model to use, and the address of another OpenAI-compatible server
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--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_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
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
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.