Skip to content

Conversation

taigrr
Copy link
Contributor

@taigrr taigrr commented Jul 31, 2025

Describe your changes

Add ability to push/pop CRUSH_-prefixed env vars for anthropic/bedrock.

Basically, when developing actively on AWS, we might want to use crush in our AWS environment using credentials that are not the same as the credentials that are used for the bedrock instance.

This PR adds a function that allows for Push/Pop of the relevant AWS_* env vars when running in bedrock mode

@taigrr taigrr requested a review from kujtimiihoxha as a code owner July 31, 2025 06:30
@charmcli
Copy link
Contributor

charmcli commented Jul 31, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@taigrr
Copy link
Contributor Author

taigrr commented Jul 31, 2025

I have read the Contributor License Agreement (CLA) and hereby sign the CLA.

@taigrr
Copy link
Contributor Author

taigrr commented Jul 31, 2025

hey @kujtimiihoxha , I made the CRUSH_ prefix logic generic as discussed.

@taigrr taigrr changed the title feat: allow for using CRUSH_ prefixed env-vars for bedrock without clobbering AWS env vars feat: allow for using CRUSH_ prefixed env-vars without clobbering default env vars Jul 31, 2025
@kujtimiihoxha
Copy link
Member

@taigrr do you think its worth adding this in the docs?

@taigrr
Copy link
Contributor Author

taigrr commented Jul 31, 2025

Yeah, should be added to docs, as you see fit

@caarlos0
Copy link
Member

I think we could do this in *shellVariableResolver.ResolveValue, checking both vars with and without the prefix

@taigrr
Copy link
Contributor Author

taigrr commented Jul 31, 2025

Could! This works for me if there's a better way please go for it

@taigrr
Copy link
Contributor Author

taigrr commented Aug 7, 2025

hey @kujtimiihoxha any updates on the plans for this? Hoping to deploy next week.

Copy link
Member

@kujtimiihoxha kujtimiihoxha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

talked to @caarlos0 about the implications of doing this another way and I think for now this is OK

@kujtimiihoxha kujtimiihoxha merged commit 65cd249 into charmbracelet:main Aug 8, 2025
10 checks passed
@taigrr taigrr deleted the feat/crush-prefix branch August 9, 2025 06:24
scalabl3 pushed a commit to metaphori-ai/crush that referenced this pull request Aug 19, 2025
…ault env vars (charmbracelet#391)

* feat: allow for using CRUSH_ prefixed env-vars for bedrock without clobbering AWS env vars

* feat: make the CRUSH_ prefix generic
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.

4 participants