[FEATURE]: exec variable substitution #4529

Closed
opened 2026-02-16 17:44:29 -05:00 by yindo · 3 comments
Owner

Originally created by @nikaro on GitHub (Jan 9, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • 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:

Looks like a previous attempt at something like that was done: https://github.com/anomalyco/opencode/pull/2405

Originally created by @nikaro on GitHub (Jan 9, 2026). Originally assigned to: @thdxr on GitHub. ### 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](https://opencode.ai/docs/config/#variables), example for retrieving credentials from `op` (1Password CLI): ```json { "$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
yindo added the discussiondocs labels 2026-02-16 17:44:29 -05:00
yindo closed this issue 2026-02-16 17:44:29 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 9, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5423: Store provider credentials in environment variables (discusses credential management alternatives)
  • #4318: Allow storage of secrets in system credential store (related credential storage approach)
  • #5082: Allow shell commands in the frontmatter (uses shell command execution for config substitution)
  • #5054: {env:MY_VAR} support in agent yaml (variable substitution in config files)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 9, 2026): This issue might be a duplicate of existing issues. Please check: - #5423: Store provider credentials in environment variables (discusses credential management alternatives) - #4318: Allow storage of secrets in system credential store (related credential storage approach) - #5082: Allow shell commands in the frontmatter (uses shell command execution for config substitution) - #5054: {env:MY_VAR} support in agent yaml (variable substitution in config files) Feel free to ignore if none of these address your specific case.
Author
Owner

@nikaro commented on GitHub (Jan 17, 2026):

@thdxr any chance this would get accepted as a feature? 🥺

@nikaro commented on GitHub (Jan 17, 2026): @thdxr any chance this would get accepted as a feature? 🥺
Author
Owner

@nikaro commented on GitHub (Jan 20, 2026):

Closing in favor of older issue: https://github.com/anomalyco/opencode/issues/231

@nikaro commented on GitHub (Jan 20, 2026): Closing in favor of older issue: https://github.com/anomalyco/opencode/issues/231
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4529