mirror of
https://github.com/sst/opencode.git
synced 2025-07-07 16:14:59 +00:00
chore: document instructions
configuration option (#670)
This commit is contained in:
parent
23788674c8
commit
4a0be45d3d
1 changed files with 26 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue