Providers

CodeTwin supports major LLM providers through a unified auth and model-selection flow.

How to get API keys

Before running CodeTwin, you need an API key from your chosen provider:

Authenticate a provider

Start interactive login:

bash
codetwin providers login

Skip prompt with a provider id:

bash
codetwin providers login --provider openai

List currently available credentials:

bash
codetwin providers list

Log out from a provider credential:

bash
codetwin providers logout

Discover models

List models for all providers:

bash
codetwin models

List models for one provider:

bash
codetwin models anthropic

Choose model at run time

Pass model explicitly using provider/model format:

bash
codetwin run "summarize this codebase" --model openai/gpt-4o-mini

Credential storage

Provider credentials are stored locally on your machine in CodeTwin data/config directories.

Use environment variables when needed; codetwin providers list also shows env-backed credentials currently detected.

Config files

CodeTwin reads config from supported project/global locations, including:

  • codetwin.json or codetwin.jsonc
  • .codetwin directory in your repository tree

This lets teams keep project defaults in-repo while each developer keeps private credentials local.