builder-doctor 1.0.16 → 1.0.18
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 +5 -20
- package/dist/index.js +30 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -120,19 +120,14 @@ Outputs all environment variables in `NAME=value` format, one per line, sorted a
|
|
|
120
120
|
|
|
121
121
|
Install a skill from `https://github.com/BuilderIO/builder-agent-skills` into `.builder/skills/<skill-name>`.
|
|
122
122
|
|
|
123
|
+
You can use `--source` or the environment variable `BUILDER_SKILLS_SOURCE` to override the source of skills/plugins.
|
|
124
|
+
|
|
123
125
|
```bash
|
|
124
126
|
npx builder-doctor install-skill skill-creator
|
|
125
|
-
npx builder-doctor install-skill skill-
|
|
127
|
+
npx builder-doctor install-skill skill-a skill-b
|
|
126
128
|
```
|
|
127
129
|
|
|
128
|
-
If files already exist for that skill, they are overwritten.
|
|
129
|
-
|
|
130
|
-
The optional `--source` flag accepts a GitHub `owner/repository` value and pulls from that repository.
|
|
131
|
-
|
|
132
|
-
Default source resolution order is:
|
|
133
|
-
1. `--source`
|
|
134
|
-
2. `BUILDER_SKILLS_SOURCE`
|
|
135
|
-
3. `BuilderIO/builder-agent-skills`
|
|
130
|
+
If files already exist for that skill, they are overwritten. Multiple skills can be installed at once.
|
|
136
131
|
|
|
137
132
|
### skills
|
|
138
133
|
|
|
@@ -140,7 +135,6 @@ List available skills from `https://github.com/BuilderIO/builder-agent-skills`.
|
|
|
140
135
|
|
|
141
136
|
```bash
|
|
142
137
|
npx builder-doctor skills
|
|
143
|
-
npx builder-doctor skills --source myorg/myrepo
|
|
144
138
|
```
|
|
145
139
|
|
|
146
140
|
Only folders that contain a `SKILL.md` file are included in the output.
|
|
@@ -151,18 +145,10 @@ Install a plugin from `https://github.com/BuilderIO/builder-agent-plugins`.
|
|
|
151
145
|
|
|
152
146
|
```bash
|
|
153
147
|
npx builder-doctor install-plugin my-plugin
|
|
154
|
-
npx builder-doctor install-plugin my-plugin --source myorg/myrepo
|
|
155
148
|
```
|
|
156
149
|
|
|
157
150
|
Plugin contents are extracted into the `.builder` root (for example: `skills`, `agents`, `rules`, etc).
|
|
158
151
|
|
|
159
|
-
The optional `--source` flag accepts a GitHub `owner/repository` value and pulls from that repository.
|
|
160
|
-
|
|
161
|
-
Default source resolution order is:
|
|
162
|
-
1. `--source`
|
|
163
|
-
2. `BUILDER_SKILLS_SOURCE`
|
|
164
|
-
3. `BuilderIO/builder-agent-plugins`
|
|
165
|
-
|
|
166
152
|
## Examples
|
|
167
153
|
|
|
168
154
|
```bash
|
|
@@ -179,5 +165,4 @@ BUILDER_SKILLS_SOURCE=myorg/myrepo builder-doctor skills # Use env var a
|
|
|
179
165
|
builder-doctor install-plugin my-plugin # Install a plugin into .builder
|
|
180
166
|
builder-doctor install-plugin my-plugin --source myorg/myrepo # Install a plugin from a custom source
|
|
181
167
|
builder-doctor --verbose # Run all checks with detailed output
|
|
182
|
-
```
|
|
183
|
-
|
|
168
|
+
```
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,14 @@ const setup = args.includes("setup");
|
|
|
14
14
|
const env = args.includes("env");
|
|
15
15
|
const showHelp = args.includes("--help") || args.includes("-h") || args.includes("help");
|
|
16
16
|
const installSkill = args[0] === "install-skill";
|
|
17
|
-
const
|
|
17
|
+
const installSkillNames = [];
|
|
18
|
+
if (installSkill) {
|
|
19
|
+
for (let i = 1; i < args.length; i++) {
|
|
20
|
+
if (args[i].startsWith("--"))
|
|
21
|
+
break;
|
|
22
|
+
installSkillNames.push(args[i]);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
18
25
|
const installPlugin = args[0] === "install-plugin";
|
|
19
26
|
const installPluginName = installPlugin ? args[1] : undefined;
|
|
20
27
|
const skills = args[0] === "skills";
|
|
@@ -27,14 +34,7 @@ const all = !rules &&
|
|
|
27
34
|
!installSkill &&
|
|
28
35
|
!installPlugin &&
|
|
29
36
|
!skills;
|
|
30
|
-
const
|
|
31
|
-
const nonInteractiveMessage = `Ask the user (using AskUserQuestion) whether they would like to 1. Install the skill creator 2. Install a skill, 3. Install a plugin, 4. Review rules for issues. ` +
|
|
32
|
-
`If 1 is chosen then run npx builder-doctor install-skill skill-creator, ` +
|
|
33
|
-
`if 2 is chosen then ask the user to enter the skill they would like to install and then run npx builder-doctor install-skill <skill-name>, ` +
|
|
34
|
-
`if 3 is chosen then ask the user to enter the plugin they would like to install and then run npx builder-doctor install-plugin <plugin-name>, ` +
|
|
35
|
-
`If 4 is chosen then run npx builder-doctor rules`;
|
|
36
|
-
if (showHelp) {
|
|
37
|
-
console.log(`
|
|
37
|
+
const help = `
|
|
38
38
|
builder-doctor - A CLI tool for Builder.io diagnostics
|
|
39
39
|
|
|
40
40
|
Usage: builder-doctor [options] [commands]
|
|
@@ -44,7 +44,7 @@ Commands:
|
|
|
44
44
|
rules Check Builder.io rules configuration
|
|
45
45
|
setup Run Builder.io agent to analyze project and provide setup instructions
|
|
46
46
|
env Display all environment variables sorted alphabetically
|
|
47
|
-
install-skill <skill-name
|
|
47
|
+
install-skill <skill-name...> Install one or more skills from BuilderIO/builder-agent-skills
|
|
48
48
|
skills List available skills
|
|
49
49
|
install-plugin <plugin-name> Install a plugin from BuilderIO/builder-agent-plugins
|
|
50
50
|
help Show this help message
|
|
@@ -62,13 +62,23 @@ Examples:
|
|
|
62
62
|
builder-doctor setup Get project setup instructions from Builder.io agent
|
|
63
63
|
builder-doctor env Display environment variables
|
|
64
64
|
builder-doctor install-skill skill-creator Install a skill into .builder/skills
|
|
65
|
+
builder-doctor install-skill skill-a skill-b Install multiple skills at once
|
|
65
66
|
builder-doctor skills List available skills
|
|
66
67
|
builder-doctor skills --source myorg/myrepo List available skills from a custom source
|
|
67
68
|
builder-doctor install-skill skill-creator --source myorg/myrepo Install a skill from a custom source
|
|
68
69
|
builder-doctor install-plugin my-plugin Install a plugin into .builder
|
|
69
70
|
builder-doctor install-plugin my-plugin --source myorg/myrepo Install a plugin from a custom source
|
|
70
71
|
builder-doctor --verbose Run rules and network checks with detailed output
|
|
71
|
-
|
|
72
|
+
`;
|
|
73
|
+
const nonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
|
|
74
|
+
const nonInteractiveMessage = `Ask the user (using AskUserQuestion) whether they would like to 1. Install the skill creator 2. Install a skill, 3. List installable skills, 4. Review rules for issues.` +
|
|
75
|
+
`If 1 is chosen then run npx builder-doctor install-skill skill-creator, ` +
|
|
76
|
+
`if 2 is chosen then ask the user to enter the skill they would like to install and then run npx builder-doctor install-skill <skill-name>, ` +
|
|
77
|
+
`if 3 is chosen then ask the user to enter the plugin they would like to install and then run npx builder-doctor skills, ` +
|
|
78
|
+
`If 4 is chosen then run npx builder-doctor rules` +
|
|
79
|
+
`\n\n${help}`;
|
|
80
|
+
if (showHelp) {
|
|
81
|
+
console.log(help);
|
|
72
82
|
process.exit(0);
|
|
73
83
|
}
|
|
74
84
|
async function main() {
|
|
@@ -95,15 +105,17 @@ async function main() {
|
|
|
95
105
|
(0, env_1.runEnv)({ verbose });
|
|
96
106
|
}
|
|
97
107
|
if (installSkill) {
|
|
98
|
-
if (
|
|
99
|
-
console.error("Missing skill name. Usage: builder-doctor install-skill <skill-name
|
|
108
|
+
if (installSkillNames.length === 0) {
|
|
109
|
+
console.error("Missing skill name. Usage: builder-doctor install-skill <skill-name...>");
|
|
100
110
|
process.exit(1);
|
|
101
111
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
112
|
+
for (const skillName of installSkillNames) {
|
|
113
|
+
await (0, install_1.runInstallSkill)({
|
|
114
|
+
skillName,
|
|
115
|
+
source,
|
|
116
|
+
verbose,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
107
119
|
}
|
|
108
120
|
if (skills) {
|
|
109
121
|
await (0, install_1.runListSkills)({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.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