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

# Installation

> Install and configure the Market Motion CLI

## Install

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

Verify the installation:

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

## Update

```bash theme={null}
motion update
```

The CLI checks for updates automatically once per day and notifies you when a new version is available. You can also update manually with `npm install -g @marketmotion/cli`.

## Authentication

1. Get an API key at [marketmotion.xyz/developer](https://marketmotion.xyz/developer)
2. Authenticate:

```bash theme={null}
motion auth login mt_live_your_key_here
```

3. Verify:

```bash theme={null}
motion auth status
```

## Quick Start

Search 17,000+ entities:

```bash theme={null}
motion entities search "LeBron James"
```

Browse trending markets:

```bash theme={null}
motion markets trending
```

Scan for cross-venue arbitrage:

```bash theme={null}
motion arb scan --min-spread 3
```

## Configuration

The CLI reads configuration from environment variables and a local config file.

| Variable         | Description                       | Default                        |
| ---------------- | --------------------------------- | ------------------------------ |
| `MOTION_API_KEY` | API key (overrides stored config) | —                              |
| `MOTION_API_URL` | Base API URL                      | `https://api.marketmotion.xyz` |

Config is stored at `~/.config/motion/config.json`.

You can also set the API key via environment variable instead of `motion auth login`:

```bash theme={null}
export MOTION_API_KEY=mt_live_your_key_here
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Commands Reference" icon="terminal" href="/api/cli/commands">
    Full list of CLI commands and options
  </Card>

  <Card title="API Reference" icon="code" href="/api/reference/overview">
    Explore the REST API endpoints
  </Card>

  <Card title="Arbitrage Guide" icon="scale-balanced" href="/api/guides/arbitrage">
    Cross-venue arbitrage strategies
  </Card>

  <Card title="Entity Tracking Guide" icon="chart-network" href="/api/guides/entity-tracking">
    Track entities and set up alerts
  </Card>
</CardGroup>
