Hackspot Docs

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.json

The file is written with 0600 permissions (readable only by you). logout clears the token from it.

Environment variables

VariableEffect
HACKSPOT_TOKENToken to authenticate with. Overrides the saved one.
HACKSPOT_BASE_URLApp 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:

FlagDescription
--devTarget http://localhost:3000.
--base-url <url>Target a custom base URL.

The base URL is resolved in this order, first match wins:

  1. --base-url <url>
  2. --dev (http://localhost:3000)
  3. HACKSPOT_BASE_URL
  4. the base URL saved at login
  5. production — https://hackspot.dev

Authentication precedence

The token is resolved as:

  1. HACKSPOT_TOKEN
  2. the token saved in ~/.hackspot/config.json

If neither is present, commands that need auth will tell you to run login.

On this page