Authentication
Log in and out of the Hookie CLI with browser-based Clerk authentication
The CLI uses browser-based login through the same Clerk session as the Hookie dashboard. Your token is stored locally (system keychain, with a config-file fallback).
Login
hookie loginHow it works
- The CLI starts a local callback server (preferred ports
48443–48447, then any free port). - Your browser opens the Hookie sign-in flow at app.hookie.sh (
/cliwith a redirect back to the local callback). - After Clerk completes sign-in, the CLI receives and stores a token.
Official npm builds ship with production defaults. No extra configuration is required for normal use.
Example output
============================================================
Authorization required
============================================================
Starting local server on port 48443...
Opening browser to complete authentication...
Opening browser...
Verifying token...
✓ Authentication successful!
✓ Successfully logged in as Ada Lovelace (ada@example.com)Troubleshooting
Browser doesn't open
Copy the printed URL into your browser. The path is served by Hookie (https://app.hookie.sh/cli?...), not a third-party host.
Timeout
The login flow times out after 5 minutes. Run hookie login again.
Auth works in one terminal but not another
Home directory resolution can differ across environments. Set a stable config dir:
export HOOKIE_CONFIG_DIR="$HOME/.hookie"Logout
hookie logoutClears stored credentials. Run hookie login again before authenticated commands.