> Markdown version of https://tuna.am/en/docs/cli/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# CLI reference

Generated from tuna v0.43.1: the same commands and flags that `tuna --help` prints. To install or update the client, see the [installation guide](https://tuna.am/en/docs/guides/install/install-cli.md).

## Tunnels

| Command                                                        | Description                                  |
| -------------------------------------------------------------- | -------------------------------------------- |
| [`tuna app`](https://tuna.am/en/docs/cli/app.md)               | Connect a local upstream to a protected App. |
| [`tuna http`](https://tuna.am/en/docs/cli/http.md)             | Start an HTTP tunnel.                        |
| [`tuna kubernetes`](https://tuna.am/en/docs/cli/kubernetes.md) | Start a Kubernetes API tunnel.               |
| [`tuna mysql`](https://tuna.am/en/docs/cli/mysql.md)           | Start a MySQL tunnel.                        |
| [`tuna postgres`](https://tuna.am/en/docs/cli/postgres.md)     | Start a PostgreSQL tunnel.                   |
| [`tuna redis`](https://tuna.am/en/docs/cli/redis.md)           | Start a Redis tunnel.                        |
| [`tuna ssh`](https://tuna.am/en/docs/cli/ssh.md)               | Start an SSH server.                         |
| [`tuna tcp`](https://tuna.am/en/docs/cli/tcp.md)               | Start a TCP tunnel.                          |
| [`tuna trigger`](https://tuna.am/en/docs/cli/trigger.md)       | Start a command trigger.                     |

Windows also has `tuna 1c`, which publishes a 1C infobase. See [1C tunnel](https://tuna.am/en/docs/tunnels/1c.md).

## Tunnel automation

| Command                                                  | Description                                               |
| -------------------------------------------------------- | --------------------------------------------------------- |
| [`tuna detect`](https://tuna.am/en/docs/cli/detect.md)   | Detect ports and prepare tuna commands.                   |
| [`tuna run`](https://tuna.am/en/docs/cli/run.md)         | Start tunnels by running a command.                       |
| [`tuna service`](https://tuna.am/en/docs/cli/service.md) | Manage tuna background services.                          |
| [`tuna start`](https://tuna.am/en/docs/cli/start.md)     | Start tunnels by tag or name from the configuration file. |

## Account

| Command                                                  | Description                                                                   |
| -------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [`tuna api-key`](https://tuna.am/en/docs/cli/api-key.md) | Manage your api-keys.                                                         |
| [`tuna login`](https://tuna.am/en/docs/cli/login.md)     | Login to tuna.am account.                                                     |
| [`tuna logout`](https://tuna.am/en/docs/cli/logout.md)   | Logout from tuna.am account: revoke the session and remove the saved api key. |
| [`tuna session`](https://tuna.am/en/docs/cli/session.md) | Manage your sessions.                                                         |
| [`tuna whoami`](https://tuna.am/en/docs/cli/whoami.md)   | Print current user details.                                                   |

## Resources

| Command                                                          | Description                        |
| ---------------------------------------------------------------- | ---------------------------------- |
| [`tuna domain`](https://tuna.am/en/docs/cli/domain.md)           | Manage your domain reservations.   |
| [`tuna endpoint`](https://tuna.am/en/docs/cli/endpoint.md)       | Manage your endpoint reservations. |
| [`tuna monitor`](https://tuna.am/en/docs/cli/monitor.md)         | Interact with monitors.            |
| [`tuna secrets`](https://tuna.am/en/docs/cli/secrets.md)         | Secrets operations.                |
| [`tuna ssh-session`](https://tuna.am/en/docs/cli/ssh-session.md) | Manage your SSH sessions.          |
| [`tuna tunnel`](https://tuna.am/en/docs/cli/tunnel.md)           | Manage your tunnels.               |

## Access

| Command                                                  | Description              |
| -------------------------------------------------------- | ------------------------ |
| [`tuna bastion`](https://tuna.am/en/docs/cli/bastion.md) | Bastion operations.      |
| [`tuna mesh`](https://tuna.am/en/docs/cli/mesh.md)       | Mesh network operations. |

## Other

| Command                                                        | Description                                                                            |
| -------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [`tuna completion`](https://tuna.am/en/docs/cli/completion.md) | Output shell completion code for the specified shell (bash, zsh, fish, or powershell). |
| [`tuna config`](https://tuna.am/en/docs/cli/config.md)         | Configuration file operations.                                                         |
| [`tuna diagnose`](https://tuna.am/en/docs/cli/diagnose.md)     | Diagnose connection issues.                                                            |
| [`tuna skills`](https://tuna.am/en/docs/cli/skills.md)         | Install agent skills bundled with this CLI.                                            |
| [`tuna version`](https://tuna.am/en/docs/cli/version.md)       | Print the version string and check for updates.                                        |

## Global flags

Work with any command. Commands that print lists can output JSON with `--json`, for scripts and AI agents.

| Flag                  | Description                                                                     |
| --------------------- | ------------------------------------------------------------------------------- |
| `--config string`     | Path to configuration file.                                                     |
| `--log string`        | Path to log file: /file/to/file.log, stdout, stderr.                            |
| `--log-format string` | Log record format: text, json. Default: `text`.                                 |
| `--log-level string`  | Logging level: debug, info, warn, error, fatal. Default: `info`.                |
| `--no-colors`         | Disable colors in output.                                                       |
| `--proxy string`      | Proxy for connections to tuna, SOCKS5 only: socks5://\[user:pass@]host\[:port]. |
