@arkhera30/cli 0.5.3 → 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 CHANGED
@@ -88,6 +88,9 @@ function defaultConfig() {
88
88
  search: {
89
89
  api_key: "horus-local-key"
90
90
  },
91
+ ai: {
92
+ key: ""
93
+ },
91
94
  vaults: {},
92
95
  github_hosts: {},
93
96
  host_repos_path: "",
@@ -152,6 +155,9 @@ function buildConfigFromParsed(parsed) {
152
155
  search: {
153
156
  api_key: parsed.search?.api_key ?? defaults.search.api_key
154
157
  },
158
+ ai: {
159
+ key: parsed.ai?.key ?? defaults.ai.key
160
+ },
155
161
  vaults: parsed.vaults ?? defaults.vaults,
156
162
  github_hosts: parsed.github_hosts ?? defaults.github_hosts,
157
163
  host_repos_path: parsed.host_repos_path ?? defaults.host_repos_path,
@@ -250,6 +256,9 @@ function generateEnv(config) {
250
256
  "# Search",
251
257
  `TYPESENSE_API_KEY=${config.search.api_key}`,
252
258
  "",
259
+ "# AI (required for NLP agent search in the Reader)",
260
+ `HORUS_AI_KEY=${config.ai.key}`,
261
+ "",
253
262
  "# Repository URLs (must be HTTPS \u2014 container services do not have SSH keys)",
254
263
  `ANVIL_REPO_URL=${config.repos.anvil_notes}`,
255
264
  `FORGE_REGISTRY_REPO_URL=${config.repos.forge_registry}`,
@@ -276,6 +285,7 @@ var CONFIG_KEYS = [
276
285
  "repo.anvil-notes",
277
286
  "repo.forge-registry",
278
287
  "search.api-key",
288
+ "ai.key",
279
289
  "enable-ui"
280
290
  ];
281
291
  function getConfigValue(config, key) {
@@ -306,6 +316,8 @@ function getConfigValue(config, key) {
306
316
  return config.repos.forge_registry;
307
317
  case "search.api-key":
308
318
  return config.search.api_key;
319
+ case "ai.key":
320
+ return config.ai.key;
309
321
  case "enable-ui":
310
322
  return String(config.enable_ui);
311
323
  }
@@ -355,6 +367,9 @@ function setConfigValue(config, key, value) {
355
367
  case "search.api-key":
356
368
  updated.search = { ...updated.search, api_key: value };
357
369
  break;
370
+ case "ai.key":
371
+ updated.ai = { ...updated.ai, key: value };
372
+ break;
358
373
  case "enable-ui":
359
374
  if (value !== "true" && value !== "false") {
360
375
  throw new Error(`Invalid value for enable-ui: ${value}. Must be "true" or "false".`);
@@ -753,27 +768,35 @@ var TYPESENSE_SERVICE = ` # \u2500\u2500 Typesense \u2500\u2500\u2500\u2500\u25
753
768
  start_period: 5s
754
769
  restart: unless-stopped`;
755
770
  var READER_SERVICE = ` # \u2500\u2500 Reader \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
756
- # Horus Reader \u2014 CDN React SPA served by nginx:alpine on port 8400.
757
- # Pure static files; connects directly to Anvil REST API from the browser.
771
+ # Horus Reader \u2014 Express server with NLP agent search at port 8400.
772
+ # Serves static SPA files, proxies /api/* to Anvil, and hosts POST /api/ai/ask.
758
773
  reader:
759
- image: ghcr.io/arjunkhera/horus/reader:latest
774
+ image: ghcr.io/arjunkhera/horus/horus-ui:latest
760
775
  ports:
761
776
  - "\${UI_PORT:-8400}:8400"
777
+ environment:
778
+ - CURSOR_API_KEY=\${HORUS_AI_KEY}
779
+ - HORUS_AGENT_MODEL=\${HORUS_AGENT_MODEL:-composer-2}
780
+ - ANVIL_HOST=anvil
781
+ - ANVIL_PORT=8100
782
+ depends_on:
783
+ anvil:
784
+ condition: service_healthy
762
785
  networks:
763
786
  - horus-net
764
787
  restart: unless-stopped
765
- stop_grace_period: 10s
788
+ stop_grace_period: 15s
766
789
  deploy:
767
790
  resources:
768
791
  limits:
769
- memory: 64m
792
+ memory: 256m
770
793
  reservations:
771
- memory: 32m
794
+ memory: 128m
772
795
  healthcheck:
773
796
  test: ["CMD-SHELL", "wget -qO /dev/null http://localhost:8400/health"]
774
797
  interval: 30s
775
798
  timeout: 5s
776
- start_period: 10s
799
+ start_period: 20s
777
800
  retries: 3`;
778
801
  function generateTestComposeFile(config) {
779
802
  const vaultEntries = Object.entries(config.vaults).sort(([a], [b]) => a.localeCompare(b));
@@ -1443,7 +1466,10 @@ var setupCommand = new Command2("setup").description("Interactive first-run setu
1443
1466
  forge_registry: opts.forgeRepo || process.env.FORGE_REGISTRY_REPO_URL || defaults.repos.forge_registry
1444
1467
  },
1445
1468
  vaults,
1446
- github_hosts
1469
+ github_hosts,
1470
+ ai: {
1471
+ key: process.env.HORUS_AI_KEY || ""
1472
+ }
1447
1473
  };
1448
1474
  } else {
1449
1475
  const data_dir = await input({
@@ -1589,6 +1615,14 @@ ${example(`${vaultName.trim()}-knowledge`)}
1589
1615
  token: token.trim()
1590
1616
  };
1591
1617
  }
1618
+ console.log("");
1619
+ console.log(chalk2.bold("NLP Agent Search"));
1620
+ console.log(chalk2.dim("Required for the \u2726 Ask bar in the Horus Reader."));
1621
+ console.log("");
1622
+ const aiKey = await password({
1623
+ message: "Horus AI key (leave empty to configure later):",
1624
+ mask: "*"
1625
+ });
1592
1626
  config = {
1593
1627
  ...defaultConfig(),
1594
1628
  data_dir,
@@ -1601,7 +1635,10 @@ ${example(`${vaultName.trim()}-knowledge`)}
1601
1635
  forge_registry: forge_registry.trim()
1602
1636
  },
1603
1637
  vaults,
1604
- github_hosts
1638
+ github_hosts,
1639
+ ai: {
1640
+ key: aiKey.trim()
1641
+ }
1605
1642
  };
1606
1643
  }
1607
1644
  const configSpinner = ora2("Saving configuration...").start();
package/guides/index.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "built_at": "2026-04-30T10:33:54.524Z",
3
+ "built_at": "2026-05-07T07:51:15.441Z",
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.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "CLI for managing the Horus AI development stack",
5
5
  "type": "module",
6
6
  "bin": {