OpenProgram Docs

Authentication

OpenProgram requires safe, lawful and compliant use of Anthropic services: the official API, legitimately obtained API keys, API-account billing, and calls that comply with Anthropic's terms of service and usage policy.

Storage

WhereWhat it holds
~/.openprogram/auth/<provider>/credentials.jsonThe provider's ordered list: its sign-ins and its own keys, and a row without a secret for each company key and environment key
~/.openprogram/auth/_keys/<company>.jsonAPI keys, stored once for the company that issued them
Environment variableA read-only row while it is set, such as OPENAI_API_KEY; read on every use, never copied
Amazon Bedrock, Google VertexThe cloud SDK's own chain, detected at runtime: AWS_PROFILE, access keys, bearer token and so on; ADC

Files are mode 0600. With --profile <name> the root is ~/.openprogram-<name>/.

Sources

SourceHow
API keyopenprogram providers login deepseek, or printf %s "$KEY" | openprogram providers login deepseek --api-key-stdin. --api-key also works but lands in shell history.
Anthropicopenprogram providers login anthropic, then your Anthropic API key

login picks the method; --method forces one.

Subscriptions

A ChatGPT or Claude plan is used by running the vendor's own program as an outside agent: Third-Party Harnesses. OpenProgram never signs in to a plan itself (why).

Import from this machine

openprogram providers discover        # lists only, writes nothing
openprogram providers adopt qwen_cli  # one entry; --all imports everything
SourceLocationImported into
Qwen CLI~/.qwen/oauth_creds.jsonqwen
gh CLI~/.config/gh/hosts.ymlgithub

While the external CLI is present a pointer is stored and its file re-read on every call. Otherwise the token is copied and OpenProgram refreshes it.

Helper command

For tokens issued by a CLI such as aws, sso-helper or token-fetcher: in Settings → Model Services add type credential_process.

FieldMeaningDefault
commandArgv list, run without a shellrequired
parsesjson, or text for stripped stdoutjson
json_key_pathKeys to walk, such as ["creds", "token"]. Empty: the document must be a string[]
cache_secondsToken reuse. 0 runs on every call300
timeout_secondsLimit per run60

The login smoke test runs it once. A failure (non-zero exit, timeout, bad output, missing key path) fails the request with the command and its stderr, and never falls back to another credential. Fix the helper, or remove it to use another source.

Enterprise SSO (sso) is not implemented; the API and resolver reject it.

Manage

Commands: Configure models.

RuleBehaviour
One listA provider's keys and sign-ins, in order
FailoverA conversation keeps the key it started on; one that is rate limited, out of quota or refused gives way to the next usable one, and the reply shows a one-line notice
Strategyin-order (default, the first usable one), evenly, least-used
PinA conversation can keep one key: Use several keys
openprogram providers keys openai list
openprogram providers keys openai add --name work
openprogram providers keys openai move work --to 1
openprogram providers keys openai strategy evenly
Last updated · 2026-11-30