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:
- OpenAI: Create an account and generate a key on the OpenAI Platform.
- Anthropic: Create an account and generate a key from the Anthropic Console.
- Groq: Get a free high-speed key from the GroqCloud Console.
- Google Gemini: Generate your free key through Google AI Studio.
- Ollama: A local system option! See the Ollama API docs to install and run locally.
Authenticate a provider
Start interactive login:
codetwin providers loginSkip prompt with a provider id:
codetwin providers login --provider openaiList currently available credentials:
codetwin providers listLog out from a provider credential:
codetwin providers logoutDiscover models
List models for all providers:
codetwin modelsList models for one provider:
codetwin models anthropicChoose model at run time
Pass model explicitly using provider/model format:
codetwin run "summarize this codebase" --model openai/gpt-4o-miniCredential 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.