diff options
| author | Aiden Cline <[email protected]> | 2025-07-04 10:22:45 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-04 11:22:45 -0400 |
| commit | 4a0be45d3d685ad952f51ef875c798ec4b3061de (patch) | |
| tree | 2cd39483ecfea4ea52a85a870a9a03b74019551f | |
| parent | 23788674c81184d3d5ea85cc00b29756102de326 (diff) | |
| download | opencode-4a0be45d3d685ad952f51ef875c798ec4b3061de.tar.gz opencode-4a0be45d3d685ad952f51ef875c798ec4b3061de.zip | |
chore: document `instructions` configuration option (#670)
| -rw-r--r-- | packages/web/src/content/docs/docs/rules.mdx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/docs/rules.mdx b/packages/web/src/content/docs/docs/rules.mdx index aed085352..b7818d71b 100644 --- a/packages/web/src/content/docs/docs/rules.mdx +++ b/packages/web/src/content/docs/docs/rules.mdx @@ -73,3 +73,29 @@ So when opencode starts, it looks for: 2. **Global file** by checking `~/.config/opencode/AGENTS.md` If you have both global and project-specific rules, opencode will combine them together. + +--- + +## Custom Instructions + +You can also specify custom instruction files using the `instructions` configuration in your `opencode.json` or global `~/.config/opencode/config.json`: + +```json title="opencode.json" +{ + "$schema": "https://opencode.ai/config.json", + "instructions": [".cursor/rules/*.md"] +} +``` + +You can specify multiple files like `CONTRIBUTING.md` and `docs/guidelines.md`, and use glob patterns to match multiple files. + +For example, to reuse your existing Cursor rules: + +```json title="opencode.json" +{ + "$schema": "https://opencode.ai/config.json", + "instructions": [".cursor/rules/*.md"] +} +``` + +All instruction files are combined with your `AGENTS.md` files. |
