Authenticate the CLI

Connect Noumena Code to a managed account or a provider key.

Noumena-managed account

OAuth is the canonical login path for Noumena-managed accounts:

ncode auth login

The command opens your browser, completes the authorization flow, and stores the local session for future CLI runs. If the browser does not open automatically, the CLI prints a URL you can paste into a browser manually.

You can also start Noumena Code and enter /login in the REPL.

API keys and BYOK

API keys are supported for automation and direct-provider workflows:

NOUMENA_API_KEY='<your-noumena-key>' ncode
ANTHROPIC_API_KEY='<your-provider-key>' ncode

For persistent automation, inject these variables from your secret manager. Keep real values out of committed files and shared logs.

The launcher also reads a Noumena key from ~/.config/noumena/ncode/api_key. Restrict that file to your user:

chmod 600 ~/.config/noumena/ncode/api_key

See Configure models and endpoints for the exact environment variables that control service endpoints and model selection.

Source note

This page is adapted from the public Noumena-Network/code README, licensed under Apache-2.0.