opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: exec variable substitution

Open nikaro opened this issue 1 week ago • 2 comments

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

nikaro avatar Jan 09 '26 14:01 nikaro