Skip to content

hype auth

The auth command manages your CLI authentication.

Authenticate via browser. Opens an OAuth flow. The token is saved automatically when you approve.

Terminal window
hype auth login

Starts a local HTTP server to receive the callback. If the browser doesn’t open automatically, copy the URL from the terminal, or pass --no-browser to only print it (useful over SSH). Times out after 2 minutes.

Save an API token directly. In a terminal, hype asks for it with hidden input, so the token never lands in your shell history or process list.

Terminal window
hype auth token # prompts for the token
echo "$HYPEDOC_API_TOKEN" | hype auth token - # reads it from stdin

Passing the token as an argument (hype auth token <token>) still works, but prints a reminder that it is visible in shell history. For CI, set the HYPEDOC_TOKEN environment variable instead of saving anything.

hype keeps credentials in the system keychain when one is available: the macOS Keychain, the Windows Credential Manager, or the Secret Service (GNOME Keyring, KWallet) on Linux. The config file then holds settings only. On a machine without a keychain, such as an SSH session or a container, it falls back to the config file (readable only by you) and says so when you sign in.

hype auth status shows which one is in use. If you upgrade from a version that kept the token in ~/.hypedoc/config.json, it moves into the keychain the first time you run any command. hype auth logout removes it from both places.

Show current authentication status.

Terminal window
$ hype auth status
+ Authenticated
Token: hdoc_xxx...xxxx
Config: ~/.hypedoc/config.json
API: https://app.myhypedoc.com/api/v1
User: you@example.com (pro)

The command checks the token with the server. If you are not authenticated, or the server rejects the token, it suggests hype auth login or hype auth token and exits with status 1.

Remove the stored token.

Terminal window
hype auth logout