Skip to main content
mo is a command-line client over the MerchantOps API. You authenticate once with OAuth 2.0 (PKCE) — a browser sign-in that stores tokens in your OS keychain — and the CLI then rides the same authenticated, organization-scoped API as the dashboard. It holds no database credentials or service secrets.
A packaged install (Homebrew / PyPI) is on the way. For now, install from source as shown below.

Install

# from the repo root, into your virtualenv
pip install -e ./merchantops-sdk -e ./merchantops-cli
mo --help          # or: python -m merchantops_cli --help

Configure

Settings resolve in order: environment variable → ~/.config/merchantops/config.toml → default.
SettingEnv varNotes
API base URLMERCHANTOPS_API_URLdefault http://localhost:8000
OAuth issuerMERCHANTOPS_OAUTH_ISSUERthe Stytch Connected Apps authorization server
CLI client idMERCHANTOPS_OAUTH_CLIENT_IDthe CLI’s public OAuth client (PKCE, no secret)
API audienceMERCHANTOPS_API_AUDIENCEthe resource the access token is bound to
config.toml
api_url = "https://api.merchantops.ai"
oauth_issuer = "https://<project>.customers.stytch.dev"
client_id = "connected-app-..."
audience = "https://api.merchantops.ai"

Sign in

mo auth login      # browser PKCE sign-in; stores tokens in the keychain
mo auth status     # token presence + expiry
mo auth whoami     # identity from the stored token
mo auth logout

Commands

mo products list --limit 20 --brand HOKA
mo products get 1000047719
mo products search "clifton 10"
mo product-types list
All output is JSON — pipe it into jq:
mo products search "clifton 10" | jq '.[].key'
Tokens are keyed by api_url, so if you change the API URL, run mo auth login again.