> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moneyline.co/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Reference

> Command-line access to Moneyline — create submissions, upload documents, pull analytics, and tail webhooks without writing code.

## Installation

```bash theme={null}
npm install -g @moneyline/cli
```

## Authentication

`login` prompts for a key interactively; `set-key` takes it as an argument (handy in scripts, though it lands in your shell history).

```bash theme={null}
moneyline auth login          # prompts for the key
moneyline auth set-key ml_live_xxxxx
moneyline auth whoami         # show the active key's tenant
```

Configuration is stored in `~/.moneyline/config.json`.

## Global options

These work on every command:

| Option | Description |
| - | - |
| `--format <format>` | Output as `table` (default), `json`, or `csv` |
| `--base-url <url>` | Override the API base URL for one invocation |

```bash theme={null}
moneyline submissions list --format json
moneyline submissions list --base-url http://localhost:3000
```

## Submissions

```bash theme={null}
# --external-id is required
moneyline submissions create --external-id deal-001 --name "Acme Corp"
moneyline submissions create --external-id deal-002 --metadata '{"source":"broker"}'

moneyline submissions list
moneyline submissions list --status processed --limit 10
moneyline submissions list --cursor eyJ...

moneyline submissions get <id>
moneyline submissions status <id>
moneyline submissions delete <id>
```

## Documents

```bash theme={null}
moneyline documents upload <submission-id> <file-path>

moneyline documents list
moneyline documents list --submission-id <id> --limit 50

moneyline documents get <id>
moneyline documents parse <id>

# Export a submission's documents; defaults to stdout
moneyline documents export <submission-id> -o statements.xlsx
```

## Transactions

```bash theme={null}
moneyline transactions list
moneyline transactions list --submission-id <id> --limit 100

moneyline transactions get <id>

# Enrich from a JSON file containing an array, or {"transactions": [...]}
moneyline transactions enrich -f transactions.json
```

## Analytics

```bash theme={null}
moneyline analytics scorecard <submission-id>
moneyline analytics cashflow <submission-id>
moneyline analytics risk-score <submission-id>
moneyline analytics balance <submission-id>
moneyline analytics anomalies <submission-id>
moneyline analytics statistics <submission-id>
```

The API exposes more analytics than the CLI wraps — see the [SDKs](https://docs.moneyline.co/sdks/typescript.md) for the full set of fifteen.

## Policies and rules

```bash theme={null}
moneyline policy evaluate <submission-id>

moneyline policy rules
moneyline policy metrics        # metrics available to build rules against

moneyline policy create-rule \
  --name "Low average balance" \
  --metric average_daily_balance \
  --operator "<" \
  --threshold 5000 \
  --severity warning \
  --message "Average daily balance below \$5,000"

moneyline policy delete-rule <id>
```

`--name`, `--metric`, `--operator`, and `--threshold` are required; `--severity` defaults to `warning`.

## Webhooks

```bash theme={null}
moneyline webhooks create \
  --url https://example.com/moneyline \
  --events submission.processed document.parsed

moneyline webhooks list
moneyline webhooks delete <id>
```

`listen` forwards events to a local port — the fastest way to develop against webhooks without a public URL:

```bash theme={null}
moneyline webhooks listen -p 4000
```

## MCP server

```bash theme={null}
# Serve over HTTP (default) or stdio
moneyline mcp serve -p 8080
moneyline mcp serve --stdio

# Print the config snippet for Claude Desktop
moneyline mcp install
```

See [MCP Server](https://docs.moneyline.co/tools/mcp.md) for the full tool catalogue.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.