You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: docs do not align with behavior of instructions #1240
The instructions field is an array of file names to read instructions from so doing "instructions": ["{file:./custom-instructions.md}"] won't work. The instructions were built before support of file: prefixes so maybe they should change
Not sure if the docs should be fixed or the behavior should be updated
### Files
Use `{file:path/to/file}` to substitute the contents of a file:
```json title="opencode.json"
{
"$schema": "https://opencode.ai/config.json",
"instructions": ["{file:./custom-instructions.md}"],
"provider": {
"openai": {
"options": {
"apiKey": "{file:~/.secrets/openai-key}"
}
}
}
}
File paths can be:
Relative to the config file directory
Or absolute paths starting with / or ~
These are useful for:
Keeping sensitive data like API keys in separate files.
Including large instruction files without cluttering your config.
Sharing common configuration snippets across multiple config files.
yeah i need to fix this - i think we should get rid of the custom glob implementation for the instructions field and instead allow the general config variable replacement to support globs
Activity
thdxr commentedon Jul 23, 2025
yeah i need to fix this - i think we should get rid of the custom glob implementation for the
instructionsfield and instead allow the general config variable replacement to support globsfix(server): keep router health target server-owned (anomalyco#1240)