Configuration
aic reads configuration in this order:
- Built-in defaults
- Global config at
~/.aicommit - Process environment variables
flowchart LR
Defaults["Built-in defaults"] --> Global["~/.aicommit"]
Global --> Env["Process environment"]
Env --> Flags["CLI flags (--provider, --fgm, etc.)"]
Flags --> Runtime["Resolved runtime config"]
Set global values:
aic config set AIC_API_KEY=<key> AIC_MODEL=gpt-5.4-mini
Read values:
aic config get AIC_MODEL AIC_AI_PROVIDER
Describe settings:
aic config describe
aic config describe AIC_MODEL
You can also inspect the config subcommands directly:
aic config --help
aic config set --help
aic config get --help
aic config describe --help
aic config describe uses the same shared config-key descriptions as the CLI help metadata, so the wording stays aligned across help output, completions, and the config reference commands.
Supported Keys
AIC_AI_PROVIDER
AIC_API_KEY
AIC_API_URL
AIC_API_CUSTOM_HEADERS
AIC_PROXY
AIC_TOKENS_MAX_INPUT
AIC_TOKENS_MAX_OUTPUT
AIC_DESCRIPTION
AIC_EMOJI
AIC_MODEL
AIC_LANGUAGE
AIC_MESSAGE_TEMPLATE_PLACEHOLDER
AIC_PROMPT_FILE
AIC_ONE_LINE_COMMIT
AIC_OMIT_SCOPE
AIC_GITPUSH
AIC_REMOTE_ICON_STYLE
AIC_HOOK_AUTO_UNCOMMENT
AIC_TOKENS_MAX_INPUT defaults to 128000 for new configs.
Example one-off environment override:
AIC_MODEL=gpt-5.4-mini aic
aic intentionally does not read local .env files. Project .env files often contain unrelated application secrets, cookies, or service credentials, so configuration should be set with aic config set or explicit process environment variables instead.
AIC_DESCRIPTION and AIC_EMOJI default to true for new configs.
For Azure OpenAI, set AIC_AI_PROVIDER=azure-openai, set AIC_API_URL to your Azure OpenAI v1 endpoint, and use your deployment name as AIC_MODEL.
For Anthropic, set AIC_AI_PROVIDER=anthropic and AIC_API_KEY, then optionally override the default claude-sonnet-4-20250514 model with AIC_MODEL.
For Groq, set AIC_AI_PROVIDER=groq and AIC_API_KEY, then optionally override the default llama-3.1-8b-instant model with AIC_MODEL.
For Ollama, set AIC_AI_PROVIDER=ollama and optionally override the default llama3.2 model with AIC_MODEL. AIC_API_KEY is not required for the default local Ollama server.
For local CLI providers, set AIC_AI_PROVIDER=claude-code or AIC_AI_PROVIDER=codex and leave AIC_MODEL=default. These providers use the installed claude or codex binary from PATH and rely on that CLI’s existing login state instead of AIC_API_KEY.
Use --provider <name> to override the configured provider for a single run:
aic --provider anthropic
aic review --provider groq
aic --provider ollama
aic --provider claude-code
aic review --provider codex
aic log --provider codex --yes
aic models --provider ollama
The alias claudecode is accepted and normalized to claude-code.
AIC_GITPUSH controls whether aic offers a push step after committing. In the normal interactive flow, the single-remote prompt now defaults to Yes. With aic --yes, aic pushes automatically when exactly one remote is configured.
AIC_REMOTE_ICON_STYLE controls Git host icons in push prompts. Use auto or nerd-font for Nerd Font icons with emoji and label fallback, emoji for emoji with label fallback, or label for plain provider labels only.
Prompt Template
The default system prompt template lives at prompts/commit-system.md.
Use a custom prompt template without recompiling:
aic config set AIC_PROMPT_FILE=/absolute/path/to/commit-system.md
Prompt templates can use these placeholders:
{{commit_convention}}
{{body_instruction}}
{{line_mode_instruction}}
{{scope_instruction}}
{{style_examples}}
{{language}}
{{context_instruction}}
Ignore Files
Use .aicommitignore in a repository to exclude files from AI diff input:
path/to/large-asset.zip
**/*.jpg