Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

sedlund
Copy link
Contributor

@sedlund sedlund commented Nov 29, 2024

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
Copy link
Member

caarlos0 commented Dec 3, 2024

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
Copy link
Contributor Author

sedlund commented Dec 4, 2024

appreciate the feedback. a bit cleaner now :)

@caarlos0 caarlos0 merged commit 9b63a4a into charmbracelet:main Dec 4, 2024
7 checks passed
@caarlos0
Copy link
Member

caarlos0 commented Dec 4, 2024

looks good! Thanks!

@sedlund sedlund deleted the feat/api-key-cmd branch December 5, 2024 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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