@hasnatools/skills 0.1.6 → 0.1.7

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 +81 -35
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21899,6 +21899,7 @@ function formatBytes(bytes) {
21899
21899
  }
21900
21900
 
21901
21901
  // src/commands/marketplace.ts
21902
+ var indigo = source_default.hex("#6366f1");
21902
21903
  async function marketplaceCommand(options = {}) {
21903
21904
  const spinner = ora("Fetching skills from marketplace...").start();
21904
21905
  const limit = options.limit || 20;
@@ -21921,64 +21922,111 @@ async function marketplaceCommand(options = {}) {
21921
21922
  return;
21922
21923
  }
21923
21924
  console.log();
21924
- console.log(source_default.bold(`Skills Marketplace`) + source_default.dim(` (page ${page}/${totalPages}, ${total} total skills)`));
21925
+ console.log(indigo.bold(`Skills Marketplace`) + source_default.dim(` (page ${page}/${totalPages}, ${total} total skills)`));
21925
21926
  console.log();
21926
21927
  for (const skill of skills) {
21927
- const verified = skill.isVerified ? source_default.blue(" ✓") : "";
21928
+ const verified = skill.isVerified ? indigo(" ✓") : "";
21928
21929
  const downloads = skill.downloadCount > 0 ? source_default.dim(` (${skill.downloadCount} installs)`) : "";
21929
21930
  console.log(" " + source_default.bold(skill.name) + verified + source_default.dim(` v${skill.version}`) + downloads);
21930
21931
  console.log(" " + source_default.dim(skill.description || "No description"));
21931
- console.log(" " + source_default.cyan(`skills install ${skill.slug}`));
21932
+ console.log(" " + indigo(`skills install ${skill.slug}`));
21932
21933
  console.log();
21933
21934
  }
21934
21935
  console.log(source_default.dim("─".repeat(50)));
21935
21936
  if (totalPages > 1) {
21936
21937
  const navHints = [];
21937
21938
  if (page > 1) {
21938
- navHints.push(`${source_default.cyan(`skills marketplace -p ${page - 1}`)} for previous`);
21939
+ navHints.push(`${indigo(`skills marketplace -p ${page - 1}`)} for previous`);
21939
21940
  }
21940
21941
  if (page < totalPages) {
21941
- navHints.push(`${source_default.cyan(`skills marketplace -p ${page + 1}`)} for next`);
21942
+ navHints.push(`${indigo(`skills marketplace -p ${page + 1}`)} for next`);
21942
21943
  }
21943
21944
  if (navHints.length > 0) {
21944
21945
  console.log(source_default.dim(navHints.join(" | ")));
21945
21946
  }
21946
21947
  }
21947
- console.log(source_default.dim(`Run ${source_default.cyan("skills install <name>")} to install a skill`));
21948
- console.log(source_default.dim(`Run ${source_default.cyan("skills search <query>")} to search for specific skills`));
21948
+ console.log(source_default.dim(`Run ${indigo("skills install <name>")} to install a skill`));
21949
+ console.log(source_default.dim(`Run ${indigo("skills search <query>")} to search for specific skills`));
21949
21950
  }
21950
21951
 
21951
21952
  // src/commands/feedback.ts
21952
- var GITHUB_ISSUES_URL = "https://github.com/skillsmd/skills-md/issues";
21953
- var DISCORD_URL = "https://discord.gg/skillsmd";
21954
- var EMAIL = "feedback@skills.md";
21953
+ var import_prompts2 = __toESM(require_prompts3(), 1);
21954
+ var indigo2 = source_default.hex("#6366f1");
21955
+ var indigoBold = source_default.hex("#6366f1").bold;
21955
21956
  async function feedbackCommand(options = {}) {
21956
21957
  console.log();
21957
- console.log(source_default.bold("We'd love to hear from you!"));
21958
+ console.log(indigoBold("\uD83D\uDCDD Submit Feedback"));
21958
21959
  console.log();
21959
- if (options.bug || options.github) {
21960
- console.log(source_default.dim("Opening GitHub Issues..."));
21961
- await open_default(GITHUB_ISSUES_URL);
21962
- console.log(source_default.green("") + " Opened: " + source_default.cyan(GITHUB_ISSUES_URL));
21963
- } else {
21964
- console.log(source_default.dim("How to reach us:"));
21965
- console.log();
21966
- console.log(" " + source_default.bold("GitHub Issues") + source_default.dim(" (bugs & features)"));
21967
- console.log(" " + source_default.cyan(GITHUB_ISSUES_URL));
21968
- console.log();
21969
- console.log(" " + source_default.bold("Email"));
21970
- console.log(" " + source_default.cyan(EMAIL));
21960
+ const apiKey = getApiKey();
21961
+ if (!apiKey) {
21962
+ console.log(source_default.yellow("⚠") + " You need to be logged in to submit feedback.");
21963
+ console.log(source_default.dim(" Run ") + indigo2("skills login") + source_default.dim(" first."));
21971
21964
  console.log();
21972
- console.log(" " + source_default.bold("Discord"));
21973
- console.log(" " + source_default.cyan(DISCORD_URL));
21965
+ return;
21966
+ }
21967
+ const response = await import_prompts2.default([
21968
+ {
21969
+ type: "select",
21970
+ name: "type",
21971
+ message: "What type of feedback?",
21972
+ choices: [
21973
+ { title: "\uD83D\uDC1B Bug Report", value: "bug" },
21974
+ { title: "✨ Feature Request", value: "feature" },
21975
+ { title: "\uD83D\uDCA1 Improvement", value: "improvement" },
21976
+ { title: "\uD83D\uDCAC Other", value: "other" }
21977
+ ],
21978
+ initial: options.type === "bug" ? 0 : options.type === "feature" ? 1 : 0
21979
+ },
21980
+ {
21981
+ type: "text",
21982
+ name: "title",
21983
+ message: "Title (short summary)",
21984
+ initial: options.title || "",
21985
+ validate: (value) => value.length > 0 ? true : "Title is required"
21986
+ },
21987
+ {
21988
+ type: "text",
21989
+ name: "description",
21990
+ message: "Description (details)",
21991
+ initial: options.message || "",
21992
+ validate: (value) => value.length > 0 ? true : "Description is required"
21993
+ }
21994
+ ]);
21995
+ if (!response.type || !response.title || !response.description) {
21996
+ console.log(source_default.dim(`
21997
+ Feedback cancelled.`));
21998
+ return;
21999
+ }
22000
+ const spinner = ora("Submitting feedback...").start();
22001
+ try {
22002
+ const res = await makeApiRequest("/feedback", {
22003
+ method: "POST",
22004
+ body: JSON.stringify({
22005
+ type: response.type,
22006
+ title: response.title,
22007
+ description: response.description,
22008
+ page: "cli"
22009
+ })
22010
+ });
22011
+ if (!res.ok) {
22012
+ const data = await res.json();
22013
+ spinner.fail("Failed to submit feedback");
22014
+ console.log(source_default.red(" " + (data.error || "Unknown error")));
22015
+ return;
22016
+ }
22017
+ spinner.succeed("Feedback submitted!");
21974
22018
  console.log();
21975
- console.log(source_default.dim("".repeat(40)));
21976
- console.log(source_default.dim("Run ") + source_default.cyan("skills feedback --github") + source_default.dim(" to open GitHub Issues"));
22019
+ console.log(indigo2(" Thank you for your feedback! \uD83D\uDE4F"));
22020
+ console.log(source_default.dim(" We'll review it and get back to you if needed."));
22021
+ } catch (error) {
22022
+ spinner.fail("Failed to submit feedback");
22023
+ console.log(source_default.red(" " + (error instanceof Error ? error.message : "Network error")));
21977
22024
  }
21978
22025
  console.log();
21979
22026
  }
21980
22027
 
21981
22028
  // src/index.ts
22029
+ var indigo3 = source_default.hex("#6366f1");
21982
22030
  var program2 = new Command;
21983
22031
  program2.name("skills").description("CLI for skills.md - AI Agent Skills Marketplace").version("0.1.0");
21984
22032
  program2.command("init").description("Initialize skills.md in current project").option("-f, --force", "Force re-initialization (removes existing .skills/)").action((options) => {
@@ -22053,14 +22101,13 @@ program2.command("logs <skill>").description("View execution logs for a skill").
22053
22101
  tail: parseInt(options.tail, 10)
22054
22102
  });
22055
22103
  });
22056
- program2.command("feedback").description("Send feedback or report issues").option("-g, --github", "Open GitHub Issues in browser").option("-b, --bug", "Open GitHub Issues (alias for --github)").action((options) => {
22104
+ program2.command("feedback").description("Submit feedback, bug reports, or feature requests").option("-t, --type <type>", "Feedback type (bug, feature, improvement, other)").action((options) => {
22057
22105
  feedbackCommand({
22058
- github: options.github,
22059
- bug: options.bug
22106
+ type: options.type
22060
22107
  });
22061
22108
  });
22062
22109
  program2.addHelpText("after", `
22063
- ${source_default.bold("Examples:")}
22110
+ ${indigo3.bold("Examples:")}
22064
22111
  ${source_default.dim("# Initialize in current project")}
22065
22112
  $ skills init
22066
22113
 
@@ -22095,11 +22142,10 @@ ${source_default.bold("Examples:")}
22095
22142
  ${source_default.dim("# View logs for a skill")}
22096
22143
  $ skills logs code-review
22097
22144
 
22098
- ${source_default.dim("# Send feedback or report bugs")}
22145
+ ${source_default.dim("# Submit feedback")}
22099
22146
  $ skills feedback
22100
- $ skills feedback --bug
22101
22147
 
22102
- ${source_default.bold("Documentation:")}
22103
- https://skills.md/docs
22148
+ ${indigo3.bold("Documentation:")}
22149
+ ${indigo3("https://skills.md/docs")}
22104
22150
  `);
22105
22151
  program2.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasnatools/skills",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "CLI for skills.md - AI Agent Skills Marketplace",
5
5
  "type": "module",
6
6
  "bin": {