nia-wizard 0.1.33 → 0.1.34

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/bin.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  runWizard,
9
9
  shutdown,
10
10
  track
11
- } from "./chunk-7Y5PMZRX.js";
11
+ } from "./chunk-MZY5RGCT.js";
12
12
 
13
13
  // src/bin.ts
14
14
  import yargs from "yargs";
@@ -9,7 +9,7 @@ var require_package = __commonJS({
9
9
  "package.json"(exports, module) {
10
10
  module.exports = {
11
11
  name: "nia-wizard",
12
- version: "0.1.33",
12
+ version: "0.1.34",
13
13
  description: "CLI wizard to install Nia to your coding agents",
14
14
  packageManager: "pnpm@10.30.3",
15
15
  type: "module",
@@ -3204,7 +3204,7 @@ async function removeMCPServerFromClientsStep() {
3204
3204
  }
3205
3205
 
3206
3206
  // src/run.ts
3207
- import chalk3 from "chalk";
3207
+ import chalk4 from "chalk";
3208
3208
  import { spawnSync as spawnSync6 } from "child_process";
3209
3209
 
3210
3210
  // src/utils/api-key.ts
@@ -3523,6 +3523,59 @@ function runNiaAuthLogin(apiKey) {
3523
3523
  return runLatestNia(["auth", "login", "--api-key", apiKey]);
3524
3524
  }
3525
3525
 
3526
+ // src/utils/outro.ts
3527
+ import chalk3 from "chalk";
3528
+ var pad = " ";
3529
+ function dimBullet(text) {
3530
+ return `${pad}${chalk3.dim("\u2022")} ${text}`;
3531
+ }
3532
+ function buildSuccessOutro(options) {
3533
+ const { installedNiaCliSkill } = options;
3534
+ const sections = [
3535
+ chalk3.green.bold("Nia is ready"),
3536
+ chalk3.dim(
3537
+ "Search indexed code, docs, and papers with citations. Vaults keep synthesized wikis; on macOS you can opt in to personal data."
3538
+ ),
3539
+ "",
3540
+ chalk3.cyan.bold("Pick a starting point"),
3541
+ dimBullet(
3542
+ `${chalk3.white("Documentation")} ${chalk3.dim("\u2014")} ${chalk3.yellow("nia sources index")} ${chalk3.dim("the doc root URL, then")} ${chalk3.white("semantic search")} ${chalk3.dim("with")} ${chalk3.yellow("nia search query")} ${chalk3.dim("for cited answers across the site.")}`
3543
+ ),
3544
+ dimBullet(
3545
+ `${chalk3.white("Codebase")} ${chalk3.dim("\u2014")} ${chalk3.yellow("nia repos index")} ${chalk3.dim("or")} ${chalk3.yellow("nia project init")}${chalk3.dim(";")} ${chalk3.white("sandbox search")} ${chalk3.dim("with")} ${chalk3.yellow("nia search query")} ${chalk3.dim("\u2014 answers grounded in indexed files with citations.")}`
3546
+ ),
3547
+ dimBullet(
3548
+ `${chalk3.white("Research")} ${chalk3.dim("\u2014 index sources, then")} ${chalk3.yellow("nia oracle")} ${chalk3.dim("or deep search for multi-step work.")}`
3549
+ ),
3550
+ dimBullet(
3551
+ `${chalk3.white("Notes that last")} ${chalk3.dim("\u2014")} ${chalk3.yellow("nia vault init")} ${chalk3.dim("builds a wiki from your sources.")}`
3552
+ ),
3553
+ dimBullet(
3554
+ `${chalk3.white("This Mac (optional)")} ${chalk3.dim("\u2014")} ${chalk3.yellow("nia personal status")} ${chalk3.dim("then")} ${chalk3.yellow("nia personal init")} ${chalk3.dim("(sensitive; opt-in).")}`
3555
+ ),
3556
+ ...installedNiaCliSkill ? [
3557
+ dimBullet(
3558
+ `${chalk3.white("CLI skill in agents")} ${chalk3.dim("\u2014")} ${chalk3.yellow("nia skill")} ${chalk3.dim("chooses which coding agents get the Nia skill.")}`
3559
+ )
3560
+ ] : [],
3561
+ "",
3562
+ chalk3.cyan.bold("Ask your coding agent"),
3563
+ `${pad}${chalk3.yellow('"Use Nia to find from how to set up oauth with betterauth propertly?"')}`,
3564
+ `${pad}${chalk3.yellow('"Use Nia to search what are the latest nextjs feature and how to migrate my codebase to it."')}`,
3565
+ `${pad}${chalk3.yellow('"Use Nia to find where we handle auth in this repo and cite the files."')}`,
3566
+ "",
3567
+ chalk3.cyan.bold("Open in the browser"),
3568
+ `${pad}${chalk3.dim("Explore")} ${chalk3.cyan("https://app.trynia.ai/explore")}`,
3569
+ `${pad}${chalk3.dim("App")} ${chalk3.cyan("https://app.trynia.ai")}`,
3570
+ "",
3571
+ chalk3.cyan.bold("Reference"),
3572
+ `${pad}${chalk3.dim("Docs")} ${chalk3.cyan("https://docs.trynia.ai")}`,
3573
+ `${pad}${chalk3.dim("API")} ${chalk3.cyan("https://docs.trynia.ai/api-guide")}`,
3574
+ `${pad}${chalk3.dim("Updates")} ${chalk3.cyan("https://x.com/nozomioai")}`
3575
+ ];
3576
+ return sections.join("\n");
3577
+ }
3578
+
3526
3579
  // src/run.ts
3527
3580
  async function runAddMcpInstall(apiKey) {
3528
3581
  clack_default.log.info("Launching add-mcp installer...\n");
@@ -3582,72 +3635,72 @@ async function runManualMode() {
3582
3635
  return;
3583
3636
  }
3584
3637
  console.log("");
3585
- clack_default.log.info(chalk3.bold(`Configuration for ${client.name}`));
3638
+ clack_default.log.info(chalk4.bold(`Configuration for ${client.name}`));
3586
3639
  console.log("");
3587
3640
  if (client.docsUrl) {
3588
- console.log(chalk3.cyan(" Documentation:"));
3589
- console.log(` ${chalk3.underline(client.docsUrl)}`);
3641
+ console.log(chalk4.cyan(" Documentation:"));
3642
+ console.log(` ${chalk4.underline(client.docsUrl)}`);
3590
3643
  console.log("");
3591
3644
  }
3592
3645
  if (client.note) {
3593
- console.log(chalk3.yellow(" Note:"));
3646
+ console.log(chalk4.yellow(" Note:"));
3594
3647
  console.log(` ${client.note}`);
3595
3648
  console.log("");
3596
3649
  }
3597
3650
  let configPath = "";
3598
3651
  try {
3599
3652
  configPath = await client.getConfigPath();
3600
- console.log(chalk3.cyan(" Config file path:"));
3653
+ console.log(chalk4.cyan(" Config file path:"));
3601
3654
  console.log(` ${configPath}`);
3602
3655
  console.log("");
3603
3656
  } catch {
3604
3657
  if (client.usesCLI) {
3605
- console.log(chalk3.cyan(" Configuration method:"));
3658
+ console.log(chalk4.cyan(" Configuration method:"));
3606
3659
  console.log(` Uses CLI commands (no config file)`);
3607
3660
  console.log("");
3608
3661
  }
3609
3662
  }
3610
3663
  const exampleApiKey = "nk_YOUR_API_KEY_HERE";
3611
- console.log(chalk3.cyan(" Local mode config (stdio):"));
3664
+ console.log(chalk4.cyan(" Local mode config (stdio):"));
3612
3665
  const localConfig = client.getServerConfig(exampleApiKey, "local");
3613
- console.log(chalk3.dim(" Add this to your config file under the servers section:"));
3666
+ console.log(chalk4.dim(" Add this to your config file under the servers section:"));
3614
3667
  console.log("");
3615
- console.log(chalk3.green(` "${client.name === "Cursor" ? "mcpServers" : client.getServerPropertyName()}": {`));
3616
- console.log(chalk3.green(` "nia": ${JSON.stringify(localConfig, null, 6).split("\n").map((line, i) => i === 0 ? line : " " + line).join("\n")}`));
3617
- console.log(chalk3.green(` }`));
3668
+ console.log(chalk4.green(` "${client.name === "Cursor" ? "mcpServers" : client.getServerPropertyName()}": {`));
3669
+ console.log(chalk4.green(` "nia": ${JSON.stringify(localConfig, null, 6).split("\n").map((line, i) => i === 0 ? line : " " + line).join("\n")}`));
3670
+ console.log(chalk4.green(` }`));
3618
3671
  console.log("");
3619
- console.log(chalk3.cyan(" Remote mode config (HTTP):"));
3672
+ console.log(chalk4.cyan(" Remote mode config (HTTP):"));
3620
3673
  const remoteConfig = client.getServerConfig(exampleApiKey, "remote");
3621
- console.log(chalk3.dim(" Add this to your config file under the servers section:"));
3674
+ console.log(chalk4.dim(" Add this to your config file under the servers section:"));
3622
3675
  console.log("");
3623
- console.log(chalk3.green(` "${client.name === "Cursor" ? "mcpServers" : client.getServerPropertyName()}": {`));
3624
- console.log(chalk3.green(` "nia": ${JSON.stringify(remoteConfig, null, 6).split("\n").map((line, i) => i === 0 ? line : " " + line).join("\n")}`));
3625
- console.log(chalk3.green(` }`));
3676
+ console.log(chalk4.green(` "${client.name === "Cursor" ? "mcpServers" : client.getServerPropertyName()}": {`));
3677
+ console.log(chalk4.green(` "nia": ${JSON.stringify(remoteConfig, null, 6).split("\n").map((line, i) => i === 0 ? line : " " + line).join("\n")}`));
3678
+ console.log(chalk4.green(` }`));
3626
3679
  console.log("");
3627
3680
  if (client.usesCLI) {
3628
- console.log(chalk3.cyan(" CLI commands:"));
3681
+ console.log(chalk4.cyan(" CLI commands:"));
3629
3682
  if (client.name === "Claude Code") {
3630
- console.log(chalk3.dim(" Local mode:"));
3683
+ console.log(chalk4.dim(" Local mode:"));
3631
3684
  console.log(` claude mcp add -e "NIA_API_KEY=${exampleApiKey}" -e "NIA_API_URL=https://apigcp.trynia.ai/" -s user nia -- pipx run --no-cache nia-mcp-server`);
3632
3685
  console.log("");
3633
- console.log(chalk3.dim(" Remote mode:"));
3686
+ console.log(chalk4.dim(" Remote mode:"));
3634
3687
  console.log(` claude mcp add --transport http --header "Authorization: Bearer ${exampleApiKey}" -s user nia "${REMOTE_MCP_URL}"`);
3635
3688
  } else if (client.name === "Codex CLI") {
3636
- console.log(chalk3.dim(" Local mode:"));
3689
+ console.log(chalk4.dim(" Local mode:"));
3637
3690
  console.log(` codex mcp add nia --env "NIA_API_KEY=${exampleApiKey}" --env "NIA_API_URL=https://apigcp.trynia.ai/" -- pipx run --no-cache nia-mcp-server`);
3638
3691
  } else if (client.name === "Factory") {
3639
- console.log(chalk3.dim(" Local mode:"));
3692
+ console.log(chalk4.dim(" Local mode:"));
3640
3693
  console.log(` droid mcp add nia "pipx run --no-cache nia-mcp-server" --env "NIA_API_KEY=${exampleApiKey}" --env "NIA_API_URL=https://apigcp.trynia.ai/"`);
3641
3694
  console.log("");
3642
- console.log(chalk3.dim(" Remote mode:"));
3695
+ console.log(chalk4.dim(" Remote mode:"));
3643
3696
  console.log(` droid mcp add nia ${REMOTE_MCP_URL} --type http --header "Authorization: Bearer ${exampleApiKey}"`);
3644
3697
  } else if (client.name === "Amp") {
3645
- console.log(chalk3.dim(" Remote mode:"));
3698
+ console.log(chalk4.dim(" Remote mode:"));
3646
3699
  console.log(` amp mcp add nia --header "Authorization=Bearer ${exampleApiKey}" ${REMOTE_MCP_URL}`);
3647
3700
  }
3648
3701
  console.log("");
3649
3702
  }
3650
- clack_default.outro(chalk3.dim("Press Enter to exit"));
3703
+ clack_default.outro(chalk4.dim("Press Enter to exit"));
3651
3704
  }
3652
3705
  async function runWizard(options) {
3653
3706
  if (options.debug) {
@@ -3742,7 +3795,7 @@ async function runWizard(options) {
3742
3795
  mode = "remote";
3743
3796
  clack_default.log.info("Switched to remote mode");
3744
3797
  } else {
3745
- clack_default.outro(chalk3.yellow("Please install dependencies and try again."));
3798
+ clack_default.outro(chalk4.yellow("Please install dependencies and try again."));
3746
3799
  process.exit(1);
3747
3800
  }
3748
3801
  }
@@ -3774,7 +3827,6 @@ async function runWizard(options) {
3774
3827
  const success = await runNiaCliSkillInstall(apiKey);
3775
3828
  if (success) {
3776
3829
  clack_default.log.success("Nia CLI skill installed!");
3777
- clack_default.log.message(chalk3.dim("Run `nia skill` to manage your Nia CLI skill."));
3778
3830
  installedNiaCliSkill = true;
3779
3831
  } else {
3780
3832
  clack_default.log.warn("Nia CLI skill installation may have failed");
@@ -3793,40 +3845,20 @@ async function runWizard(options) {
3793
3845
  total_duration_ms: Date.now() - startTime
3794
3846
  });
3795
3847
  if (wizardOutcome === "success") {
3796
- const niaSkillManagementHint = installedNiaCliSkill ? `
3797
- ${chalk3.cyan("Nia CLI skill management:")} ${chalk3.yellow("Run `nia skill` any time to manage your skill.")}
3798
- ` : "";
3799
- const outroMessage = `
3800
- ${chalk3.green("\u2713 Nia installed!")}
3801
-
3802
- ${niaSkillManagementHint}
3803
-
3804
- ${chalk3.cyan("Get started:")}
3805
- \u2022 Browse pre-indexed sources: ${chalk3.cyan("https://app.trynia.ai/explore")}
3806
- \u2022 Or index your own repos, docs, and papers
3807
-
3808
- ${chalk3.cyan("Try in your coding agent:")}
3809
- ${chalk3.yellow('"List my indexed sources"')}
3810
- ${chalk3.yellow('"Search vercel/ai-sdk for streaming"')}
3811
- ${chalk3.yellow('"Run deep research on agent tool protocols"')}
3812
-
3813
- ${chalk3.dim("Using as API?")} ${chalk3.cyan("https://docs.trynia.ai/api-guide")}
3814
- ${chalk3.dim("Follow us:")} ${chalk3.cyan("https://x.com/nozomioai")}
3815
- `;
3816
- clack_default.outro(outroMessage);
3848
+ clack_default.outro(buildSuccessOutro({ installedNiaCliSkill }));
3817
3849
  } else {
3818
- clack_default.outro(chalk3.dim("No changes made."));
3850
+ clack_default.outro(chalk4.dim("No changes made."));
3819
3851
  }
3820
3852
  await shutdown();
3821
3853
  }
3822
3854
 
3823
3855
  // src/mcp.ts
3824
- import chalk4 from "chalk";
3856
+ import chalk5 from "chalk";
3825
3857
  async function runMCPAdd(options) {
3826
3858
  if (options.debug) {
3827
3859
  enableDebug();
3828
3860
  }
3829
- clack_default.intro(chalk4.bgCyan.black(" Nia Agent Setup "));
3861
+ clack_default.intro(chalk5.bgCyan.black(" Nia Agent Setup "));
3830
3862
  const apiKey = await getApiKey(options.apiKey);
3831
3863
  let mode;
3832
3864
  if (options.local !== void 0) {
@@ -3852,7 +3884,7 @@ async function runMCPAdd(options) {
3852
3884
  mode = "remote";
3853
3885
  clack_default.log.info("Switched to remote mode");
3854
3886
  } else {
3855
- clack_default.outro(chalk4.yellow("Please install dependencies and try again."));
3887
+ clack_default.outro(chalk5.yellow("Please install dependencies and try again."));
3856
3888
  process.exit(1);
3857
3889
  }
3858
3890
  }
@@ -3868,27 +3900,27 @@ async function runMCPAdd(options) {
3868
3900
  });
3869
3901
  if (installedClients.length > 0) {
3870
3902
  clack_default.log.message(
3871
- chalk4.dim("You may need to restart your coding agents to load Nia.")
3903
+ chalk5.dim("You may need to restart your coding agents to load Nia.")
3872
3904
  );
3873
3905
  }
3874
- clack_default.outro(chalk4.green("Done!"));
3906
+ clack_default.outro(chalk5.green("Done!"));
3875
3907
  }
3876
3908
  async function runMCPRemove(options = {}) {
3877
3909
  if (options.debug) {
3878
3910
  enableDebug();
3879
3911
  }
3880
- clack_default.intro(chalk4.bgRed.white(" Remove Nia "));
3912
+ clack_default.intro(chalk5.bgRed.white(" Remove Nia "));
3881
3913
  const removedClients = await removeMCPServerFromClientsStep();
3882
3914
  if (removedClients.length > 0) {
3883
3915
  clack_default.log.message(
3884
- chalk4.dim("You may need to restart your coding agents for changes to take effect.")
3916
+ chalk5.dim("You may need to restart your coding agents for changes to take effect.")
3885
3917
  );
3886
3918
  }
3887
- clack_default.outro(chalk4.green("Done!"));
3919
+ clack_default.outro(chalk5.green("Done!"));
3888
3920
  }
3889
3921
 
3890
3922
  // src/skill.ts
3891
- import chalk5 from "chalk";
3923
+ import chalk6 from "chalk";
3892
3924
  import { spawnSync as spawnSync7 } from "child_process";
3893
3925
  var DEFAULT_SKILL_SOURCE = "nozomio-labs/nia-skill";
3894
3926
  var NON_INTERACTIVE_TIMEOUT_MS = 3e4;
@@ -3900,7 +3932,7 @@ async function runSkillAdd(options) {
3900
3932
  const source = options.source || DEFAULT_SKILL_SOURCE;
3901
3933
  const allAgents = Boolean(options.allAgents);
3902
3934
  if (!options.json && !options.embedded) {
3903
- clack_default.intro(chalk5.bgCyan.black(" Nia Skill Installer "));
3935
+ clack_default.intro(chalk6.bgCyan.black(" Nia Skill Installer "));
3904
3936
  }
3905
3937
  if (allAgents && options.target) {
3906
3938
  throw new Error("Use either `--target` or `--all-agents`, not both.");
@@ -3958,7 +3990,7 @@ async function runSkillAdd(options) {
3958
3990
  if (!options.json) {
3959
3991
  clack_default.log.success("Nia skill installed!");
3960
3992
  if (!options.embedded) {
3961
- clack_default.outro(chalk5.green("Done!"));
3993
+ clack_default.outro(chalk6.green("Done!"));
3962
3994
  }
3963
3995
  }
3964
3996
  }
@@ -4227,4 +4259,4 @@ export {
4227
4259
  getAgentGuideMarkdown,
4228
4260
  printAgentGuide
4229
4261
  };
4230
- //# sourceMappingURL=chunk-7Y5PMZRX.js.map
4262
+ //# sourceMappingURL=chunk-MZY5RGCT.js.map