CLI
Install and configure the Motivation Money command-line interface.
The Motivation Money CLI (mp) gives you terminal access to payroll runs, team management, treasury, audit logs, and webhooks. It's built for operators who prefer the command line and for AI agents that work through shell execution.
Install
npm install -g @motivation-money/cliThis installs the mp command globally.
Authentication
Authenticate with an API key from the Motivation Money dashboard (Settings > API Keys):
mp auth login --key mpk_live_<your-key>Credentials are stored in ~/.mp/credentials.json with restricted file permissions (mode 0600). The CLI uses the same API key scopes as the REST API.
Check your auth status:
mp auth statusLog out (clears stored credentials):
mp auth logoutConfiguration
View current config:
mp configSet the API base URL (useful for self-hosted or staging environments):
mp config --set-url https://your-instance.example.com/api/v1Set the default output format:
mp config --set-format jsonConfig is stored in ~/.mp/config.json. The default base URL is https://motivation-money.vercel.app/api/v1.
Output Formats
Every command supports three output formats via -f, --format:
| Format | Description |
|---|---|
table | Human-readable ASCII table (default in terminal) |
json | Structured JSON (default when piped) |
csv | Comma-separated values |
The CLI auto-detects piped output and switches to JSON, so commands like mp runs list | jq '.data[0]' work without extra flags.
Global Options
| Option | Description |
|---|---|
--base-url <url> | Override API base URL for a single command |
-f, --format <fmt> | Output format: table, json, or csv |
Error Handling
The CLI retries failed requests automatically (up to 2 retries). Rate-limited responses (429) respect the Retry-After header. If you're not authenticated, commands return:
Not authenticated. Run: mp auth login --key <your-api-key>Next
See the command reference for the full list of commands.