# prontaro CLI overview

Source: https://prontaro.com/docs/cli/overview/

A single command-line client for inbound HTTPS and TCP tunnels, local port forwarding, and checking your account status from the terminal or CI.

`prontaro` is a single binary with no dependencies for macOS, Linux, and Windows (`amd64`, `arm64`).

## When you need the CLI — and when you do not

| Task | CLI needed? | Alternative |
| --- | --- | --- |
| Outbound HTTP/HTTPS or `socks5h://` proxy | No | Create credentials in the [dashboard](https://my.prontaro.com/ips) and pass the proxy URL to your app ([quickstart](https://prontaro.com/docs/start/ip.md)) |
| Outbound requests via Relay URL (n8n, Make, Edge) | No | Create a Relay URL in the [dashboard](https://my.prontaro.com/ips) |
| Local TCP port forwarding (`prontaro forward`) | Yes | Connect over `socks5h://` if your client supports SOCKS5 |
| Inbound HTTPS or TCP tunnels (`http`, `tcp`, `run`) | Yes | — |
| Tunnel status, stopping, renaming, deleting, IP [access rules](https://prontaro.com/docs/tunnels/access.md) | Optional | [Prontaro dashboard](https://my.prontaro.com/tunnels) |
| Proxy credentials, [Relay URLs](https://prontaro.com/docs/outbound/relay.md), [custom domains](https://prontaro.com/docs/tunnels/domains.md), Basic Auth passwords, PTR | No | Managed in the [Prontaro dashboard](https://my.prontaro.com/) |

## Install

#### macOS

**macOS · Homebrew**

```bash
brew install prontaro/tap/prontaro
```

**macOS · without Homebrew**

```bash
curl -fsSL https://prontaro.com/install.sh | sh
```

#### Linux

```bash
curl -fsSL https://prontaro.com/install.sh | sh
```

#### Windows

```powershell
irm https://prontaro.com/install.ps1 | iex
```

You can also grab a ready-to-paste install command and manage CLI tokens on the **CLI** page in the dashboard:

CLI [Open in dashboard](https://my.prontaro.com/cli)

Direct links to installer scripts and release metadata:

- Homebrew (macOS & Linuxbrew): `brew install prontaro/tap/prontaro`
- Linux & macOS installer: [install.sh](https://prontaro.com/install.sh)
- Windows PowerShell installer: [install.ps1](https://prontaro.com/install.ps1)
- Latest release JSON: [latest.json](https://dl.prontaro.net/cli/latest.json)

Standalone installs update in place with `prontaro update` (Homebrew uses `brew upgrade prontaro/tap/prontaro`). For OS-specific details, manual verification, and background execution, see [Linux](https://prontaro.com/docs/cli/linux.md), [macOS](https://prontaro.com/docs/cli/macos.md), or [Windows](https://prontaro.com/docs/cli/windows.md).

## Sign in, check status, and sign out

Run `prontaro login` in an interactive terminal. It prints a one-time code (`XXXX-XXXX`), opens your browser to confirm sign-in in the dashboard, and saves a new CLI token locally. Pass `--label` to name this machine in `prontaro ls` and `prontaro status`:

```bash
prontaro login --label dev-laptop
```

```text
Your one-time code: K7NP-4WQR
Open: https://my.prontaro.com/cli/approve?code=K7NP-4WQR
Opening browser… waiting for confirmation (Ctrl+C to cancel).
✓ Logged in: user@example.com · CLI token "dev-laptop" · this machine: dev-laptop
  Next: prontaro status — show your account, static IPs and limits
  Next: prontaro http 3000 — open a local server over HTTPS
```

Over SSH or on a headless host without a browser, `prontaro login` automatically prints the code and URL without trying to open a browser (you can also pass `--no-browser`). If you already created a token on the [CLI page](https://my.prontaro.com/cli), run `prontaro login --token` to paste it with hidden input.

Check your account, active plan, static IPs, and current usage anytime:

```bash
prontaro status
```

### Non-interactive authentication in CI and containers

In CI pipelines, containers, and scripts without a terminal, set the `PRONTARO_KEY` environment variable directly. `prontaro` reads it from memory without writing credentials to disk, and works even on read-only filesystems or containers without `$HOME`:

```bash
# Recommended for CI and containers: use PRONTARO_KEY directly
export PRONTARO_KEY="<your-cli-token>"
prontaro status --json
# In containers, run under a restart policy (e.g. docker run --restart unless-stopped)
prontaro forward 15432 db.example.com:5432 --no-input
```

If you need to save a token once on a persistent headless server, pipe it from a secret file using `--token-stdin`:

```bash
prontaro login --token-stdin --label worker-01 < /run/secrets/prontaro_token
```

### Sign out

```bash
prontaro logout
```

```text
✓ Logged out on this machine. The CLI token remains active until you revoke it in your dashboard (https://my.prontaro.com/cli).
```

To revoke the token everywhere, delete it on the [CLI page](https://my.prontaro.com/cli) of your dashboard.

## Scripting and CI mode

Command output goes to `stdout`; status lines, prompts, warnings, and errors go to `stderr`. Piping `prontaro ls` into another command switches tables to tab-separated lines (TSV) for `awk` or `cut`.

In non-interactive mode (scripts, CI, containers), `http`, `tcp`, `run`, and `forward` exit right away with a non-zero code when startup is refused — for example, on an unpaid account or when you hit the tunnel limit. Rely on your service or container restart policy for retries, such as `docker run --restart unless-stopped`. An already running tunnel does not exit if blocked or overdue; it waits and recovers on its own.

Key flags for automation:

- `--json` — emits structured JSON (an object or array) to `stdout` for management commands (`status`, `ls`, `login`, `logout`, `stop`, `rename`, `rm`, `access`, `service`, `update`, `doctor`, `version`). Running tunnels and `forward` write the plain-text public URL or listen address to `stdout` and line-delimited JSON (JSON Lines, with `"code"` and `"msg"` on errors) to `stderr`.
- `--yes` (`-y`) — confirm deletions, public access changes, and Linux `linger` without prompting.
- `--no-input` — never ask interactive questions (same as `PRONTARO_NO_INPUT=1` or `CI=true`).

See the full list of global flags in the [CLI command reference](https://prontaro.com/docs/cli/commands.md#global-flags).

## Environment variables and state directory

| Variable | Effect |
| --- | --- |
| `PRONTARO_KEY` | CLI token for the current invocation; overrides the saved token without writing to disk. |
| `PRONTARO_STATE_DIR` | Custom state directory path (overridden by `--state-dir`). |
| `NO_COLOR` | Any non-empty value disables ANSI colors (same as `CLICOLOR=0` or `--no-color`). |
| `CI` / `PRONTARO_NO_INPUT` | Disables interactive prompts and switches tunnels from the live screen to plain log lines (same as `--no-input`). |
| `HTTPS_PROXY`, `HTTP_PROXY`, `NO_PROXY` | Outbound proxy used by `prontaro` to reach the Prontaro API and Prontaro nodes. |
| `PRONTARO_LOG_FILE` | Redirects `stderr` to a size-rotated log file (10 MiB × up to 3 files). |
| `PRONTARO_NO_UPDATE_NOTIFIER` | Disables the daily new-version notice. |

The state directory stores your token, machine name, and active tunnel state, accessible only to your user (`0700` on Linux and macOS; user-only ACL on Windows):

- **Linux:** `$XDG_CONFIG_HOME/prontaro` or `~/.config/prontaro`
- **macOS:** `~/Library/Application Support/prontaro`
- **Windows:** `%APPDATA%\prontaro`

## Next steps

- [Install prontaro CLI on Linux](https://prontaro.com/docs/cli/linux.md) — quick or manual installation with SHA256 verification and `systemd` setup.
- [Install prontaro CLI on macOS](https://prontaro.com/docs/cli/macos.md) — setup on Apple Silicon and Intel Macs with Gatekeeper, `zsh`, and `launchd`.
- [Install prontaro CLI on Windows](https://prontaro.com/docs/cli/windows.md) — installation via PowerShell without admin rights and Task Scheduler auto-start.
- [prontaro CLI command reference](https://prontaro.com/docs/cli/commands.md) — full list of subcommands, global flags, and terminal examples.
- [Diagnostics and error codes](https://prontaro.com/docs/cli/errors.md) — troubleshooting with `prontaro doctor` and CLI exit codes.
