Menu / Docs Navigation

Client CLI

The Tunnely desktop GUI is entirely optional. Power users and server administrators can interface directly with the local tunnely-core binary via the command line for headless operation and Bash/PowerShell scripting.

Basic Commands

Ensure the tunnely executable is within your system's PATH. On Linux, this is handled automatically during the .deb installation.

tunnely connect [region]

Initiates the cryptographic handshake and establishes the virtual routing interface. Optionally accepts a targeted region code (e.g. us-east). If omitted, connects to the optimal geographic node.

tunnely disconnect

Gracefully tears down the WireGuard tunnel and restores the operating system's default routing gateway, avoiding DNS leaks.

tunnely status

Returns a JSON-formatted payload of the current daemon state, including connected relays, elapsed latency, bytes transferred, and active IP assigned.

tunnely auth login

Generates a unique OAuth device-code flow URL out to the console. Follow the URL in any web browser to authenticate the headless instance against your active subscription.

Scripting Integration

Because commands like status output strictly structured JSON, they can be easily piped into tools like jq for automated health monitoring scripts.

# Check if daemon is routing traffic
if [ "$(tunnely status | jq -r .state)" == "connected" ]; then
    echo "Mesh routing active."
else
    echo "Warning: connection dropped. Reinitializing..."
    tunnely connect
fi