feat: add --api-key flag to set provider API keys as env vars

This commit is contained in:
Paul Gauthier (aider) 2024-12-07 08:23:50 -08:00
parent 1d4918dfbf
commit 13ff038e58
3 changed files with 42 additions and 0 deletions

View file

@ -779,6 +779,13 @@ def get_parser(default_config_files, git_root):
help="Set an environment variable (can be used multiple times)",
default=[],
)
group.add_argument(
"--api-key",
action="append",
metavar="PROVIDER=KEY",
help="Set an API key for a provider (eg: --api-key anthropic=sk-123)",
default=[],
)
##########
group = parser.add_argument_group("Voice Settings")