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

# CLI Overview

> Decibel CLI for trading, account management, and market data from the terminal

## What is the Decibel CLI?

The Decibel CLI (`@decibeltrade/cli`) is a command-line interface for trading on Decibel DEX. It provides direct terminal access to:

* **Trading** - Place and cancel orders (limit, market, stop, TWAP), manage positions, set TP/SL
* **Account management** - Multi-account support with encrypted local storage
* **Market data** - Prices, orderbooks, and real-time WebSocket streaming

<Info>
  The CLI requires a [Node API token](/quickstart/node-api-key) for authentication. Get yours from [Geomi](https://geomi.dev) before starting.
</Info>

The CLI also ships with a built-in [MCP server](/agents/mcp/overview) with 25 tools, enabling AI agents like Claude to trade through natural language.

<CardGroup cols={3}>
  <Card title="Installation" icon="download" href="/cli/installation">
    Install the CLI globally via npm, yarn, or pnpm.
  </Card>

  <Card title="Configuration" icon="gear" href="/cli/configuration">
    Set up accounts, environment variables, and network selection.
  </Card>

  <Card title="Command Reference" icon="terminal" href="/cli/reference">
    Full reference for all available commands and options.
  </Card>
</CardGroup>

## Quick start

```bash theme={null}
# Set required environment variables
export DECIBEL_NODE_API_KEY=aptoslabs_...
export DECIBEL_NETWORK=testnet

# Add your trading account
decibel-cli account add

# List available markets
decibel-cli markets ls

# Check BTC price
decibel-cli markets price BTC/USD

# Place a limit order
decibel-cli trade order limit buy 0.01 BTC/USD 50000

# View open positions
decibel-cli trade positions
```

## Design

The CLI is designed for two audiences:

* **AI agents** (primary) - All commands support `--json` output for machine-readable responses. The built-in MCP server exposes 25 tools for direct agent integration.
* **Human power users** (secondary) - Formatted tables, color-coded output, and real-time watch mode via WebSocket.

## MCP server

The CLI includes a built-in Model Context Protocol (MCP) server that allows AI agents like Claude to interact with Decibel programmatically. See the [MCP Server](/agents/mcp/overview) section under the Agents tab for setup instructions and the full tool reference.

## Related

* [MCP Server](/agents/mcp/overview) - AI agent integration via Model Context Protocol
* [TypeScript SDK](/typescript-sdk/overview) - Programmatic SDK for Node.js and browser environments
* [REST API](/api-reference/rest/overview) - Direct HTTP API access
* [WebSocket API](/api-reference/websocket/overview) - Real-time streaming API
