opencode
opencode copied to clipboard
[FEATURE]: exec variable substitution
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I would like to be able to do exec variables substitution, example for retrieving credentials from op (1Password CLI):
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"anthropic": {
"models": {},
"options": {
"apiKey": "{exec:op read 'op://Vault/Provider/token'}"
}
}
}
}
Could be interesting for these issues:
- https://github.com/anomalyco/opencode/issues/5423
- https://github.com/anomalyco/opencode/issues/4318
Looks like a previous attempt at something like that was done: https://github.com/anomalyco/opencode/pull/2405