Configuration
Where the CLI stores your token, and the env vars and flags that override it.
The CLI keeps configuration in one place and lets environment variables or flags override it — handy for CI, ephemeral shells, or pointing at a non-production server.
Config file
login saves your token (and the base URL you logged in against)
to:
~/.hackspot/config.jsonThe file is written with 0600 permissions (readable only by you). logout
clears the token from it.
Environment variables
| Variable | Effect |
|---|---|
HACKSPOT_TOKEN | Token to authenticate with. Overrides the saved one. |
HACKSPOT_BASE_URL | App base URL to target. Overrides the saved base URL. |
HACKSPOT_TOKEN is the recommended way to authenticate in CI — set it instead of
running login on a machine you can't approve from a browser.
Targeting a different server
Every command that talks to the API accepts these flags:
| Flag | Description |
|---|---|
--dev | Target http://localhost:3000. |
--base-url <url> | Target a custom base URL. |
The base URL is resolved in this order, first match wins:
--base-url <url>--dev(http://localhost:3000)HACKSPOT_BASE_URL- the base URL saved at login
- production —
https://hackspot.dev
Authentication precedence
The token is resolved as:
HACKSPOT_TOKEN- the token saved in
~/.hackspot/config.json
If neither is present, commands that need auth will tell you to run
login.