Skip to main content

tuna-cli

Installation​

The tuna-cli container image for Docker, Podman and Kubernetes has its own page.

Installation using winget​

Open PowerShell and run the command:

winget install --id yuccastream.tuna ; powershell

Installing the MSI package​

Download the latest version of tuna using this link and run the installation by double-clicking the file.

Installer for Windows x64 (requires administrator privileges)
🖌 Authenticity verification

Starting from version 0.27.4, all artifacts are signed using cosign. To verify the originality of the archive, install the cosign client, download the public key, and perform the verification.

winget install GnuPG.Gpg4win
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_x64.msi" -OutFile "tuna_x64.msi"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_x64.msi.sig" -OutFile "tuna_x64.msi.sig"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna.asc" -OutFile "tuna.asc"
gpg --import tuna.asc
gpg --verify tuna_x64.msi.sig tuna_x64.msi

Manual installation​

Open PowerShell and run the commands one by one:

winget install GnuPG.Gpg4win
cd $env:TEMP
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_windows_amd64.zip" -OutFile "$env:TEMP\tuna_windows_amd64.zip"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_windows_amd64.zip.sig" -OutFile "$env:TEMP\tuna_windows_amd64.zip.sig"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna.asc" -OutFile "$env:TEMP\tuna.asc"
gpg --import tuna.asc
gpg --verify tuna_windows_amd64.zip.sig tuna_windows_amd64.zip
Expand-Archive -Path "$env:TEMP\tuna_windows_amd64.zip" -DestinationPath "$env:TEMP\tuna" -Force
Copy-Item -Path "$env:TEMP\tuna\tuna.exe" -Destination "$env:USERPROFILE\AppData\Local\Microsoft\WindowsApps" -Force

Verify the installation​

To make sure the installation was successful, run the command:

tuna help

Authorization​

Sign up in the dashboard and log in to the CLI:

tuna login

The CLI asks how you want to log in:

  • in the browser — a confirmation page opens. The session is stored in the system keyring: Keychain on macOS, Credential Manager on Windows, Secret Service on Linux;
  • with a link — for a machine without a browser, such as a server over SSH. The CLI shows a link and a code: open the link on any device and check that the code matches. The CLI detects SSH sessions and offers this method first;
  • with an API key — paste the key, and the CLI saves it to the configuration file.

To skip the question, pass a flag: --web for the browser, --no-browser for the link. If there is no system keyring, add --insecure-storage: the session is saved to credentials.json next to the configuration file.

Check the login and log out:

tuna whoami # which account you are logged in to
tuna session list # all sessions of the account
tuna logout # revoke the session and remove the saved key

You can view and revoke sessions in your profile.

Logging in on a server and in CI​

Where you can't log in through a browser, use an API key. When you create the key, choose the tunnel preset or enable tunnel access — without the tunnels:connect scope, the key can't start tunnels. Pass the key through standard input so that it doesn't stay in the shell history:

echo "$TUNA_API_KEY" | tuna login --with-api-key

Or set the TUNA_API_KEY variable — then you don't need to log in:

export TUNA_API_KEY=<your_key>
tuna http 8080
Old tokens

Since tuna-cli 0.39, tt_… tokens, the --token flag, the TUNA_TOKEN variable, and the tuna config save-token command are deprecated. They still work, but the CLI warns you to replace them: log in with tuna login or switch to TUNA_API_KEY and --api-key. For the steps on a laptop, a server, in CI, and in services, see Migrating to sessions and API keys.

Get started​

Everything is ready to start working. Run tuna with a port and share the link with your colleagues:

tuna http 8080
Permanent address

Each time you start a tunnel it gets a new address. To keep the address, use your free permanent subdomain: tuna http 8080 --subdomain=<your-subdomain>. The subdomain is bound to your account and only works with your account from the Authorization step.

What's next?​

  • Explore HTTP tunnel configuration examples
  • Need access to a non-HTTP service? Learn more in the TCP tunnel section