CircuitHub

Authentication

How to authenticate with the CircuitHub Platform.

There are two authentication methods, depending on your use case.

Browser login (interactive)

Best for local development and one-off tasks.

circuithub auth login

This opens your browser, where you log in through CircuitHub's standard auth flow. The CLI captures a JWT via a localhost callback and stores it in ~/.config/circuithub/credentials.json. The token is valid for 24 hours.

Check your current status:

circuithub auth status

Log out (removes stored credentials):

circuithub auth logout

API key (machine use)

API key authentication is coming soon. For now, use browser login to authenticate.

Best for CI/CD pipelines and scripts. Once available, you will be able to create a key after logging in:

circuithub auth keys create --name "ci-deploy"

The key will be shown once at creation — save it somewhere secure. Then set it as an environment variable:

export CIRCUITHUB_API_KEY=ch_live_...

When set, CIRCUITHUB_API_KEY will take priority over the stored JWT.

Using tokens with the API directly

All API requests require a Bearer token in the Authorization header:

curl -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  https://api.circuithub.com/v1/workspaces

Credential storage

ItemLocation
JWT token~/.config/circuithub/credentials.json
File permissions0600 (user-only)
Config directoryRespects $XDG_CONFIG_HOME

On this page