Tokens, shell completion, and bug reports
surge token
Section titled “surge token”Print the authentication token for a running local Surge server:
surge tokenUse this token to connect a remote TUI or configure an API client. Do not paste it into issues, chat messages, shell history, or repositories.
The system service has a separate token. Retrieve it with:
surge service tokenOn systems that protect service data, the latter command can require an elevated terminal.
surge completion
Section titled “surge completion”Generate completion code for Bash, Zsh, Fish, or PowerShell:
surge completion bashsurge completion zshsurge completion fishsurge completion powershellThe command writes the script to standard output. Redirect it to a file or use your shell’s documented completion-installation method. For a temporary Bash session, for example:
source <(surge completion bash)surge bug-report
Section titled “surge bug-report”Open Surge’s guided GitHub issue flow:
surge bug-reportBefore filing, collect the Surge version (surge --version), operating system,
the command or steps that reproduce the issue, and relevant logs. Redact tokens,
cookies, private URLs, and file paths before sharing them.