login
Connect this machine to your hackspot.dev account.
login links this machine to your account with a device-code flow: the CLI shows
a 6-digit code, you enter it on the website while signed in, and the CLI is handed
a token saved to ~/.hackspot/config.json.
npx @hackspot/cli login Your code: 7F3K2Q
Open https://hackspot.dev/app/cli and enter it to connect.
(Expires in 10 minutes.)The CLI opens the verify URL for you and polls until you approve the code. Once
approved, your token is saved and you're ready to list and
build.
Flags
| Flag | Description |
|---|---|
--no-open | Don't open the browser automatically. |
--dev | Target http://localhost:3000. |
--base-url <url> | Target a custom base URL. |
Check or clear your session
npx @hackspot/cli whoami # show the linked account (validates the token)
npx @hackspot/cli logout # clear the local tokenlogout only removes the local token — the device stays registered server-side
until the token expires or is revoked. See Configuration
for where the token lives and how to override it with environment variables.