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

# CLI

> The trdrs command line: every API operation as a command, generated from the served contract at runtime.

`trdrs` is a zero-dependency command-line client. It reads the engine's served OpenAPI document
when it runs, so its command surface is always exactly the API's — a route added to the engine is
a command the next time you type `trdrs`.

Install from the repository until the first npm release:

```bash theme={null}
git clone https://github.com/Trdrsco/trdrs-cli.git
cd trdrs-cli && npm link
```

Configure with the same environment the Quick Start uses:

```bash theme={null}
export TRDRS_API_BASE_URL=https://app.trdrs.co
export TRDRS_TENANT_KEY=trdrs_sk_...
export TRDRS_PARTNER_KEY=trdrs_sk_...   # used automatically for /api/partner/ routes
```

## The shape

```bash theme={null}
trdrs                          # list the groups
trdrs market-data              # list a group's commands, from the spec
trdrs market-data get-server-time
trdrs account get-the-account-snapshot
trdrs market-data stream-live-bars --symbol ESU6 --tf 1m   # SSE streams to your terminal
trdrs api GET /api/market/time # the raw escape hatch
```

## The trading guard

A trading write is never frictionless by accident. Without `--live`, the CLI prints the exact
request it would send — with your key redacted and a generated `clientOrderId` injected — and
refuses:

```bash theme={null}
trdrs trading place-an-order --data '{"instrument":"ESU6","side":"buy","qty":1,"orderType":"market"}'
# POST https://app.trdrs.co/api/trading/order
# ...the full request, not sent...
# trdrs: this is a trading write — not sent; re-run with --live to send it
```

Idempotent by default: when your data omits `clientOrderId`, the CLI generates one and prints it,
so a retried command can never place a second order.
