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

# Jupiter CLI

> Trade on Jupiter from your terminal, Telegram, or through AI agents.

The Jupiter CLI (`jup`) lets you interact with Jupiter's products from the command line. Trade [spot](https://developers.jup.ag/docs/swap.md), open [perps](https://developers.jup.ag/docs/perps.md) positions, [earn yield](https://developers.jup.ag/docs/lend.md), and more.

> [!WARNING]
>
> The CLI is pre-v1 (early alpha) and should be considered unstable. Breaking changes may be introduced without warning.

## Install

```bash theme={null}
npm i -g @jup-ag/cli
```

For other install methods (install script, standalone binary), see the [CLI repository](https://github.com/jup-ag/cli).

## Usage

The CLI covers Jupiter products like Spot (swaps, portfolio, transfers), Perps (leveraged longs/shorts), and Lend (earn yield on deposits). For the full command reference, key management, configuration, and examples, see the full [CLI documentation](https://github.com/jup-ag/cli/tree/main/docs) in the public CLI repository.

## Ways to Use

### Terminal

The most direct way. Install, add a key, and start trading:

```bash theme={null}
jup keys add mykey
jup spot swap --from SOL --to USDC --amount 1
```

### Telegram

Use the CLI through [OpenClaw](https://openclaw.ai), an open-source AI assistant that runs locally and connects to Telegram and other chat apps (WhatsApp, Discord, Slack, Signal).

1. Install OpenClaw:
   ```bash theme={null}
   curl -fsSL https://openclaw.ai/install.sh | bash
   ```
2. Connect your Telegram account by following the [OpenClaw setup guide](https://openclaw.ai)
3. Install the Jupiter CLI:
   ```bash theme={null}
   npm i -g @jup-ag/cli
   ```
4. Add a key:
   ```bash theme={null}
   jup keys add mykey
   ```
5. Message your OpenClaw bot on Telegram:

   > "Swap 1 SOL to USDC"

   OpenClaw executes the CLI command on your behalf and returns the result in chat.

> [!TIP]
>
> For a more lightweight starting point, check out [miniclaw](https://github.com/yoeven/miniclaw), a minimal open-source personal AI assistant you can run locally with Telegram.

### AI Agents

The CLI is designed to be LLM-friendly. All commands are non-interactive and support JSON output for structured, parseable responses. For agents that integrate the APIs themselves, the [Documentation MCP](https://developers.jup.ag/docs/ai/mcp.md) and the [agent skills](https://developers.jup.ag/docs/ai/skills.md) provide the reference material and integration guidance.

```bash theme={null}
jup spot swap --from SOL --to USDC --amount 1 -f json
```

AI agents (Claude Code, Cursor, Codex, etc.) can invoke CLI commands directly through shell access. Point your agent at the [CLI documentation on GitHub](https://github.com/jup-ag/cli/tree/main/docs) for complete command references and JSON response schemas.

> [!TIP]
>
> Set an [API key](https://developers.jup.ag/docs/portal/api-keys.md) from [Portal](https://developers.jup.ag/portal) for higher [rate limits](https://developers.jup.ag/docs/portal/rate-limits.md) when running automated workflows:
>
> ```bash theme={null}
> jup config set --api-key <your-key>
> ```

## Resources

> [card] [CLI Documentation](https://github.com/jup-ag/cli/tree/main/docs)
>
> Full command reference, key management, configuration, and examples.

> [card] [Portal](https://developers.jup.ag/portal)
>
> Get an API key for higher rate limits.


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