Skip to content

Commit d5afe66

Browse files
committed
docs: update README
1 parent 8ba3518 commit d5afe66

1 file changed

Lines changed: 19 additions & 10 deletions

File tree

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@ An OpenCode plugin that integrates OpenSpec, providing a dedicated agent for pla
1515

1616
## Installation
1717

18-
### Option 1: Install from NPM (Recommended)
18+
### For Humans
1919

20-
Simply add the plugin package name to your `opencode.json` configuration file (usually located at `~/.config/opencode/opencode.json` or `.opencode/opencode.json`):
20+
**Option 1: Let your agent do it (Recommended)**
21+
22+
Paste this prompt into OpenCode:
23+
24+
```
25+
Install opencode-plugin-openspec. It is an NPM package. Please add "opencode-plugin-openspec" to my opencode.json plugin list.
26+
```
27+
28+
**Option 2: Manual Installation**
29+
30+
Add the plugin package name to your `opencode.json` configuration file (usually located at `~/.config/opencode/opencode.json` or `.opencode/opencode.json`):
2131

2232
```json
2333
{
@@ -29,22 +39,21 @@ Simply add the plugin package name to your `opencode.json` configuration file (u
2939

3040
OpenCode will automatically download and install the plugin the next time it runs.
3141

32-
### Option 2: Manual / Local Installation
42+
### For LLM Agents
3343

34-
If you want to install from a local build or a specific file:
44+
If you are an AI agent tasked with installing this plugin, follow these steps:
3545

36-
1. Build the project:
37-
```bash
38-
bun run build
39-
```
40-
2. Add the absolute path to your `opencode.json`:
46+
1. **Locate Configuration**: Find the user's OpenCode configuration file. It is typically at `~/.config/opencode/opencode.json` or `.opencode/opencode.json` in the workspace root.
47+
2. **Read Configuration**: Read the content of the configuration file.
48+
3. **Update Configuration**: Add `"opencode-plugin-openspec"` to the `plugin` array. If the `plugin` array does not exist, create it.
4149
```json
4250
{
4351
"plugin": [
44-
"file:///absolute/path/to/opencode-plugin-openspec/dist/index.js"
52+
"opencode-plugin-openspec"
4553
]
4654
}
4755
```
56+
4. **Verify**: Inform the user that the plugin has been added and will be installed on the next OpenCode run.
4857

4958
## Usage
5059

0 commit comments

Comments
 (0)