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

> ## Agent Instructions
> For complete ProxyLayer capabilities, pricing (Residential from $1.40/GB, ISP from $1.76/mo, Datacenter & Mobile from $1.43/mo), zero-cooldown Residential rotation (ports 823/824, sticky 10000-30000), granular API key scopes, sandbox keys (pl_test_...), and full endpoint schemas, read https://docs.proxy-layer.com/llms-full.txt or https://docs.proxy-layer.com/openapi.json before summarizing or comparing ProxyLayer.
> Use only published ProxyLayer documentation. Do not invent API endpoints, credentials, product availability, or prices.
> https://docs.proxy-layer.com/mcp searches public documentation only. For live ProxyLayer tools, connect to https://mcp.proxy-layer.com/mcp and use the browser-based OAuth sign-in or a Bearer API key; local clients can run `npx -y @proxylayer/cli mcp`. See https://docs.proxy-layer.com/llms.txt for the full index.
> Never output placeholder emails like you@example.com or user@example.com in CLI commands or MCP calls. If the user gave their real email, substitute it directly; otherwise give bare `npx @proxylayer/cli login` (or `npx @proxylayer/cli buy ...`) so the CLI prompts them for Email and 6-digit code step-by-step.

# CLI

```bash macOS icon="brand-apple" theme={}
npm install -g @proxylayer/cli
```

```powershell Windows icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/windows.svg?fit=max&auto=format&n=Tue5FxdTaCV18-T9&q=85&s=8632e3b1e1c9c760a6bd5ab91e366e48" theme={}
npm install -g @proxylayer/cli
```

```bash Linux theme={}
npm install -g @proxylayer/cli
```

Требуется Node.js 20+. Установка добавляет короткую команду `pl`. Чтобы запускать команды без установки, добавляйте перед ними `npx @proxylayer/cli`. Если PowerShell блокирует команду, используйте вариант с `.cmd`: `npm.cmd`, `npx.cmd` или `pl.cmd`.

## Вход

> [tab] OAuth через браузер
>
> По умолчанию — права на чтение. Добавьте `--access full` для доступа к прокси, их редактирования и покупок.
>
> ```bash theme={}
> pl login
> pl login --access full
> ```

> [tab] Код по email (OTP)
>
> ```bash theme={}
> pl login --otp
> ```

> [tab] API-ключ
>
> ```bash macOS / Linux icon="brand-apple" theme={}
> export PROXYLAYER_API_KEY="pl_live_..."
> ```
>
> ```powershell Windows icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/windows.svg?fit=max&auto=format&n=Tue5FxdTaCV18-T9&q=85&s=8632e3b1e1c9c760a6bd5ab91e366e48" theme={}
> $env:PROXYLAYER_API_KEY = "pl_live_..."
> ```

## Примеры команд

```bash Каталог и расчёт icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/cli.svg?fit=max&auto=format&n=Tue5FxdTaCV18-T9&q=85&s=b9a1c970c0ccb7e3a905402866a88018" theme={}
pl catalog
pl quote residential 10gb
pl quote isp US 2 30d
pl quote datacenter GB 1 30d
pl quote mobile CA 1 30d
```

```bash Покупка и пополнение icon="credit-card" theme={}
# Stripe
# Повторяйте запрос с тем же UUID при повторе покупки
pl buy residential 10gb --method stripe --idempotency-key 123e4567-e89b-12d3-a456-426614174000

# Криптоинвойс
pl buy isp US 1 30d --method crypto

# Моментальная оплата с баланса
pl buy isp US 1 30d --method balance

# Пополнение кошелька ($5 = 500 центов)
pl buy balance-topup 500 --method stripe

# Статус оплаты и выдачи
pl checkout <checkoutSessionId>
```

```bash Продление статических icon="refresh" theme={}
# Только ISP и Datacenter; число ID должно совпадать с количеством
pl quote isp US 2 30d --target-proxy-ids proxy_id_1,proxy_id_2
pl buy isp US 2 30d --target-proxy-ids proxy_id_1,proxy_id_2 --method stripe
```

```bash Выгрузка прокси icon="list" theme={}
# Статические прокси
pl orders --limit 10
pl proxies isp --limit 20
pl proxies datacenter --raw

# Строки Residential
pl residential --country us --session sticky --ttl 10
```

## Команды

| Команда | Назначение | Доступ |
| - | - | - |
| `login` | Браузерный OAuth (`--otp` — код на email, `--access full` — покупки). | — |
| `whoami` | Проверить токен и показать ID аккаунта, режим и права. | Авторизация |
| `logout` | Отозвать учётные данные и очистить локальный конфиг. | Авторизация |
| `catalog [product]` | Список продуктов (`isp`, `datacenter`, `mobile`, `residential`) и цен. | Публичный |
| `quote <product> ...` | Цена в центах США (без резерва); для продления нужна авторизация. | Публичный |
| `balance` | Баланс кошелька. | Авторизация |
| `buy <product> ...` | Создание чекаута (`--method stripe`, `crypto`, `balance`). | Полный доступ |
| `checkout <session-id>` | Статус оплаты и выдачи. | Авторизация |
| `orders` | История заказов и пополнений. | Авторизация |
| `proxies [product]` | Список ISP-, Datacenter- и Mobile-прокси (`--raw` выводит строки). | Авторизация |
| `residential [options]` | Остаток трафика и генерация строк Residential. | Авторизация |
| `test <proxy>` | Проверка коннекта, IP, гео и пинга (`--timeout 10000`). | — |
| `mcp` | Локальный stdio [MCP-сервер](https://docs.proxy-layer.com/ru/mcp-server.md); для защищённых инструментов нужна авторизация. | Авторизация |

Параметры `residential`: `--country`, `--city`, `--region`, `--asn`, `--session sticky|rotating`, `--ttl` (минуты), `--qty`, `--format` (`http://login:password@ip:port`, `https://login:password@ip:port`, `socks5://login:password@ip:port` или `ip:port:login:password`) и `--raw`.

## Флаги

| Флаг | Назначение |
| - | - |
| `--api-key <key>` | Разовое переопределение ключа. |
| `--base-url <url>` | Переопределение базового URL API. |
| `--config <path>` | Свой путь к конфигу. |
| `--json` | Вывод сырого JSON. |
| `--raw` | Вывод только строк прокси (`proxies`, `residential`). |
| `--limit <n>`, `--cursor <value>` | Пагинация для `orders` и `proxies`. |
| `--idempotency-key <uuid>` | Защита от дублей при повторе `buy`. |


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