Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

feat: api-key-cmd to run command to get API key - #398

Merged
caarlos0 merged 1 commit into
charmbracelet:mainfrom
sedlund:feat/api-key-cmd
Dec 4, 2024
Merged

caarlos0 merged 1 commit into
charmbracelet:mainfrom
sedlund:feat/api-key-cmd

Conversation

@sedlund

@sedlund sedlund commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

implements and closes #388

@sedlund
sedlund requested a review from caarlos0 as a code owner November 29, 2024 10:11
@sedlund sedlund changed the title Feat/api key cmd feat: api-key-cmd to run command to get API key Nov 29, 2024
@caarlos0

caarlos0 commented Dec 3, 2024

Copy link
Copy Markdown
Contributor

I think we can make the command a string in the configuration, and then split it with shellwords.

running it could also be exec.Command(args[0], args[1:]...).CombinedOutput() instead of the start and wait thing.

other than that, I think this is a good idea! thanks for the PR :)

@sedlund

sedlund commented Dec 4, 2024

Copy link
Copy Markdown
Contributor Author

appreciate the feedback. a bit cleaner now :)

@caarlos0
caarlos0 merged commit 9b63a4a into charmbracelet:main Dec 4, 2024
@caarlos0

caarlos0 commented Dec 4, 2024

Copy link
Copy Markdown
Contributor

looks good! Thanks!

@sedlund
sedlund deleted the feat/api-key-cmd branch December 5, 2024 01:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add per provider api-key-cmd key that takes a command that outputs API_KEY

2 participants