@arkhera30/cli 0.4.0 → 0.5.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 CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
- import { Command as Command13 } from "commander";
5
- import chalk13 from "chalk";
4
+ import { Command as Command14 } from "commander";
5
+ import chalk14 from "chalk";
6
6
 
7
7
  // src/commands/setup.ts
8
8
  import { Command as Command2 } from "commander";
@@ -1138,12 +1138,14 @@ async function registerWithClaudeCode(mcpServers) {
1138
1138
  async function syncSkills(runtime) {
1139
1139
  const home = homedir3();
1140
1140
  const skillsBase = join2(home, ".claude", "skills");
1141
- const skills = ["horus-anvil", "horus-vault", "horus-forge"];
1141
+ const skills = ["horus-anvil", "horus-vault", "horus-forge", "horus-context", "capture", "triage"];
1142
1142
  const forgeContainer = "horus-forge-1";
1143
+ const homeResult = await runtime.exec(forgeContainer, "sh", "-c", "echo $HOME");
1144
+ const containerHome = homeResult.stdout.trim();
1143
1145
  for (const skill of skills) {
1144
1146
  const destDir = join2(skillsBase, skill);
1145
1147
  mkdirSync2(destDir, { recursive: true });
1146
- const src = `/home/forge/.claude/skills/${skill}/SKILL.md`;
1148
+ const src = `${containerHome}/.claude/skills/${skill}/SKILL.md`;
1147
1149
  const dest = join2(destDir, "SKILL.md");
1148
1150
  const result = await runtime.exec(forgeContainer, "cat", src);
1149
1151
  if (result.exitCode === 0 && result.stdout.trim()) {
@@ -1155,11 +1157,13 @@ async function syncSkillsForCursor(runtime) {
1155
1157
  const home = homedir3();
1156
1158
  const rulesDir = join2(home, ".cursor", "rules");
1157
1159
  const skillsBase = join2(home, ".cursor", "skills-cursor");
1158
- const skills = ["horus-anvil", "horus-vault", "horus-forge"];
1160
+ const skills = ["horus-anvil", "horus-vault", "horus-forge", "horus-context", "capture", "triage"];
1159
1161
  const forgeContainer = "horus-forge-1";
1160
1162
  mkdirSync2(rulesDir, { recursive: true });
1163
+ const homeResult = await runtime.exec(forgeContainer, "sh", "-c", "echo $HOME");
1164
+ const containerHome = homeResult.stdout.trim();
1161
1165
  for (const skill of skills) {
1162
- const src = `/home/forge/.claude/skills/${skill}/SKILL.md`;
1166
+ const src = `${containerHome}/.claude/skills/${skill}/SKILL.md`;
1163
1167
  const result = await runtime.exec(forgeContainer, "cat", src);
1164
1168
  if (result.exitCode === 0 && result.stdout.trim()) {
1165
1169
  const ruleDest = join2(rulesDir, `${skill}.mdc`);
@@ -3764,8 +3768,79 @@ var guideCommand = new Command12("guide").description("Print a bundled Horus gui
3764
3768
  printGuideBody2(guidesDir, match.file);
3765
3769
  });
3766
3770
 
3771
+ // src/commands/repo.ts
3772
+ import { Command as Command13 } from "commander";
3773
+ import chalk13 from "chalk";
3774
+ import ora9 from "ora";
3775
+ var repoCommand = new Command13("repo").description("Manage the Forge repository index");
3776
+ repoCommand.command("rindex").alias("scan").description("Trigger a full repository index rescan via Forge").action(async () => {
3777
+ if (!configExists()) {
3778
+ console.log(chalk13.red("Horus is not set up yet."));
3779
+ console.log(chalk13.dim("Run `horus setup` first."));
3780
+ process.exit(1);
3781
+ }
3782
+ const config = loadConfig();
3783
+ const forgePort = config.ports.forge ?? 8200;
3784
+ const forgeUrl = `http://localhost:${forgePort}/mcp`;
3785
+ const spinner = ora9("Scanning repositories...").start();
3786
+ let body;
3787
+ try {
3788
+ const res = await fetch(forgeUrl, {
3789
+ method: "POST",
3790
+ headers: { "Content-Type": "application/json" },
3791
+ body: JSON.stringify({
3792
+ jsonrpc: "2.0",
3793
+ id: 1,
3794
+ method: "tools/call",
3795
+ params: { name: "forge_repo_scan", arguments: {} }
3796
+ })
3797
+ });
3798
+ body = await res.text();
3799
+ if (!res.ok) {
3800
+ spinner.fail(`Forge returned HTTP ${res.status}`);
3801
+ console.error(chalk13.red(body));
3802
+ process.exit(1);
3803
+ }
3804
+ } catch (err) {
3805
+ spinner.fail("Could not reach Forge");
3806
+ console.error(chalk13.red(`Is Horus running? (horus up)`));
3807
+ console.error(chalk13.dim(err.message));
3808
+ process.exit(1);
3809
+ }
3810
+ let parsed;
3811
+ try {
3812
+ parsed = JSON.parse(body);
3813
+ } catch {
3814
+ spinner.fail("Unexpected response from Forge");
3815
+ console.error(body);
3816
+ process.exit(1);
3817
+ }
3818
+ if (parsed.error) {
3819
+ spinner.fail("Scan failed");
3820
+ console.error(chalk13.red(parsed.error.message ?? JSON.stringify(parsed.error)));
3821
+ process.exit(1);
3822
+ }
3823
+ let result = {};
3824
+ try {
3825
+ const text = parsed.result?.content?.[0]?.text ?? "{}";
3826
+ result = JSON.parse(text);
3827
+ } catch {
3828
+ }
3829
+ spinner.succeed("Repository scan complete");
3830
+ console.log("");
3831
+ console.log(` ${chalk13.bold("Scan paths:")} ${(result.scanPaths ?? []).length}`);
3832
+ console.log(` ${chalk13.bold("Repos found:")} ${result.reposFound ?? 0}`);
3833
+ if (result.repos && result.repos.length > 0) {
3834
+ console.log("");
3835
+ for (const repo of result.repos) {
3836
+ console.log(` ${chalk13.green("\u2713")} ${chalk13.bold(repo.name)} ${chalk13.dim(repo.localPath)}`);
3837
+ }
3838
+ }
3839
+ console.log("");
3840
+ });
3841
+
3767
3842
  // src/index.ts
3768
- var program = new Command13();
3843
+ var program = new Command14();
3769
3844
  program.name("horus").description("CLI for managing the Horus Docker Compose stack").version(CLI_VERSION);
3770
3845
  program.addCommand(setupCommand);
3771
3846
  program.addCommand(upCommand);
@@ -3779,6 +3854,7 @@ program.addCommand(backupCommand);
3779
3854
  program.addCommand(testEnvCommand);
3780
3855
  program.addCommand(helpCommand);
3781
3856
  program.addCommand(guideCommand);
3857
+ program.addCommand(repoCommand);
3782
3858
  program.exitOverride();
3783
3859
  try {
3784
3860
  await program.parseAsync(process.argv);
@@ -3787,9 +3863,9 @@ try {
3787
3863
  process.exit(0);
3788
3864
  }
3789
3865
  if (error instanceof Error) {
3790
- console.error(chalk13.red(`Error: ${error.message}`));
3866
+ console.error(chalk14.red(`Error: ${error.message}`));
3791
3867
  } else {
3792
- console.error(chalk13.red("An unexpected error occurred."));
3868
+ console.error(chalk14.red("An unexpected error occurred."));
3793
3869
  }
3794
3870
  process.exit(1);
3795
3871
  }
package/guides/index.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "built_at": "2026-04-11T11:27:07.553Z",
3
+ "built_at": "2026-04-25T06:44:43.612Z",
4
4
  "guide_count": 5,
5
5
  "guides": [
6
6
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkhera30/cli",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "CLI for managing the Horus AI development stack",
5
5
  "type": "module",
6
6
  "bin": {