Skip to content

Commit b554f6a

Browse files
committed
docs(CONTRIBUTING): add bun link/unlink steps for local plugin testing
1 parent 8f7a3c7 commit b554f6a

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

CONTRIBUTING.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ bun run check
5353

5454
## Claude Code
5555

56-
1. **Build the project**:
56+
1. **Build and link the project**:
5757
```bash
58-
bun run build
58+
bun run build && bun link
5959
```
6060

6161
2. **Disable the safety-net plugin** in Claude Code (if installed) and exit Claude Code completely.
@@ -74,14 +74,19 @@ bun run check
7474
git checkout -b test-branch
7575
```
7676

77+
5. **Unlink the project** when you're done:
78+
```bash
79+
bun unlink
80+
```
81+
7782
> [!NOTE]
7883
> See the [official documentation](https://docs.anthropic.com/en/docs/claude-code/plugins#test-your-plugins-locally) for more details on testing plugins locally.
7984
8085
## OpenCode
8186

82-
1. **Build the project**:
87+
1. **Build and link the project**:
8388
```bash
84-
bun run build
89+
bun run build && bun link
8590
```
8691

8792
2. **Update your OpenCode config** (`~/.config/opencode/opencode.json` or `opencode.jsonc`):
@@ -102,7 +107,8 @@ bun run check
102107
}
103108
```
104109

105-
> **Note**: Remove `"cc-safety-net"` from the plugin array if it exists, to avoid conflicts with the npm version.
110+
> [!NOTE]
111+
> Remove `"cc-safety-net"` from the plugin array if it exists, to avoid conflicts with the npm version.
106112
107113
3. **Restart OpenCode** to load the changes.
108114

@@ -117,6 +123,13 @@ bun run check
117123
git checkout -b test-branch
118124
```
119125

126+
6. **Manually copy or add commands** to `~/.config/opencode/command` or `.opencode/command` if you modified or added any new commands.
127+
128+
7. **Unlink the project** when you're done:
129+
```bash
130+
bun unlink
131+
```
132+
120133
> [!NOTE]
121134
> See the [official documentation](https://opencode.ai/docs/plugins/) for more details on OpenCode plugins.
122135

0 commit comments

Comments
 (0)