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

# CLI Tool

> Command-line interface for Moneda

The Moneda CLI lets you interact with your Moneda account directly from the terminal. Check balances, browse transactions, send payments, and more — all without leaving the command line.

## Installation

Install the CLI globally with npm:

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

Verify the installation:

```bash theme={null}
moneda --version
```

## Quick start

Log in to your Moneda account:

```bash theme={null}
moneda auth login
```

This opens your browser for OAuth authentication. Once approved, you're ready to go.

Check your balance:

```bash theme={null}
moneda account balance
```

List recent transactions:

```bash theme={null}
moneda transaction list --limit 5
```

## Global flags

These flags work with any command:

| Flag                    | Description                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------------ |
| `-o, --output <format>` | Output format: `text` (default), `json`, `csv`, `markdown`, or `toon`                            |
| `--api-url <url>`       | Override the API base URL (default: `https://api.moneda.com/v1`)                                 |
| `--api-key <key>`       | Use an API key instead of OAuth (overrides the stored Bearer token)                              |
| `-d, --detail`          | Return the full response shape (default is `?view=lite` — compact output for terminal rendering) |
| `-v, --verbose`         | Show detailed request/response information                                                       |
| `-q, --quiet`           | Suppress all output except errors                                                                |

<Info>
  Use `--output json` to pipe CLI output into other tools like `jq` for scripting and automation. Use `--output toon` to see exactly what an LLM agent would consume from the same endpoint (\~40% fewer tokens than JSON on array-heavy responses — handy when prototyping against `@moneda/services`'s agent tools).
</Info>

### Response shape: `--detail` flag

Every GET command defaults to `?view=lite` — the REST API returns a compact shape optimised for terminal rendering (fewer columns, no UI coaching fields, no masked raw routing).

Pass `--detail` when you need the full shape — typically when scripting with `--output json` and want every field the server exposes.

```bash theme={null}
# Compact — one tidy row per transaction, no wrapping
moneda transaction list --limit 5

# Full — every field (typeGroup, category, note, reference, raw routing…)
moneda transaction list --limit 5 --detail --output json | jq
```

<Tip>
  If a command's output looks truncated, try `--detail --output json` to see everything.
</Tip>

## What's next?

<CardGroup cols={2}>
  <Card title="CLI Authentication" icon="lock" href="/cli/authentication">
    Set up and manage your CLI credentials.
  </Card>

  <Card title="Command Reference" icon="book" href="/cli/commands">
    Browse all available CLI commands.
  </Card>

  <Card title="CLI Examples" icon="lightbulb" href="/cli/examples">
    Common workflows and scripting examples.
  </Card>

  <Card title="REST API" icon="globe" href="/api/overview">
    Use the REST API directly for deeper integrations.
  </Card>
</CardGroup>
