Authentication
Authenticate with the Nullify CLI using browser-based login or API tokens
Interactive Login
For interactive usage, the CLI opens your browser to authenticate directly with your identity provider:
nullify auth login --host 'api.<TENANT>.nullify.ai'This will:
Open your browser to authenticate with a sign-in provider enabled for your workspace
Redirect back to the CLI automatically once authenticated
Store the host in
~/.nullify/config.jsonand the tokens in~/.nullify/credentials.json
Auth Commands
Check login status
nullify auth statusView current token
nullify auth tokenSwitch between hosts
nullify auth switch --host 'api.<OTHER-TENANT>.nullify.ai'Log out
View configuration
CI/CD Usage
For non-interactive environments (CI/CD pipelines, scripts), use token-based authentication:
Using a Nullify API Token
Or set via environment variable:
Using a GitHub Token
Inside a GitHub Actions workflow, pass the workflow's GitHub token with --github-token. The CLI exchanges it for a Nullify token:
Token Precedence
The CLI resolves authentication in this order:
--nullify-tokenflagNULLIFY_TOKENenvironment variable--github-tokenflag, exchanged for a Nullify token — only whenGITHUB_ACTIONS=trueandGITHUB_REPOSITORYis setStored credentials from
nullify auth login
Credential Storage
nullify auth login writes two files under ~/.nullify/:
config.json— stores the host you logged in to ({"host": "..."}), used to resolve the default Nullify instance for subsequent commands.credentials.json— a per-host map of credentials (keyed by host), each entry containingaccess_token,refresh_token,expires_at, and anyquery_parametersreturned at login. Written with file permissions0600(owner read/write only).
Tokens are automatically refreshed using the stored refresh token when they expire.
For Microsoft Entra sign-in, the directory and your activated member identity must already be connected. A CLI login does not create workspace access. Entra-only sign-in, deactivation, role changes and network admission also apply to human CLI requests; a stored token does not bypass them. Service-account and GitHub Actions authentication are separate automation flows.
Browser callback troubleshooting
Interactive login starts a temporary HTTP listener on 127.0.0.1 using an available port and waits up to ten minutes. If the browser does not open, use the login URL printed in the terminal. Complete login on the same machine as the CLI so the callback reaches that listener. A browser on your laptop cannot automatically reach a callback listener inside an unrelated remote server or container; use token authentication for those environments.
Service-account tokens have different lifetime and revocation behavior from interactive credentials. Read API Authentication before choosing a role or rotating a service account. Avoid printing auth token output into CI logs.
Last updated