0 if a token is found, 1 if not.
TTY vs pipe behaviour
- TTY (running it directly in a terminal): adds a trailing newline so it reads cleanly.
- Pipe / command substitution: no trailing newline.
$(tunnelbyte token)captures exactly the token bytes, no stray\n.
Example
Notes
- The token is whatever tier you’re currently on (anonymous, free, or paid). Same token the CLI uses for every other command.
- If no token is cached yet, run
tunnelbyte signupor anytunnelbyte <region>invocation first - the latter will mint an anonymous token on the spot. - To clear the cached token, use
tunnelbyte logout.