CLI
Authentication
Login and logout for the Hookie CLI against your self-hosted web app
The CLI uses browser-based login through the same Clerk session as the Next.js dashboard. Your token is stored locally (keychain + config file).
Login
hookie loginHow it works
- The CLI starts a local callback server (preferred ports around
48443–48447). - Your browser opens your Hookie web app sign-in flow (
HOOKIE_WEB_APP_URL, e.g.http://localhost:3000). - After Clerk completes sign-in, the CLI receives and stores a token.
Example output
============================================================
Authorization required
============================================================
Starting local server on port 48443...
Opening browser to complete authentication...
Opening browser...
Verifying token...
✓ Authentication successful!
✓ Successfully authenticated as user user_abc123Troubleshooting
Browser doesn't open
Copy the printed URL into your browser. The path is served by your app, not a third-party host.
Timeout
Run hookie login again if the flow exceeds the CLI timeout.
Wrong app / relay
HOOKIE_WEB_APP_URLmust match where the dashboard runs.- Use
HOOKIE_RELAY_URLwhen your relay is not the default for your build (seecli/README.md).
Logout
hookie logoutRemoves stored credentials; run hookie login again to use authenticated commands.