Skip to content

gitai setup

Save provider credentials and a default model for later commands.

gitai setup
gitai setup --provider gemini
gitai setup --provider openai --api-key sk-... --model openai/gpt-5
gitai setup --provider anthropic --skip-validation

Options

Option Description
--provider Provider to configure: gemini, openai, or anthropic.
--api-key API key to save. If omitted, setup prompts securely.
--model Default LiteLLM model for this provider.
--validate / --skip-validation Validate the API key and selected model before saving. Validation is enabled by default.

Validation

When validation is enabled, gitai makes a small LiteLLM request using the selected provider, API key, and model. If the key is invalid, the command exits with an error and does not write the config file.