@outlit/cli 1.1.0 → 1.3.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.
Files changed (2) hide show
  1. package/dist/cli.js +136 -15
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -104,7 +104,7 @@ var package_default;
104
104
  var init_package = __esm(() => {
105
105
  package_default = {
106
106
  name: "@outlit/cli",
107
- version: "1.1.0",
107
+ version: "1.3.0",
108
108
  description: "CLI for Outlit customer intelligence platform",
109
109
  license: "Apache-2.0",
110
110
  repository: {
@@ -2900,6 +2900,97 @@ var init_openclaw = __esm(() => {
2900
2900
  });
2901
2901
  });
2902
2902
 
2903
+ // src/commands/setup/skills.ts
2904
+ var exports_skills = {};
2905
+ __export(exports_skills, {
2906
+ runSkillsInstall: () => runSkillsInstall,
2907
+ detectPackageRunner: () => detectPackageRunner,
2908
+ default: () => skills_default
2909
+ });
2910
+ import { execFileSync as execFileSync4 } from "node:child_process";
2911
+ function detectPackageRunner() {
2912
+ const whichCmd = process.platform === "win32" ? "where" : "which";
2913
+ for (const runner of ["npx", "bunx", "pnpx"]) {
2914
+ try {
2915
+ execFileSync4(whichCmd, [runner], { stdio: "ignore" });
2916
+ return runner;
2917
+ } catch {}
2918
+ }
2919
+ return null;
2920
+ }
2921
+ function buildRunnerArgs(runner) {
2922
+ const args = runner === "npx" ? ["-y"] : [];
2923
+ args.push("skills", "add", SKILLS_REPO_URL);
2924
+ for (const name of SKILL_NAMES) {
2925
+ args.push("--skill", name);
2926
+ }
2927
+ args.push("-y", "-g");
2928
+ return args;
2929
+ }
2930
+ function runSkillsInstall(json, exitOnError = true) {
2931
+ const runner = detectPackageRunner();
2932
+ if (!runner) {
2933
+ if (exitOnError) {
2934
+ return outputError({
2935
+ message: "No package runner found (npx, bunx, or pnpx). Install Node.js, Bun, or pnpm first.",
2936
+ code: "runner_not_found"
2937
+ }, json);
2938
+ }
2939
+ return { success: false, error: "No package runner found" };
2940
+ }
2941
+ try {
2942
+ execFileSync4(runner, buildRunnerArgs(runner), { stdio: "pipe" });
2943
+ } catch (err) {
2944
+ if (exitOnError) {
2945
+ if (isEnoentError(err)) {
2946
+ return outputError({ message: `${runner} not found`, code: "runner_not_found" }, json);
2947
+ }
2948
+ return outputError({
2949
+ message: errorMessage(err, `${runner} skills add failed`),
2950
+ code: "skills_install_error"
2951
+ }, json);
2952
+ }
2953
+ return {
2954
+ success: false,
2955
+ runner,
2956
+ error: errorMessage(err, `${runner} skills add failed`)
2957
+ };
2958
+ }
2959
+ if (exitOnError) {
2960
+ if (isJsonMode(json)) {
2961
+ outputResult({ success: true, agent: "skills", runner });
2962
+ return { success: true, runner };
2963
+ }
2964
+ console.log(`${TICK2} Agent skills installed (${SKILL_NAMES.join(", ")})`);
2965
+ }
2966
+ return { success: true, runner };
2967
+ }
2968
+ var SKILLS_REPO_URL = "https://github.com/OutlitAI/outlit-agent-skills", SKILL_NAMES, skills_default;
2969
+ var init_skills = __esm(() => {
2970
+ init_dist();
2971
+ init_output2();
2972
+ init_config();
2973
+ init_output();
2974
+ SKILL_NAMES = ["outlit-cli", "outlit-sdk"];
2975
+ skills_default = defineCommand2({
2976
+ meta: {
2977
+ name: "skills",
2978
+ description: [
2979
+ "Install Outlit agent skills for Claude Code and other AI agents.",
2980
+ "",
2981
+ "Downloads outlit-cli and outlit-sdk skills from github.com/OutlitAI/outlit-agent-skills.",
2982
+ "No API key required."
2983
+ ].join(`
2984
+ `)
2985
+ },
2986
+ args: { ...outputArgs },
2987
+ run({ args }) {
2988
+ const json = !!args.json;
2989
+ runSkillsInstall(json);
2990
+ }
2991
+ });
2992
+ });
2993
+
2903
2994
  // src/commands/setup/vscode.ts
2904
2995
  var exports_vscode = {};
2905
2996
  __export(exports_vscode, {
@@ -2938,14 +3029,14 @@ var init_vscode = __esm(() => {
2938
3029
  });
2939
3030
 
2940
3031
  // src/commands/setup/index.ts
2941
- import { execFileSync as execFileSync4 } from "node:child_process";
3032
+ import { execFileSync as execFileSync5 } from "node:child_process";
2942
3033
  import { existsSync as existsSync3 } from "node:fs";
2943
3034
  import { homedir as homedir4 } from "node:os";
2944
3035
  import { join as join6 } from "node:path";
2945
3036
  function isCommandAvailable(cmd) {
2946
3037
  try {
2947
3038
  const whichCmd = process.platform === "win32" ? "where" : "which";
2948
- execFileSync4(whichCmd, [cmd], { stdio: "ignore" });
3039
+ execFileSync5(whichCmd, [cmd], { stdio: "ignore" });
2949
3040
  return true;
2950
3041
  } catch {
2951
3042
  return false;
@@ -2980,6 +3071,7 @@ var init_setup2 = __esm(() => {
2980
3071
  init_cursor();
2981
3072
  init_gemini();
2982
3073
  init_openclaw();
3074
+ init_skills();
2983
3075
  init_vscode();
2984
3076
  agentLabels = {
2985
3077
  cursor: { label: "Cursor", hint: "~/.cursor/" },
@@ -3004,7 +3096,7 @@ var init_setup2 = __esm(() => {
3004
3096
  "Configure Outlit for AI agent tools.",
3005
3097
  "",
3006
3098
  "Without a subcommand, auto-detects installed agents and configures them all.",
3007
- "Subcommands: cursor, claude-code, claude-desktop, vscode, gemini, openclaw"
3099
+ "Subcommands: cursor, claude-code, claude-desktop, vscode, gemini, openclaw, skills"
3008
3100
  ].join(`
3009
3101
  `)
3010
3102
  },
@@ -3022,7 +3114,8 @@ var init_setup2 = __esm(() => {
3022
3114
  "claude-desktop": () => Promise.resolve().then(() => (init_claude_desktop(), exports_claude_desktop)).then((m) => m.default),
3023
3115
  vscode: () => Promise.resolve().then(() => (init_vscode(), exports_vscode)).then((m) => m.default),
3024
3116
  gemini: () => Promise.resolve().then(() => (init_gemini(), exports_gemini)).then((m) => m.default),
3025
- openclaw: () => Promise.resolve().then(() => (init_openclaw(), exports_openclaw)).then((m) => m.default)
3117
+ openclaw: () => Promise.resolve().then(() => (init_openclaw(), exports_openclaw)).then((m) => m.default),
3118
+ skills: () => Promise.resolve().then(() => (init_skills(), exports_skills)).then((m) => m.default)
3026
3119
  },
3027
3120
  async run({ args }) {
3028
3121
  const json = !!args.json;
@@ -3030,7 +3123,7 @@ var init_setup2 = __esm(() => {
3030
3123
  const detected = detectAgents();
3031
3124
  if (detected.length === 0) {
3032
3125
  if (isJsonMode(json)) {
3033
- return outputResult({ detected: [], configured: [], failed: [] });
3126
+ return outputResult({ detected: [], configured: [], failed: [], skills: null });
3034
3127
  }
3035
3128
  console.log("No supported agent tools detected.");
3036
3129
  return;
@@ -3054,8 +3147,14 @@ Configuring...`);
3054
3147
  failed.push(agentId);
3055
3148
  }
3056
3149
  }
3150
+ const skills = runSkillsInstall(json, false);
3151
+ if (!isJsonMode(json) && !skills.success) {
3152
+ console.log(`
3153
+ ! Agent skills installation failed: ${skills.error ?? "unknown error"}`);
3154
+ console.log(" Run `outlit setup skills` to retry.");
3155
+ }
3057
3156
  if (isJsonMode(json)) {
3058
- return outputResult({ detected, configured, failed });
3157
+ return outputResult({ detected, configured, failed, skills });
3059
3158
  }
3060
3159
  if (failed.length > 0) {
3061
3160
  console.log(`
@@ -3171,6 +3270,16 @@ function detectAgents2() {
3171
3270
  message: "Installed, but Outlit MCP not verified",
3172
3271
  detail: `Run \`outlit setup ${agentId}\` to configure`
3173
3272
  });
3273
+ if (agentId === "claude-code") {
3274
+ const skillsDir = join7(home, ".claude", "skills");
3275
+ const hasSkills = existsSync4(join7(skillsDir, "outlit-cli")) || existsSync4(join7(skillsDir, "outlit-sdk")) || existsSync4(join7(skillsDir, "outlit-mcp"));
3276
+ results.push({
3277
+ name: "Agent Skills",
3278
+ status: hasSkills ? "pass" : "warn",
3279
+ message: hasSkills ? "Outlit agent skills installed" : "Outlit agent skills not found",
3280
+ detail: hasSkills ? undefined : "Run `outlit setup skills` to install deeper AI agent context"
3281
+ });
3282
+ }
3174
3283
  continue;
3175
3284
  }
3176
3285
  const { path, key } = meta.configCheck;
@@ -3232,8 +3341,8 @@ var init_doctor = __esm(() => {
3232
3341
  init_api();
3233
3342
  init_config();
3234
3343
  init_output();
3235
- init_setup2();
3236
3344
  init_tty();
3345
+ init_setup2();
3237
3346
  FAIL_SYMBOL2 = isUnicodeSupported ? String.fromCodePoint(10007) : "x";
3238
3347
  STATUS_ICONS = {
3239
3348
  pass: TICK2,
@@ -3276,7 +3385,11 @@ var init_doctor = __esm(() => {
3276
3385
  if (credential) {
3277
3386
  checks.push(await validateApiKey(credential.key));
3278
3387
  } else {
3279
- checks.push({ name: "API validation", status: "fail", message: "Skipped -- no API key found" });
3388
+ checks.push({
3389
+ name: "API validation",
3390
+ status: "fail",
3391
+ message: "Skipped -- no API key found"
3392
+ });
3280
3393
  }
3281
3394
  checks.push(...detectAgents2());
3282
3395
  const hasFail = checks.some((c) => c.status === "fail");
@@ -3954,14 +4067,14 @@ __export(exports_setup, {
3954
4067
  detectAgents: () => detectAgents3,
3955
4068
  default: () => setup_default2
3956
4069
  });
3957
- import { execFileSync as execFileSync5 } from "node:child_process";
4070
+ import { execFileSync as execFileSync6 } from "node:child_process";
3958
4071
  import { existsSync as existsSync5 } from "node:fs";
3959
4072
  import { homedir as homedir6 } from "node:os";
3960
4073
  import { join as join8 } from "node:path";
3961
4074
  function isCommandAvailable2(cmd) {
3962
4075
  try {
3963
4076
  const whichCmd = process.platform === "win32" ? "where" : "which";
3964
- execFileSync5(whichCmd, [cmd], { stdio: "ignore" });
4077
+ execFileSync6(whichCmd, [cmd], { stdio: "ignore" });
3965
4078
  return true;
3966
4079
  } catch {
3967
4080
  return false;
@@ -3996,6 +4109,7 @@ var init_setup3 = __esm(() => {
3996
4109
  init_cursor();
3997
4110
  init_gemini();
3998
4111
  init_openclaw();
4112
+ init_skills();
3999
4113
  init_vscode();
4000
4114
  agentLabels2 = {
4001
4115
  cursor: { label: "Cursor", hint: "~/.cursor/" },
@@ -4020,7 +4134,7 @@ var init_setup3 = __esm(() => {
4020
4134
  "Configure Outlit for AI agent tools.",
4021
4135
  "",
4022
4136
  "Without a subcommand, auto-detects installed agents and configures them all.",
4023
- "Subcommands: cursor, claude-code, claude-desktop, vscode, gemini, openclaw"
4137
+ "Subcommands: cursor, claude-code, claude-desktop, vscode, gemini, openclaw, skills"
4024
4138
  ].join(`
4025
4139
  `)
4026
4140
  },
@@ -4038,7 +4152,8 @@ var init_setup3 = __esm(() => {
4038
4152
  "claude-desktop": () => Promise.resolve().then(() => (init_claude_desktop(), exports_claude_desktop)).then((m) => m.default),
4039
4153
  vscode: () => Promise.resolve().then(() => (init_vscode(), exports_vscode)).then((m) => m.default),
4040
4154
  gemini: () => Promise.resolve().then(() => (init_gemini(), exports_gemini)).then((m) => m.default),
4041
- openclaw: () => Promise.resolve().then(() => (init_openclaw(), exports_openclaw)).then((m) => m.default)
4155
+ openclaw: () => Promise.resolve().then(() => (init_openclaw(), exports_openclaw)).then((m) => m.default),
4156
+ skills: () => Promise.resolve().then(() => (init_skills(), exports_skills)).then((m) => m.default)
4042
4157
  },
4043
4158
  async run({ args }) {
4044
4159
  const json = !!args.json;
@@ -4046,7 +4161,7 @@ var init_setup3 = __esm(() => {
4046
4161
  const detected = detectAgents3();
4047
4162
  if (detected.length === 0) {
4048
4163
  if (isJsonMode(json)) {
4049
- return outputResult({ detected: [], configured: [], failed: [] });
4164
+ return outputResult({ detected: [], configured: [], failed: [], skills: null });
4050
4165
  }
4051
4166
  console.log("No supported agent tools detected.");
4052
4167
  return;
@@ -4070,8 +4185,14 @@ Configuring...`);
4070
4185
  failed.push(agentId);
4071
4186
  }
4072
4187
  }
4188
+ const skills = runSkillsInstall(json, false);
4189
+ if (!isJsonMode(json) && !skills.success) {
4190
+ console.log(`
4191
+ ! Agent skills installation failed: ${skills.error ?? "unknown error"}`);
4192
+ console.log(" Run `outlit setup skills` to retry.");
4193
+ }
4073
4194
  if (isJsonMode(json)) {
4074
- return outputResult({ detected, configured, failed });
4195
+ return outputResult({ detected, configured, failed, skills });
4075
4196
  }
4076
4197
  if (failed.length > 0) {
4077
4198
  console.log(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outlit/cli",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "CLI for Outlit customer intelligence platform",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {