Command line

Install the CLI

Install oatmilk with one command, npm, a standalone binary or from source, and keep it up to date.

The CLI is one file with no dependencies to install. Its command is oatmilk.

Before you start

  • Node.js 22 or newer, unless you use a standalone binary. Check with node --version.
  • A terminal at least 80 columns wide for the full-screen app. Headless commands work anywhere, including CI.
  • An Oatmilk account, on the hosted Oatmilk or your own installation.

Install it with one command

On macOS and Linux:

Shell
curl -fsSL https://getoatmilk.com/install.sh | sh

The script checks for Node.js 22, downloads oatmilk, checks it against the SHA-256 that getoatmilk.com publishes beside it, puts it in ~/.oatmilk/bin and adds that folder to your shell's PATH. Open a new terminal and run oatmilk. An install made this way updates itself.

SettingDoes
OATMILK_INSTALL_DIRInstalls somewhere other than ~/.oatmilk
OATMILK_NO_MODIFY_PATH=1Leaves your shell's startup files alone

On Windows, use npm (below).

Try it without installing

npx downloads the latest version and runs it. Nothing stays installed apart from npm's cache.

Shell
npx @getoatmilk/cli --version
npx @getoatmilk/cli

Put npx @getoatmilk/cli wherever these guides write oatmilk.

Install it with npm

Shell
npm install -g @getoatmilk/cli
oatmilk --version

Other package managers work the same way:

Shell
pnpm add -g @getoatmilk/cli
yarn global add @getoatmilk/cli
bun add -g @getoatmilk/cli

Standalone binaries

Each CLI release on GitHub has binaries that don't need Node.js, for people with access to the Oatmilk repository:

ComputerFile
Mac with Apple siliconoatmilk-darwin-arm64
Mac with an Intel processoroatmilk-darwin-x64
Linux on x64oatmilk-linux-x64
Linux on ARMoatmilk-linux-arm64
Windowsoatmilk-windows-x64.exe

Download the file for your computer and SHA256SUMS from the same release, then check it and put it on your PATH:

macOS or Linux
sha256sum --check --ignore-missing SHA256SUMS   # on macOS: shasum -a 256 --check --ignore-missing SHA256SUMS
chmod +x oatmilk-linux-x64
sudo mv oatmilk-linux-x64 /usr/local/bin/oatmilk
oatmilk --version

On macOS, if the system refuses to open a downloaded binary, allow it in System Settings › Privacy & Security, or run xattr -d com.apple.quarantine /usr/local/bin/oatmilk.

From source

If you have Oatmilk's source, for example to self-host it, you can build the CLI from the same checkout. You need Bun and Node.js 22 or newer.

Shell
bun install
bun run build:cli                    # writes packages/cli/dist/oatmilk.js and checks it runs
node packages/cli/dist/oatmilk.js --version
npm install -g ./packages/cli        # optional: makes oatmilk a command

Run bun run build:cli again after pulling changes.

Check that it works

Shell
oatmilk --version
oatmilk --help
oatmilk whoami        # exits with code 3 and a hint until you sign in

Next, sign in.

Update

Shell
oatmilk update            # installs the newest version the way oatmilk was installed
oatmilk update --check    # only says whether there is one

When a new version is out, the app shows it at the top right, like ↑ 0.3.0 ⌃U. Press ⌃U (or type /update) to install it; restart oatmilk to use it. An install made with install.sh updates itself in the background instead, and tells you when it has. The app checks at most every 12 hours, never slows its start, and never checks in CI.

Choose how it updates, here or under Settings › Updates in the app:

Shell
oatmilk update auto      # update by itself (the default)
oatmilk update notify    # only tell me
oatmilk update off       # never check

An npm, pnpm, Yarn or Bun install is updated with the same package manager, for example npm install -g @getoatmilk/cli@latest. npx @getoatmilk/cli@latest always runs the newest version. A standalone binary is updated by downloading the new one.

Uninstall

Sign out first, so the sign-ins it saved are revoked, then remove it and its files:

Shell
oatmilk logout --all
npm uninstall -g @getoatmilk/cli             # or, for install.sh: rm -rf ~/.oatmilk
rm -rf ~/.config/oatmilk ~/.cache/oatmilk    # macOS also: ~/Library/Caches/oatmilk

On Windows, the folders are %APPDATA%\oatmilk and %LOCALAPPDATA%\oatmilk. The command reference lists everything the CLI saves.