# tls

> For AI agents: the complete documentation index is at https://buddy.works/llms.txt

## Usage

```bash
bdy agent tunnel tls|TLS [options] [host:port]
```

Add a TLS tunnel run by the agent

## Arguments

| **Argument** | **Description** |
| :--- | :--- |
| `host:port` | Target address to redirect traffic to. Host is optional and by default local machine. Port is by default 80 (optional) |

## Options

| **Option** | **Description** |
| :--- | :--- |
| `--context <name>` | Connection and scope context: default, git, link or a saved name. Overrides the globally active context for this invocation. |
| `--examples` | Show only examples; with this flag --format accepts text, json or jsonl |
| `--verbose` | Show REST API requests, responses, timing and retries on stderr |
| `-r, --region <region>` | override default region ("eu", "us", "as") |
| `-w, --whitelist <cidrs...>` | Whitelist provided IP CIDRs. Use "*" to allow all |
| `-n, --name <name>` | Name of the tunnel |
| `-t, --timeout <seconds>` | Enforce connection timeout in seconds |
| `-k, --key <key>` | Path to a TLS key |
| `-c, --cert <cert>` | Path to a TLS PEM certificate |
| `--ca <ca>` | Path to a TLS PEM CA certificate for TLS auth |
| `-i, --terminate <at>` | Terminate TLS at "target", "agent", "region". By default TLS is terminated at "region" |
| `--note <note>` | Resource note |
| `--agent-note <note>` | Note for AI agents operating on this resource; stored as agent_note and meant to be read before acting on the resource |
| `-f, --follow` | Follow tunnel details |
| `--format <text\|json>` | Output format: json, text. JSON CLI errors: {error:{code,message,hint}}, exit 1. Default: text (choices: "text", "json") |
| `-h, --help` | display help for command |

Documentation for bdy v1.25.34

## Examples

### Start tls tunnel on port 80

```bash
bdy agent tunnel tls 80
```

### Start tls tunnel and terminate tls at target

```bash
bdy agent tunnel tls 443 -i target
```


---
Original source: https://buddy.works/docs/cli/agent/tunnel/tls