bmm-opencode 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -5
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -9,59 +9,23 @@ BMAD-METHOD agents and skills converted for [OpenCode](https://opencode.ai) - re
|
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### For Humans
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Paste this into your LLM agent session:
|
|
15
15
|
|
|
16
|
-
```json
|
|
17
|
-
{
|
|
18
|
-
"$schema": "https://opencode.ai/config.json",
|
|
19
|
-
"plugin": ["bmm-opencode"]
|
|
20
|
-
}
|
|
21
16
|
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
| Tool | Description |
|
|
26
|
-
|------|-------------|
|
|
27
|
-
| `bmm_list` | List all available agents and skills |
|
|
28
|
-
| `bmm_agent` | Get agent definition by name |
|
|
29
|
-
| `bmm_skill` | Get skill instructions by name |
|
|
30
|
-
| `bmm_install` | Copy agents/skills to your project's `.opencode` folder |
|
|
31
|
-
|
|
32
|
-
### Installing Agents & Skills to Your Project
|
|
33
|
-
|
|
34
|
-
After adding the plugin, run:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
Use the bmm_install tool to install agents and skills
|
|
17
|
+
Install and configure bmm-opencode by following the instructions here:
|
|
18
|
+
https://raw.githubusercontent.com/Jack-R-Hong/BMM-opencode/refs/heads/main/docs/installation.md
|
|
38
19
|
```
|
|
39
20
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
<details>
|
|
45
|
-
<summary><b>Alternative: Manual Installation</b></summary>
|
|
21
|
+
### For LLM Agents
|
|
46
22
|
|
|
47
|
-
|
|
23
|
+
Fetch the installation guide and follow it:
|
|
48
24
|
|
|
49
25
|
```bash
|
|
50
|
-
|
|
51
|
-
cp -r BMM-opencode/.opencode /path/to/your-project/.opencode
|
|
26
|
+
curl -s https://raw.githubusercontent.com/Jack-R-Hong/BMM-opencode/refs/heads/main/docs/installation.md
|
|
52
27
|
```
|
|
53
28
|
|
|
54
|
-
#### Via npm pack
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
npm pack bmm-opencode
|
|
58
|
-
tar -xzf bmm-opencode-*.tgz
|
|
59
|
-
cp -r package/.opencode /path/to/your-project/.opencode
|
|
60
|
-
rm -rf package bmm-opencode-*.tgz
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
</details>
|
|
64
|
-
|
|
65
29
|
---
|
|
66
30
|
|
|
67
31
|
## Quick Start
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAgDlD,eAAO,MAAM,SAAS,EAAE,MAuHvB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { tool } from "@opencode-ai/plugin/tool";
|
|
|
2
2
|
import { readFileSync, readdirSync, existsSync, cpSync, mkdirSync } from "fs";
|
|
3
3
|
import { join, dirname } from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
|
+
import { homedir } from "os";
|
|
5
6
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
7
|
const packageRoot = join(__dirname, "..");
|
|
7
8
|
const agentsDir = join(packageRoot, ".opencode", "agents");
|
|
@@ -60,7 +61,8 @@ ${skills.map((s) => `- ${s}`).join("\n")}
|
|
|
60
61
|
## Usage
|
|
61
62
|
- Use \`bmm_agent\` tool to get agent definition
|
|
62
63
|
- Use \`bmm_skill\` tool to get skill instructions
|
|
63
|
-
- Use \`bmm_install\`
|
|
64
|
+
- Use \`bmm_install\` with \`global=true\` to install globally (~/.config/opencode/)
|
|
65
|
+
- Use \`bmm_install\` to install to current project (.opencode/)`;
|
|
64
66
|
},
|
|
65
67
|
}),
|
|
66
68
|
bmm_agent: tool({
|
|
@@ -82,18 +84,42 @@ ${skills.map((s) => `- ${s}`).join("\n")}
|
|
|
82
84
|
},
|
|
83
85
|
}),
|
|
84
86
|
bmm_install: tool({
|
|
85
|
-
description: "Install BMM agents and skills
|
|
87
|
+
description: "Install BMM agents and skills. Use global=true for ~/.config/opencode/ (all projects), or omit for current project's .opencode/",
|
|
86
88
|
args: {
|
|
87
89
|
target: tool.schema
|
|
88
90
|
.string()
|
|
89
91
|
.optional()
|
|
90
|
-
.describe("Target directory (defaults to current project)"),
|
|
92
|
+
.describe("Target directory (defaults to current project's .opencode/)"),
|
|
93
|
+
global: tool.schema
|
|
94
|
+
.boolean()
|
|
95
|
+
.optional()
|
|
96
|
+
.describe("Install to global ~/.config/opencode/ instead of project"),
|
|
97
|
+
force: tool.schema
|
|
98
|
+
.boolean()
|
|
99
|
+
.optional()
|
|
100
|
+
.describe("Overwrite existing files without warning (default: false)"),
|
|
91
101
|
},
|
|
92
102
|
async execute(args, context) {
|
|
93
|
-
const
|
|
103
|
+
const globalConfigDir = join(homedir(), ".config", "opencode");
|
|
104
|
+
const targetBase = args.global
|
|
105
|
+
? globalConfigDir
|
|
106
|
+
: args.target || join(context.directory, ".opencode");
|
|
94
107
|
try {
|
|
95
108
|
const targetAgents = join(targetBase, "agents");
|
|
96
109
|
const targetSkills = join(targetBase, "skills");
|
|
110
|
+
const agentsExist = existsSync(targetAgents) && readdirSync(targetAgents).length > 0;
|
|
111
|
+
const skillsExist = existsSync(targetSkills) && readdirSync(targetSkills).length > 0;
|
|
112
|
+
if ((agentsExist || skillsExist) && !args.force) {
|
|
113
|
+
const existing = [];
|
|
114
|
+
if (agentsExist)
|
|
115
|
+
existing.push(`agents (${readdirSync(targetAgents).length} files)`);
|
|
116
|
+
if (skillsExist)
|
|
117
|
+
existing.push(`skills (${readdirSync(targetSkills).length} dirs)`);
|
|
118
|
+
return `Existing installation detected at ${targetBase}:
|
|
119
|
+
- ${existing.join("\n- ")}
|
|
120
|
+
|
|
121
|
+
Use \`force=true\` to overwrite, or remove existing files first.`;
|
|
122
|
+
}
|
|
97
123
|
mkdirSync(targetAgents, { recursive: true });
|
|
98
124
|
mkdirSync(targetSkills, { recursive: true });
|
|
99
125
|
let agentsCopied = 0;
|
|
@@ -110,7 +136,8 @@ ${skills.map((s) => `- ${s}`).join("\n")}
|
|
|
110
136
|
cpSync(src, dest, { recursive: true });
|
|
111
137
|
skillsCopied++;
|
|
112
138
|
}
|
|
113
|
-
|
|
139
|
+
const installType = args.global ? "globally" : "to project";
|
|
140
|
+
return `Successfully installed BMM-OpenCode ${installType} (${targetBase}):
|
|
114
141
|
- ${agentsCopied} agents copied to ${targetAgents}
|
|
115
142
|
- ${skillsCopied} skills copied to ${targetSkills}
|
|
116
143
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bmm-opencode",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "BMAD-METHOD agents and skills for OpenCode - AI agent framework with 17 specialized agents and 61 workflow skills",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsc",
|
|
34
34
|
"dev": "tsc --watch",
|
|
35
|
-
"
|
|
35
|
+
"test": "node --experimental-vm-modules --test tests/*.test.js",
|
|
36
|
+
"prepublishOnly": "npm run build && npm test"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
39
|
"@opencode-ai/plugin": "^1.1.51"
|