Skip to content

Credentials ​

Credentials live in .env in Bishop's own directory, or in the environment, and never in .bishop/config.json. Setup writes each interface's to .env and gitignores it. An exported variable wins over the same one in .env. On a host, keep .env at mode 0600, owned by the user Bishop runs as. In a container, pass them as environment variables.

Credentials alone don't start an interface: it also needs a block in the config, like "slack": {}. That way a token inherited from the environment can't start an interface nobody chose.

VariableFor
BISHOP_SLACK_BOT_TOKEN, BISHOP_SLACK_APP_TOKENSlack. The xoxb- and xapp- tokens, written by bishop slack setup.
BISHOP_GMAIL_CLIENT_ID, BISHOP_GMAIL_CLIENT_SECRET, BISHOP_GMAIL_REFRESH_TOKENGmail over OAuth. You set the first two, and bishop gmail setup writes the third.
BISHOP_GMAIL_USER, BISHOP_GMAIL_SERVICE_ACCOUNTGmail over domain-wide delegation, instead of the OAuth three. The service account is a path to its JSON key, or the JSON itself.
BISHOP_TEAMS_CLIENT_ID, BISHOP_TEAMS_CLIENT_SECRET, BISHOP_TEAMS_TENANT_IDMicrosoft Teams, written by bishop teams setup.
ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKENThe claude harness. Without either, it uses whatever login claude has on the machine.
CODEX_API_KEYThe codex harness. Without it, it uses codex login. The harness doesn't read OPENAI_API_KEY.
TYPESAFE_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY or GOOGLE_API_KEY, OPENROUTER_API_KEYThe decision model, whichever decisions.model.provider names. Startup fails if it's missing. Use the standard name for one key Bishop and the agent share.
BISHOP_TYPESAFE_API_KEY, BISHOP_OPENAI_API_KEY, BISHOP_GEMINI_API_KEY, BISHOP_OPENROUTER_API_KEYA decision model key of Bishop's own, which never reaches the agent. It wins over the standard name when both are set, and the startup log's keyVariable says which one Bishop used. Gemini has no BISHOP_GOOGLE_API_KEY.
CODEX_HOMEWhere the codex harness keeps its state, if not ~/.codex, for threads that share one.
GH_TOKENThe agent's GitHub credential, written by bishop github setup.
BISHOP_LOG_LEVELThe log level, info by default. The one setting of Bishop's own that isn't in the config file.

A harness credential in the environment, rather than a claude or codex login, also gives each new thread a harness home of its own, so threads can't read each other's transcripts under the sandbox.

Variables starting BISHOP_ in Bishop's environment are never passed to the agent. Bishop sets its own BISHOP_ variables in the agent's environment. Anything else in .env reaches the agent's environment unless agent.env withholds it, which is how GH_TOKEN gets there. See What each level runs with. Bishop reads .env at startup, so a change needs a restart.

Setup commands that open a browser are meant to run on a laptop. Copy the lines they write to the server's .env.