This guide shows how to install the GiraffeCloud CLI on macOS, Linux, and Windows with a single line.
macOS/Linux (Bash):
curl -fsSL https://raw.githubusercontent.com/osa911/giraffecloud/main/scripts/install.sh | bashLinux system service (one command):
curl -fsSL https://raw.githubusercontent.com/osa911/giraffecloud/main/scripts/install.sh | bash -s -- --service systemTo enable prompts (install as a system service, enter API token), run the script in a TTY:
bash <(curl -fsSL https://raw.githubusercontent.com/osa911/giraffecloud/main/scripts/install.sh)Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/osa911/giraffecloud/main/scripts/install.ps1 | iexAfter installation, you can verify:
giraffecloud versionOnce installed, authenticate and start the tunnel agent:
giraffecloud login --token YOUR_API_TOKEN
giraffecloud connectThe agent connects once and serves all tunnels configured for your account. Each tunnel is set up in the web dashboard with a domain and a target_host:port pointing to a machine on your local network.
macOS/Linux script (install.sh):
- --system: Install system-wide to
/usr/local/bin(requires sudo). Default: user install to~/.local/bin. - --service [user|system]: Install and start the service (Linux/systemd). If
--service systemis used, the installer automatically installs the binary to/usr/local/bin, cleans broken symlinks, and configures the service environment. - --url <tar.gz>: Install from a specific release asset URL instead of auto-detecting the latest.
- --token <API_TOKEN>: Run
giraffecloud login --token <API_TOKEN>after install.
Example:
curl -fsSL https://raw.githubusercontent.com/osa911/giraffecloud/main/scripts/install.sh | bash -s -- --service system --token YOUR_API_TOKENWindows script (install.ps1):
- -System: Install system-wide to
C:\\Program Files\\GiraffeCloud\\bin(requires elevated PowerShell). Default: user install to%LOCALAPPDATA%\giraffecloud\bin. - -Url <zip|tar.gz>: Install from a specific release asset URL instead of auto-detecting the latest.
- -Token <API_TOKEN>: Run
giraffecloud login --token <API_TOKEN>after install.
Example:
iex "& { $(iwr -useb https://raw.githubusercontent.com/osa911/giraffecloud/main/scripts/install.ps1) } -System -Token 'YOUR_API_TOKEN'"- macOS/Linux user install goes to
~/.local/bin. If it is not on yourPATH, the installer will add it to your shell rc (~/.zshrcor~/.bashrc) and prompt you tosourceit or open a new terminal. - System installs go to
/usr/local/bin, which is typically already onPATH. - Windows installer adds the chosen install directory to the User or Machine
PATHand broadcasts the change so new terminals pick it up. You may need to open a new terminal.
When --service system is provided on Linux, the installer:
- Stops any existing
giraffecloudservice (best effort) - Installs the binary to
/usr/local/bin - Cleans a broken
/usr/local/bin/giraffecloudsymlink if present - Installs/updates the systemd unit with:
ExecStart=/usr/local/bin/giraffecloud connectEnvironment=GIRAFFECLOUD_HOME=/home/<user>/.giraffecloudEnvironment=GIRAFFECLOUD_IS_SERVICE=1
- Reloads systemd and restarts the service
- macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/osa911/giraffecloud/main/scripts/install.sh | bash -s -- --url https://github.com/osa911/giraffecloud/releases/download/vX.Y.Z/giraffecloud_linux_amd64_vX.Y.Z.tar.gz- Windows (PowerShell):
iex "& { $(iwr -useb https://raw.githubusercontent.com/osa911/giraffecloud/main/scripts/install.ps1) } -Url 'https://github.com/osa911/giraffecloud/releases/download/vX.Y.Z/giraffecloud_windows_amd64_vX.Y.Z.zip'"macOS/Linux (user install):
rm -f ~/.local/bin/giraffecloud
# Optionally remove the PATH line from ~/.zshrc or ~/.bashrc if you added it manuallymacOS/Linux (system install):
sudo rm -f /usr/local/bin/giraffecloudLinux system service uninstall:
sudo systemctl stop giraffecloud || true
sudo systemctl disable giraffecloud || true
sudo rm -f /etc/systemd/system/giraffecloud.service
sudo systemctl daemon-reload
# Optional: remove binary
sudo rm -f /usr/local/bin/giraffecloudWindows:
Remove-Item -LiteralPath "$env:LOCALAPPDATA\giraffecloud\bin\giraffecloud.exe" -ErrorAction SilentlyContinue
# Or, if installed system-wide:
# Remove-Item -LiteralPath 'C:\\Program Files\\GiraffeCloud\\bin\\giraffecloud.exe' -ErrorAction SilentlyContinue- "command not found" after install:
- Open a new terminal to pick up
PATHchanges - Ensure
~/.local/bin(Linux/macOS user install) is in yourPATH - On Windows, verify the install directory exists and is in
PATH
- Open a new terminal to pick up
- Service install skipped on macOS:
- This is expected. Service installation is supported on Linux (systemd) only.
- Corporate proxy / SSL interception:
- Download the release archive manually and pass
--url(Linux/macOS) or-Url(Windows) to the installer.
- Download the release archive manually and pass
The one-liner uses curl | bash (or PowerShell iwr | iex). Review the script before running by opening its URL in a browser.