---
title: CLI
description: The terudo command line. Docs search, Elements snippets, agent skills, MCP client setup, partner API calls and signed test webhooks.
---

# CLI

Node.js 18 or later, no dependencies. Run it without installing:

```bash
npx -y @terudo/cli help
```

or install it once: `npm install -g @terudo/cli`, then `terudo help`.

## Docs

```bash
terudo docs                      # the docs index
terudo docs elements             # one page, as Markdown
terudo docs search "return url"  # search every page
terudo api-ref "POST /orders"    # one route of the API reference
```

## Snippets

```bash
terudo snippet booking-banner --framework html --destination MA --start 2026-12-03 --end 2026-12-09
terudo snippet trip-offer --framework react --key pk_test_…
terudo snippet webhook --language python
```

Frameworks: `html`, `react`, `next`, `vue`. Elements: `destination-picker`, `plans`, `trip-offer`, `booking-banner`, `esim-status`. Webhook languages: `node`, `python`, `php`, `ruby`.

## Agent skills

```bash
terudo skills list
terudo skills add                        # every skill into .claude/skills/
terudo skills add terudo-elements --agent codex    # into .agents/skills/
terudo skills add --dir ./my/skills      # anywhere
```

## MCP clients

```bash
terudo mcp add claude         # runs: claude mcp add --transport http terudo-docs https://terudo.com/mcp/
terudo mcp add cursor         # writes .cursor/mcp.json
terudo mcp add vscode         # writes .vscode/mcp.json
terudo mcp add codex          # prints the lines for ~/.codex/config.toml
terudo mcp add cursor --partner --key sk_test_…   # the partner MCP with your key instead
```

## Partner API

Set `TERUDO_API_KEY` (a test key while developing), or pass `--key`.

```bash
terudo quote MA 2026-12-03 2026-12-09            # works with the demo key when no key is set
terudo request GET /plans --query destination=JP
terudo request POST /orders --data '{"plan":"MA-10","client":{"email":"test@example.com"},"reference":"test-1"}'
```

## Webhooks

```bash
# Sign a sample event with your endpoint secret and post it to your local server
terudo webhooks trigger order.delivered --url http://localhost:3000/hooks/terudo --secret whsec_…

# Check a signature you received
terudo webhooks verify --secret whsec_… --header "t=…,v1=…" --body-file body.json
```

Events: `order.paid`, `order.delivered`, `order.failed`, `order.refunded`, `order.cancelled`, `esim.installed`, `esim.low_data`, `esim.used_up`, `esim.expiring`, `esim.expired`, `esim.deleted`, `esim.suspended`, `esim.resumed`, `topup.delivered`.
