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 login

How it works

  1. The CLI starts a local callback server (preferred ports around 48443–48447).
  2. Your browser opens your Hookie web app sign-in flow (HOOKIE_WEB_APP_URL, e.g. http://localhost:3000).
  3. 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_abc123

Troubleshooting

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_URL must match where the dashboard runs.
  • Use HOOKIE_RELAY_URL when your relay is not the default for your build (see cli/README.md).

Logout

hookie logout

Removes stored credentials; run hookie login again to use authenticated commands.

Next steps

On this page