Emailable CLI

This is the official CLI to work with Emailable from
the command line.
[!WARNING]
This is prerelease software and is not yet considered production ready.
Commands, flags, and output may change without notice between releases.
Documentation
See the CLI docs.
Installation
Quick install
macOS, Linux, WSL2:
curl -fsSL https://emailable.com/install-cli | bash
Windows (PowerShell):
irm https://emailable.com/install-cli.ps1 | iex
Both scripts pick the right archive for your OS/arch, verify it against the
published checksums.txt, and install the binary (plus bundled man pages on
Unix). Override the version with EMAILABLE_VERSION=v0.2.0 or the install
prefix with EMAILABLE_PREFIX=$HOME/.local.
Package managers
Homebrew (macOS):
brew install emailable/tap/emailable
Scoop (Windows):
scoop bucket add emailable https://github.com/emailable/scoop-bucket
scoop install emailable
In each snippet below, set ver/arch to the release you want (use
arch=arm64 on ARM). The checksums.txt step verifies the download before
installing — these are GitHub-hosted artifacts, not served from a signed repo.
Debian / Ubuntu:
ver=<version> arch=amd64
base="https://github.com/emailable/emailable-cli/releases/download/v$ver"
curl -fsSLO "$base/emailable_${ver}_linux_$arch.deb"
curl -fsSL "$base/checksums.txt" | sha256sum -c --ignore-missing
sudo apt install "./emailable_${ver}_linux_$arch.deb"
Fedora / RHEL:
ver=<version> arch=amd64
base="https://github.com/emailable/emailable-cli/releases/download/v$ver"
curl -fsSLO "$base/emailable_${ver}_linux_$arch.rpm"
curl -fsSL "$base/checksums.txt" | sha256sum -c --ignore-missing
sudo dnf install "./emailable_${ver}_linux_$arch.rpm"
Alpine:
ver=<version> arch=amd64
base="https://github.com/emailable/emailable-cli/releases/download/v$ver"
curl -fsSLO "$base/emailable_${ver}_linux_$arch.apk"
curl -fsSL "$base/checksums.txt" | sha256sum -c --ignore-missing
sudo apk add --allow-untrusted "./emailable_${ver}_linux_$arch.apk"
From source
go install github.com/emailable/emailable-cli@latest
Prebuilt binaries
Download the archive for your OS and architecture from the
releases page, verify it
against checksums.txt, extract, and drop the binary on your PATH:
tar -xzf emailable_<version>_<os>_<arch>.tar.gz
sha256sum -c checksums.txt --ignore-missing
mv emailable /usr/local/bin/
Usage
Authentication
The CLI supports two auth modes. Use OAuth for interactive workstations and
API keys for CI, scripts, or AI agents that can't complete a browser flow.
OAuth (interactive)
emailable login runs the OAuth 2.0 device-authorization flow. It prints
a short user code and a verification URL; complete the prompt in your
browser and the CLI receives an access token.
emailable login
Credentials are stored at ~/.config/emailable/credentials.json. Run
emailable logout to remove the stored token. Access tokens are refreshed
automatically when close to expiry; a dim Refreshed access token. line is
printed to stderr when that happens (suppressed in --json mode).
API key (non-interactive)
There are two ways to use an API key. Credentials are deliberately not
accepted on the command line for everyday commands — a key in argv lands
in shell history and is visible to other users via ps. Use an env var or
save the key once via login.
Per-invocation (preferred for CI):
EMAILABLE_API_KEY=live_xxx... emailable account status
Saved (preferred for personal machines): emailable login accepts an
API key via stdin pipe or via the login-local --api-key flag. The key is
validated against /v1/account before being written to
~/.config/emailable/credentials.json, and supersedes any prior OAuth
credentials.
# Pipe from a password manager / secret store (key stays out of shell history)
op read "op://Vault/Emailable/api-key" | emailable login
# Or pass directly (lands in shell history — avoid for shared machines)
emailable login --api-key live_xxx...
After saving, every subsequent command uses the stored key with no env
var or flag needed. Run emailable logout to remove it.
Resolution order when multiple sources are configured:
EMAILABLE_API_KEY env var
- Stored API key (
api_key in ~/.config/emailable/credentials.json)
- Stored OAuth access token