@sahyll/ai 0.4.0 → 0.4.1

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -13
  2. package/package.json +6 -8
package/dist/index.js CHANGED
@@ -658,7 +658,7 @@ var OUR_MCP_NAMES = [DOCS_MCP_NAME, DASHBOARD_MCP_NAME];
658
658
  var MCP_TOKEN_VAR = "JUSPAY_MCP_TOKEN";
659
659
  var SKILLS_PACKAGE = "sahyll/juspay-skills/skills/integrate";
660
660
  var PACKAGE_NAME = "@sahyll/ai";
661
- var CLI_VERSION = "0.4.0";
661
+ var CLI_VERSION = "0.4.1";
662
662
  var USER_AGENT = `juspay-ai-cli/${CLI_VERSION} (+https://juspay.in)`;
663
663
 
664
664
  // src/mcp-call.ts
@@ -2898,10 +2898,10 @@ function runSkills(args, cwd) {
2898
2898
 
2899
2899
  // src/setup.ts
2900
2900
  var import_picocolors4 = __toESM(require_picocolors(), 1);
2901
+ var import_which2 = __toESM(require_lib(), 1);
2901
2902
  import { spawn as spawn4 } from "node:child_process";
2902
2903
  import fs7 from "node:fs/promises";
2903
2904
  import path6 from "node:path";
2904
- var import_which2 = __toESM(require_lib(), 1);
2905
2905
  async function runSetup(cwd, token, include = []) {
2906
2906
  const agents = await detectAgents(cwd, include);
2907
2907
  const labels = [];
@@ -2938,20 +2938,22 @@ async function ensureGlobalCli() {
2938
2938
  await import_which2.default("juspay");
2939
2939
  return;
2940
2940
  } catch {}
2941
- const ok = await ye({
2942
- message: `Install the \`juspay\` command globally so you can run \`juspay claude\`? (npm i -g ${PACKAGE_NAME})`,
2943
- initialValue: true
2944
- });
2945
- if (pD(ok) || !ok) {
2946
- info(`Skipped. You can still launch with: npx ${PACKAGE_NAME} <agent>`);
2947
- return;
2948
- }
2949
- const sp = spin("Installing the juspay command globally...");
2941
+ const sp = spin("Installing the `juspay` command globally...");
2950
2942
  try {
2951
2943
  await run("npm", ["install", "-g", PACKAGE_NAME]);
2952
- sp.done("Installed `juspay` — try: juspay claude");
2953
2944
  } catch (err) {
2954
- sp.fail(`Global install failed (${err.message}). Use: npx ${PACKAGE_NAME} <agent>`);
2945
+ sp.fail(`Couldn't install the juspay command automatically: ${err.message}`);
2946
+ info(`Install it yourself: npm i -g ${PACKAGE_NAME} (then: juspay claude)`);
2947
+ return;
2948
+ }
2949
+ try {
2950
+ await import_which2.default("juspay");
2951
+ sp.done("Installed the `juspay` command — launch with: juspay claude");
2952
+ } catch {
2953
+ sp.fail("Installed `juspay`, but it isn't on your PATH.");
2954
+ info(`npm's global bin dir isn't on PATH. Add it (and put this in ~/.zshrc):`);
2955
+ info(` export PATH="$(npm prefix -g)/bin:$PATH"`);
2956
+ info("Then launch with: juspay claude");
2955
2957
  }
2956
2958
  }
2957
2959
  function run(bin, args) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@sahyll/ai",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "description": "Juspay skills + MCP servers for AI coding agents (Claude Code, Codex, Gemini, OpenCode, Cursor, Windsurf, Copilot). One command, any agent.",
6
6
  "type": "module",
7
7
  "bin": {
@@ -23,17 +23,15 @@
23
23
  "engines": {
24
24
  "node": ">=18"
25
25
  },
26
- "dependencies": {
27
- "@clack/prompts": "^0.10.0",
28
- "picocolors": "^1.1.1",
29
- "smol-toml": "^1.3.0",
30
- "which": "^5.0.0"
31
- },
32
26
  "devDependencies": {
27
+ "@clack/prompts": "^0.10.0",
33
28
  "@types/bun": "latest",
34
29
  "@types/node": "^22.0.0",
35
30
  "@types/which": "^3.0.4",
36
- "typescript": "^5.8.0"
31
+ "picocolors": "^1.1.1",
32
+ "smol-toml": "^1.3.0",
33
+ "typescript": "^5.8.0",
34
+ "which": "^5.0.0"
37
35
  },
38
36
  "license": "MIT"
39
37
  }