@arvoretech/hub 0.4.0 → 0.6.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/dist/index.js +68 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { Command as
|
|
4
|
+
import { Command as Command19 } from "commander";
|
|
5
5
|
|
|
6
6
|
// src/commands/init.ts
|
|
7
7
|
import { Command } from "commander";
|
|
@@ -605,6 +605,7 @@ async function generateCursor(config, hubDir) {
|
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
await generateCursorCommands(config, hubDir, cursorDir);
|
|
608
|
+
await generateVSCodeSettings(config, hubDir);
|
|
608
609
|
}
|
|
609
610
|
function buildCursorMcpEntry(mcp) {
|
|
610
611
|
if (mcp.url) {
|
|
@@ -1303,6 +1304,29 @@ async function generateKiro(config, hubDir) {
|
|
|
1303
1304
|
}
|
|
1304
1305
|
}
|
|
1305
1306
|
}
|
|
1307
|
+
await generateVSCodeSettings(config, hubDir);
|
|
1308
|
+
}
|
|
1309
|
+
async function generateVSCodeSettings(config, hubDir) {
|
|
1310
|
+
const vscodeDir = join5(hubDir, ".vscode");
|
|
1311
|
+
await mkdir2(vscodeDir, { recursive: true });
|
|
1312
|
+
const settingsPath = join5(vscodeDir, "settings.json");
|
|
1313
|
+
let existing = {};
|
|
1314
|
+
if (existsSync3(settingsPath)) {
|
|
1315
|
+
try {
|
|
1316
|
+
const raw = await readFile3(settingsPath, "utf-8");
|
|
1317
|
+
existing = JSON.parse(raw);
|
|
1318
|
+
} catch {
|
|
1319
|
+
existing = {};
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
const managed = {
|
|
1323
|
+
"git.autoRepositoryDetection": true,
|
|
1324
|
+
"git.detectSubmodules": true,
|
|
1325
|
+
"git.detectSubmodulesLimit": Math.max(config.repos.length * 2, 20)
|
|
1326
|
+
};
|
|
1327
|
+
const merged = { ...existing, ...managed };
|
|
1328
|
+
await writeFile4(settingsPath, JSON.stringify(merged, null, 2) + "\n", "utf-8");
|
|
1329
|
+
console.log(chalk4.green(" Generated .vscode/settings.json (git multi-repo detection)"));
|
|
1306
1330
|
}
|
|
1307
1331
|
function buildGitignoreLines(config) {
|
|
1308
1332
|
const lines = [
|
|
@@ -2672,6 +2696,16 @@ Installing hooks from ${source}
|
|
|
2672
2696
|
}
|
|
2673
2697
|
console.log();
|
|
2674
2698
|
})
|
|
2699
|
+
).addCommand(
|
|
2700
|
+
new Command10("find").description("Browse curated hooks in the Repo Hub directory").argument("[query]", "Search term").action(async (query) => {
|
|
2701
|
+
const base = "https://rhm-website.vercel.app/directory?type=hook";
|
|
2702
|
+
const url = query ? `${base}&q=${encodeURIComponent(query)}` : base;
|
|
2703
|
+
console.log(chalk10.blue("\n Browse curated hooks at:\n"));
|
|
2704
|
+
console.log(chalk10.cyan(` ${url}
|
|
2705
|
+
`));
|
|
2706
|
+
console.log(chalk10.dim(" Install with: hub hooks add <owner>/<repo>"));
|
|
2707
|
+
console.log(chalk10.dim(" Example: hub hooks add obra/superpowers\n"));
|
|
2708
|
+
})
|
|
2675
2709
|
).addCommand(
|
|
2676
2710
|
new Command10("remove").description("Remove a hook").argument("<name>", "Hook name to remove").action(async (name) => {
|
|
2677
2711
|
const hubDir = process.cwd();
|
|
@@ -2856,6 +2890,16 @@ Installing commands from ${source}
|
|
|
2856
2890
|
}
|
|
2857
2891
|
console.log();
|
|
2858
2892
|
})
|
|
2893
|
+
).addCommand(
|
|
2894
|
+
new Command11("find").description("Browse curated commands in the Repo Hub directory").argument("[query]", "Search term").action(async (query) => {
|
|
2895
|
+
const base = "https://rhm-website.vercel.app/directory?type=command";
|
|
2896
|
+
const url = query ? `${base}&q=${encodeURIComponent(query)}` : base;
|
|
2897
|
+
console.log(chalk11.blue("\n Browse curated commands at:\n"));
|
|
2898
|
+
console.log(chalk11.cyan(` ${url}
|
|
2899
|
+
`));
|
|
2900
|
+
console.log(chalk11.dim(" Install with: hub commands add <owner>/<repo>"));
|
|
2901
|
+
console.log(chalk11.dim(" Example: hub commands add obra/superpowers\n"));
|
|
2902
|
+
})
|
|
2859
2903
|
).addCommand(
|
|
2860
2904
|
new Command11("remove").description("Remove a command").argument("<name>", "Command name to remove").action(async (name) => {
|
|
2861
2905
|
const hubDir = process.cwd();
|
|
@@ -3783,11 +3827,31 @@ var updateCommand = new Command17("update").description("Update hub CLI to the l
|
|
|
3783
3827
|
}
|
|
3784
3828
|
});
|
|
3785
3829
|
|
|
3830
|
+
// src/commands/directory.ts
|
|
3831
|
+
import { Command as Command18 } from "commander";
|
|
3832
|
+
import chalk18 from "chalk";
|
|
3833
|
+
var BASE_URL = "https://rhm-website.vercel.app/directory";
|
|
3834
|
+
var directoryCommand = new Command18("directory").alias("dir").description("Browse the Repo Hub directory of skills, agents, hooks, and commands").argument("[query]", "Search term").option("-t, --type <type>", "Filter by type (skill, agent, hook, command)").action(async (query, opts) => {
|
|
3835
|
+
const params = new URLSearchParams();
|
|
3836
|
+
if (opts?.type) params.set("type", opts.type);
|
|
3837
|
+
if (query) params.set("q", query);
|
|
3838
|
+
const qs = params.toString();
|
|
3839
|
+
const url = qs ? `${BASE_URL}?${qs}` : BASE_URL;
|
|
3840
|
+
console.log(chalk18.blue("\n Repo Hub Directory\n"));
|
|
3841
|
+
console.log(chalk18.cyan(` ${url}
|
|
3842
|
+
`));
|
|
3843
|
+
console.log(chalk18.dim(" Install examples:"));
|
|
3844
|
+
console.log(chalk18.dim(" hub skills add <owner>/<repo>/<skill>"));
|
|
3845
|
+
console.log(chalk18.dim(" hub agents add <owner>/<repo>"));
|
|
3846
|
+
console.log(chalk18.dim(" hub hooks add <owner>/<repo>"));
|
|
3847
|
+
console.log(chalk18.dim(" hub commands add <owner>/<repo>\n"));
|
|
3848
|
+
});
|
|
3849
|
+
|
|
3786
3850
|
// src/index.ts
|
|
3787
|
-
var program = new
|
|
3851
|
+
var program = new Command19();
|
|
3788
3852
|
program.name("hub").description(
|
|
3789
3853
|
"Give your AI coding assistant the full picture. Multi-repo context, agent orchestration, and end-to-end workflows."
|
|
3790
|
-
).version("0.
|
|
3854
|
+
).version("0.6.0").enablePositionalOptions();
|
|
3791
3855
|
program.addCommand(initCommand);
|
|
3792
3856
|
program.addCommand(addRepoCommand);
|
|
3793
3857
|
program.addCommand(setupCommand);
|
|
@@ -3807,4 +3871,5 @@ program.addCommand(doctorCommand);
|
|
|
3807
3871
|
program.addCommand(toolsCommand);
|
|
3808
3872
|
program.addCommand(memoryCommand);
|
|
3809
3873
|
program.addCommand(updateCommand);
|
|
3874
|
+
program.addCommand(directoryCommand);
|
|
3810
3875
|
program.parse();
|