@hasnatools/skills 0.1.9 → 0.1.10
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 +153 -45
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21785,7 +21785,7 @@ async function generateCommand(mediaType, prompt, options = {}) {
|
|
|
21785
21785
|
console.log();
|
|
21786
21786
|
const spinner = ora("Sending request...").start();
|
|
21787
21787
|
try {
|
|
21788
|
-
const response = await makeApiRequest("/
|
|
21788
|
+
const response = await makeApiRequest("/generate", {
|
|
21789
21789
|
method: "POST",
|
|
21790
21790
|
body: JSON.stringify({
|
|
21791
21791
|
mediaType,
|
|
@@ -21839,7 +21839,7 @@ async function jobsCommand(jobId) {
|
|
|
21839
21839
|
}
|
|
21840
21840
|
const spinner = ora("Fetching jobs...").start();
|
|
21841
21841
|
try {
|
|
21842
|
-
const endpoint = jobId ? `/
|
|
21842
|
+
const endpoint = jobId ? `/jobs/${jobId}` : "/jobs";
|
|
21843
21843
|
const response = await makeApiRequest(endpoint);
|
|
21844
21844
|
if (!response.ok) {
|
|
21845
21845
|
const error = await response.json();
|
|
@@ -21915,7 +21915,111 @@ function formatStatus(status) {
|
|
|
21915
21915
|
// src/commands/history.ts
|
|
21916
21916
|
import { existsSync as existsSync8, readFileSync as readFileSync4, readdirSync as readdirSync2, statSync } from "fs";
|
|
21917
21917
|
import { join as join8 } from "path";
|
|
21918
|
+
var indigo3 = source_default.hex("#6366f1");
|
|
21918
21919
|
async function historyCommand(options = {}) {
|
|
21920
|
+
if (options.local) {
|
|
21921
|
+
return localHistoryCommand(options);
|
|
21922
|
+
}
|
|
21923
|
+
const apiKey = getApiKey();
|
|
21924
|
+
if (!apiKey) {
|
|
21925
|
+
console.log(source_default.yellow("Not logged in - showing local history only"));
|
|
21926
|
+
console.log(source_default.dim("Run `skills login` to see remote execution history"));
|
|
21927
|
+
console.log();
|
|
21928
|
+
return localHistoryCommand(options);
|
|
21929
|
+
}
|
|
21930
|
+
const spinner = ora("Fetching execution history...").start();
|
|
21931
|
+
try {
|
|
21932
|
+
const params = new URLSearchParams;
|
|
21933
|
+
if (options.skill)
|
|
21934
|
+
params.set("skill", options.skill);
|
|
21935
|
+
if (options.limit)
|
|
21936
|
+
params.set("limit", String(options.limit));
|
|
21937
|
+
if (options.status)
|
|
21938
|
+
params.set("status", options.status);
|
|
21939
|
+
const query = params.toString();
|
|
21940
|
+
const response = await makeApiRequest(`/me/executions${query ? `?${query}` : ""}`);
|
|
21941
|
+
if (!response.ok) {
|
|
21942
|
+
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
21943
|
+
spinner.fail("Failed to fetch history");
|
|
21944
|
+
console.log(source_default.red(error.error));
|
|
21945
|
+
return;
|
|
21946
|
+
}
|
|
21947
|
+
const result = await response.json();
|
|
21948
|
+
spinner.stop();
|
|
21949
|
+
const { executions, pagination, counts } = result;
|
|
21950
|
+
console.log();
|
|
21951
|
+
console.log(indigo3.bold("Execution History"));
|
|
21952
|
+
console.log(source_default.dim(`Total: ${counts.all} | Completed: ${counts.completed} | Failed: ${counts.failed} | Pending: ${counts.pending}`));
|
|
21953
|
+
console.log();
|
|
21954
|
+
if (executions.length === 0) {
|
|
21955
|
+
console.log(source_default.dim("No executions found"));
|
|
21956
|
+
console.log(source_default.dim("Run a skill with `skills run <name>` to start tracking"));
|
|
21957
|
+
return;
|
|
21958
|
+
}
|
|
21959
|
+
for (const exec of executions) {
|
|
21960
|
+
const date = new Date(exec.createdAt);
|
|
21961
|
+
const dateStr = date.toLocaleDateString();
|
|
21962
|
+
const timeStr = date.toLocaleTimeString();
|
|
21963
|
+
const statusIcon = getStatusIcon(exec.status);
|
|
21964
|
+
const durationStr = exec.durationMs ? formatDuration2(exec.durationMs) : "-";
|
|
21965
|
+
console.log(`${statusIcon} ${source_default.bold(exec.skillSlug || exec.skillName || "Unknown")} ${source_default.dim(`(${dateStr} ${timeStr})`)}`);
|
|
21966
|
+
console.log(` ${source_default.dim("ID:")} ${exec.id.slice(0, 8)}...`);
|
|
21967
|
+
console.log(` ${source_default.dim("Status:")} ${formatStatus2(exec.status)}`);
|
|
21968
|
+
console.log(` ${source_default.dim("Duration:")} ${durationStr}`);
|
|
21969
|
+
if (exec.creditsUsed > 0) {
|
|
21970
|
+
console.log(` ${source_default.dim("Credits:")} ${indigo3(String(exec.creditsUsed))}`);
|
|
21971
|
+
}
|
|
21972
|
+
if (exec.outputType) {
|
|
21973
|
+
console.log(` ${source_default.dim("Output:")} ${exec.outputType}`);
|
|
21974
|
+
}
|
|
21975
|
+
if (exec.exports && exec.exports.length > 0) {
|
|
21976
|
+
console.log(` ${source_default.dim("Exports:")} ${exec.exports.length} file(s)`);
|
|
21977
|
+
if (options.verbose) {
|
|
21978
|
+
for (const exp of exec.exports) {
|
|
21979
|
+
console.log(` ${source_default.dim("→")} ${exp.filename}`);
|
|
21980
|
+
}
|
|
21981
|
+
}
|
|
21982
|
+
}
|
|
21983
|
+
if (exec.errorMessage && options.verbose) {
|
|
21984
|
+
console.log(` ${source_default.dim("Error:")} ${source_default.red(exec.errorMessage)}`);
|
|
21985
|
+
}
|
|
21986
|
+
console.log();
|
|
21987
|
+
}
|
|
21988
|
+
if (pagination.hasMore) {
|
|
21989
|
+
console.log(source_default.dim(`Showing ${executions.length} of ${pagination.total} executions`));
|
|
21990
|
+
console.log(source_default.dim(`Use --limit to see more`));
|
|
21991
|
+
}
|
|
21992
|
+
console.log(source_default.dim("View all at: https://skills.md/dashboard/executions"));
|
|
21993
|
+
} catch (error) {
|
|
21994
|
+
spinner.fail("Request failed");
|
|
21995
|
+
console.log(source_default.red(error instanceof Error ? error.message : "Unknown error"));
|
|
21996
|
+
}
|
|
21997
|
+
}
|
|
21998
|
+
function getStatusIcon(status) {
|
|
21999
|
+
switch (status) {
|
|
22000
|
+
case "completed":
|
|
22001
|
+
return source_default.green("✓");
|
|
22002
|
+
case "failed":
|
|
22003
|
+
return source_default.red("✗");
|
|
22004
|
+
case "pending":
|
|
22005
|
+
return source_default.yellow("◌");
|
|
22006
|
+
default:
|
|
22007
|
+
return source_default.dim("○");
|
|
22008
|
+
}
|
|
22009
|
+
}
|
|
22010
|
+
function formatStatus2(status) {
|
|
22011
|
+
switch (status) {
|
|
22012
|
+
case "completed":
|
|
22013
|
+
return source_default.green("completed");
|
|
22014
|
+
case "failed":
|
|
22015
|
+
return source_default.red("failed");
|
|
22016
|
+
case "pending":
|
|
22017
|
+
return source_default.yellow("pending");
|
|
22018
|
+
default:
|
|
22019
|
+
return source_default.dim(status || "unknown");
|
|
22020
|
+
}
|
|
22021
|
+
}
|
|
22022
|
+
async function localHistoryCommand(options) {
|
|
21919
22023
|
const projectOutputDir = getProjectSkillsOutputDir();
|
|
21920
22024
|
if (!projectOutputDir) {
|
|
21921
22025
|
console.log(source_default.yellow("No project initialized"));
|
|
@@ -21924,7 +22028,7 @@ async function historyCommand(options = {}) {
|
|
|
21924
22028
|
}
|
|
21925
22029
|
const historyFile = join8(projectOutputDir, "execution-history.jsonl");
|
|
21926
22030
|
if (!existsSync8(historyFile)) {
|
|
21927
|
-
console.log(source_default.dim("No execution history found"));
|
|
22031
|
+
console.log(source_default.dim("No local execution history found"));
|
|
21928
22032
|
console.log(source_default.dim("Run a skill with `skills run <name>` to start tracking"));
|
|
21929
22033
|
return;
|
|
21930
22034
|
}
|
|
@@ -21948,7 +22052,7 @@ async function historyCommand(options = {}) {
|
|
|
21948
22052
|
return;
|
|
21949
22053
|
}
|
|
21950
22054
|
console.log();
|
|
21951
|
-
console.log(
|
|
22055
|
+
console.log(indigo3.bold("Local Execution History"));
|
|
21952
22056
|
console.log(source_default.dim(`Showing ${entries.length} most recent execution(s)`));
|
|
21953
22057
|
console.log();
|
|
21954
22058
|
for (const entry of entries) {
|
|
@@ -21999,7 +22103,7 @@ async function exportsCommand(slug, options = {}) {
|
|
|
21999
22103
|
return;
|
|
22000
22104
|
}
|
|
22001
22105
|
console.log();
|
|
22002
|
-
console.log(
|
|
22106
|
+
console.log(indigo3.bold(`Exports for ${slug}`));
|
|
22003
22107
|
console.log(source_default.dim(`Directory: ${exportsDir}`));
|
|
22004
22108
|
console.log();
|
|
22005
22109
|
const fileInfos = files.map((file) => {
|
|
@@ -22042,17 +22146,17 @@ async function logsCommand(slug, options = {}) {
|
|
|
22042
22146
|
const latestLog = files[0];
|
|
22043
22147
|
const logPath = join8(logsDir, latestLog);
|
|
22044
22148
|
console.log();
|
|
22045
|
-
console.log(
|
|
22149
|
+
console.log(indigo3.bold(`Latest Log for ${slug}`));
|
|
22046
22150
|
console.log(source_default.dim(`File: ${logPath}`));
|
|
22047
22151
|
console.log(source_default.dim("─".repeat(60)));
|
|
22048
22152
|
console.log();
|
|
22049
22153
|
const content = readFileSync4(logPath, "utf-8");
|
|
22050
|
-
const
|
|
22154
|
+
const logLines = content.split(`
|
|
22051
22155
|
`);
|
|
22052
22156
|
const tailLines = options.tail || 50;
|
|
22053
|
-
if (
|
|
22157
|
+
if (logLines.length > tailLines) {
|
|
22054
22158
|
console.log(source_default.dim(`... (showing last ${tailLines} lines)`));
|
|
22055
|
-
console.log(
|
|
22159
|
+
console.log(logLines.slice(-tailLines).join(`
|
|
22056
22160
|
`));
|
|
22057
22161
|
} else {
|
|
22058
22162
|
console.log(content);
|
|
@@ -22082,7 +22186,7 @@ function formatBytes(bytes) {
|
|
|
22082
22186
|
}
|
|
22083
22187
|
|
|
22084
22188
|
// src/commands/marketplace.ts
|
|
22085
|
-
var
|
|
22189
|
+
var indigo4 = source_default.hex("#6366f1");
|
|
22086
22190
|
async function marketplaceCommand(options = {}) {
|
|
22087
22191
|
const spinner = ora("Fetching skills from marketplace...").start();
|
|
22088
22192
|
const limit = options.limit || 20;
|
|
@@ -22105,36 +22209,36 @@ async function marketplaceCommand(options = {}) {
|
|
|
22105
22209
|
return;
|
|
22106
22210
|
}
|
|
22107
22211
|
console.log();
|
|
22108
|
-
console.log(
|
|
22212
|
+
console.log(indigo4.bold(`Skills Marketplace`) + source_default.dim(` (page ${page}/${totalPages}, ${total} total skills)`));
|
|
22109
22213
|
console.log();
|
|
22110
22214
|
for (const skill of skills) {
|
|
22111
|
-
const verified = skill.isVerified ?
|
|
22215
|
+
const verified = skill.isVerified ? indigo4(" ✓") : "";
|
|
22112
22216
|
const downloads = skill.downloadCount > 0 ? source_default.dim(` (${skill.downloadCount} installs)`) : "";
|
|
22113
22217
|
console.log(" " + source_default.bold(skill.name) + verified + source_default.dim(` v${skill.version}`) + downloads);
|
|
22114
22218
|
console.log(" " + source_default.dim(skill.description || "No description"));
|
|
22115
|
-
console.log(" " +
|
|
22219
|
+
console.log(" " + indigo4(`skills install ${skill.slug}`));
|
|
22116
22220
|
console.log();
|
|
22117
22221
|
}
|
|
22118
22222
|
console.log(source_default.dim("─".repeat(50)));
|
|
22119
22223
|
if (totalPages > 1) {
|
|
22120
22224
|
const navHints = [];
|
|
22121
22225
|
if (page > 1) {
|
|
22122
|
-
navHints.push(`${
|
|
22226
|
+
navHints.push(`${indigo4(`skills marketplace -p ${page - 1}`)} for previous`);
|
|
22123
22227
|
}
|
|
22124
22228
|
if (page < totalPages) {
|
|
22125
|
-
navHints.push(`${
|
|
22229
|
+
navHints.push(`${indigo4(`skills marketplace -p ${page + 1}`)} for next`);
|
|
22126
22230
|
}
|
|
22127
22231
|
if (navHints.length > 0) {
|
|
22128
22232
|
console.log(source_default.dim(navHints.join(" | ")));
|
|
22129
22233
|
}
|
|
22130
22234
|
}
|
|
22131
|
-
console.log(source_default.dim(`Run ${
|
|
22132
|
-
console.log(source_default.dim(`Run ${
|
|
22235
|
+
console.log(source_default.dim(`Run ${indigo4("skills install <name>")} to install a skill`));
|
|
22236
|
+
console.log(source_default.dim(`Run ${indigo4("skills search <query>")} to search for specific skills`));
|
|
22133
22237
|
}
|
|
22134
22238
|
|
|
22135
22239
|
// src/commands/feedback.ts
|
|
22136
22240
|
var import_prompts2 = __toESM(require_prompts3(), 1);
|
|
22137
|
-
var
|
|
22241
|
+
var indigo5 = source_default.hex("#6366f1");
|
|
22138
22242
|
var indigoBold = source_default.hex("#6366f1").bold;
|
|
22139
22243
|
async function submitFeedback(type, title, description) {
|
|
22140
22244
|
const spinner = ora("Submitting feedback...").start();
|
|
@@ -22156,7 +22260,7 @@ async function submitFeedback(type, title, description) {
|
|
|
22156
22260
|
}
|
|
22157
22261
|
spinner.succeed("Feedback submitted!");
|
|
22158
22262
|
console.log();
|
|
22159
|
-
console.log(
|
|
22263
|
+
console.log(indigo5(" Thank you for your feedback! \uD83D\uDE4F"));
|
|
22160
22264
|
console.log(source_default.dim(" We'll review it and get back to you if needed."));
|
|
22161
22265
|
return true;
|
|
22162
22266
|
} catch (error) {
|
|
@@ -22172,7 +22276,7 @@ async function feedbackCommand(options = {}) {
|
|
|
22172
22276
|
const apiKey = getApiKey();
|
|
22173
22277
|
if (!apiKey) {
|
|
22174
22278
|
console.log(source_default.yellow("⚠") + " You need to be logged in to submit feedback.");
|
|
22175
|
-
console.log(source_default.dim(" Run ") +
|
|
22279
|
+
console.log(source_default.dim(" Run ") + indigo5("skills login") + source_default.dim(" first."));
|
|
22176
22280
|
console.log();
|
|
22177
22281
|
return;
|
|
22178
22282
|
}
|
|
@@ -22225,7 +22329,7 @@ Feedback cancelled.`));
|
|
|
22225
22329
|
}
|
|
22226
22330
|
|
|
22227
22331
|
// src/commands/info.ts
|
|
22228
|
-
var
|
|
22332
|
+
var indigo6 = source_default.hex("#6366f1");
|
|
22229
22333
|
async function infoCommand(name) {
|
|
22230
22334
|
const spinner = ora("Fetching skill info...").start();
|
|
22231
22335
|
const result = await getSkill(name);
|
|
@@ -22237,7 +22341,7 @@ async function infoCommand(name) {
|
|
|
22237
22341
|
spinner.stop();
|
|
22238
22342
|
const skill = result.data;
|
|
22239
22343
|
console.log();
|
|
22240
|
-
console.log(
|
|
22344
|
+
console.log(indigo6.bold(skill.name) + (skill.isVerified ? indigo6(" ✓") : ""));
|
|
22241
22345
|
console.log(source_default.dim(`v${skill.version}`));
|
|
22242
22346
|
console.log();
|
|
22243
22347
|
if (skill.description) {
|
|
@@ -22254,7 +22358,7 @@ async function infoCommand(name) {
|
|
|
22254
22358
|
["Downloads", skill.downloadCount.toLocaleString()],
|
|
22255
22359
|
["Verified", skill.isVerified ? source_default.green("Yes") : "No"],
|
|
22256
22360
|
["Remote Execution", skill.isRemoteExecution ? source_default.green("Yes") : "No"],
|
|
22257
|
-
["Credits/Run", (skill.creditsPerExecution ?? 0) > 0 ?
|
|
22361
|
+
["Credits/Run", (skill.creditsPerExecution ?? 0) > 0 ? indigo6(String(skill.creditsPerExecution)) : source_default.green("Free")]
|
|
22258
22362
|
];
|
|
22259
22363
|
for (const [label, value] of details) {
|
|
22260
22364
|
console.log(` ${source_default.dim(label.padEnd(18))} ${value}`);
|
|
@@ -22266,15 +22370,15 @@ async function infoCommand(name) {
|
|
|
22266
22370
|
console.log();
|
|
22267
22371
|
console.log(source_default.dim("─".repeat(50)));
|
|
22268
22372
|
console.log();
|
|
22269
|
-
console.log(` ${source_default.dim("Install:")} ${
|
|
22373
|
+
console.log(` ${source_default.dim("Install:")} ${indigo6(`skills install ${skill.slug}`)}`);
|
|
22270
22374
|
if (skill.isRemoteExecution) {
|
|
22271
|
-
console.log(` ${source_default.dim("Run:")} ${
|
|
22375
|
+
console.log(` ${source_default.dim("Run:")} ${indigo6(`skills run ${skill.slug}`)}`);
|
|
22272
22376
|
}
|
|
22273
22377
|
console.log();
|
|
22274
22378
|
}
|
|
22275
22379
|
|
|
22276
22380
|
// src/commands/credits.ts
|
|
22277
|
-
var
|
|
22381
|
+
var indigo7 = source_default.hex("#6366f1");
|
|
22278
22382
|
async function creditsCommand() {
|
|
22279
22383
|
const apiKey = getApiKey();
|
|
22280
22384
|
if (!apiKey) {
|
|
@@ -22292,9 +22396,9 @@ async function creditsCommand() {
|
|
|
22292
22396
|
spinner.stop();
|
|
22293
22397
|
const { creditsBalance, plan, tenantName } = result.data;
|
|
22294
22398
|
console.log();
|
|
22295
|
-
console.log(
|
|
22399
|
+
console.log(indigo7.bold("Credits Balance"));
|
|
22296
22400
|
console.log();
|
|
22297
|
-
console.log(" " +
|
|
22401
|
+
console.log(" " + indigo7.bold(creditsBalance.toLocaleString()) + " credits");
|
|
22298
22402
|
console.log();
|
|
22299
22403
|
console.log(source_default.dim("─".repeat(30)));
|
|
22300
22404
|
console.log();
|
|
@@ -22308,7 +22412,7 @@ async function creditsCommand() {
|
|
|
22308
22412
|
// src/commands/update.ts
|
|
22309
22413
|
import { existsSync as existsSync9, readdirSync as readdirSync3, readFileSync as readFileSync5, writeFileSync as writeFileSync6 } from "fs";
|
|
22310
22414
|
import { join as join9 } from "path";
|
|
22311
|
-
var
|
|
22415
|
+
var indigo8 = source_default.hex("#6366f1");
|
|
22312
22416
|
function parseFrontmatter2(content) {
|
|
22313
22417
|
const result = {};
|
|
22314
22418
|
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
@@ -22368,7 +22472,7 @@ async function updateCommand(skillName, options = {}) {
|
|
|
22368
22472
|
return;
|
|
22369
22473
|
}
|
|
22370
22474
|
console.log();
|
|
22371
|
-
console.log(
|
|
22475
|
+
console.log(indigo8.bold("Updating Skills"));
|
|
22372
22476
|
console.log();
|
|
22373
22477
|
let updated = 0;
|
|
22374
22478
|
let upToDate = 0;
|
|
@@ -22386,7 +22490,7 @@ async function updateCommand(skillName, options = {}) {
|
|
|
22386
22490
|
const currentVersion = skill.version;
|
|
22387
22491
|
if (newVersion !== currentVersion) {
|
|
22388
22492
|
writeFileSync6(join9(skill.dir, "SKILL.md"), result.data.skillMdContent);
|
|
22389
|
-
spinner.succeed(`${skill.name}: ${source_default.dim(currentVersion)} ${
|
|
22493
|
+
spinner.succeed(`${skill.name}: ${source_default.dim(currentVersion)} ${indigo8("→")} ${indigo8(newVersion)}`);
|
|
22390
22494
|
updated++;
|
|
22391
22495
|
} else {
|
|
22392
22496
|
spinner.succeed(`${skill.name}: ${source_default.dim(`v${currentVersion}`)} ${source_default.green("(up to date)")}`);
|
|
@@ -22402,7 +22506,7 @@ async function updateCommand(skillName, options = {}) {
|
|
|
22402
22506
|
console.log();
|
|
22403
22507
|
const summary = [];
|
|
22404
22508
|
if (updated > 0)
|
|
22405
|
-
summary.push(
|
|
22509
|
+
summary.push(indigo8(`${updated} updated`));
|
|
22406
22510
|
if (upToDate > 0)
|
|
22407
22511
|
summary.push(source_default.green(`${upToDate} up to date`));
|
|
22408
22512
|
if (failed > 0)
|
|
@@ -22413,11 +22517,11 @@ async function updateCommand(skillName, options = {}) {
|
|
|
22413
22517
|
|
|
22414
22518
|
// src/commands/upgrade.ts
|
|
22415
22519
|
import { execSync } from "child_process";
|
|
22416
|
-
var
|
|
22520
|
+
var indigo9 = source_default.hex("#6366f1");
|
|
22417
22521
|
var PACKAGE_NAME = "@hasnatools/skills";
|
|
22418
22522
|
async function upgradeCommand() {
|
|
22419
22523
|
console.log();
|
|
22420
|
-
console.log(
|
|
22524
|
+
console.log(indigo9.bold("Upgrade Skills CLI"));
|
|
22421
22525
|
console.log();
|
|
22422
22526
|
const currentVersion = process.env.npm_package_version || getInstalledVersion();
|
|
22423
22527
|
console.log(` Current: ${source_default.dim(`v${currentVersion}`)}`);
|
|
@@ -22438,7 +22542,7 @@ async function upgradeCommand() {
|
|
|
22438
22542
|
execSync(upgradeCmd, {
|
|
22439
22543
|
stdio: ["pipe", "pipe", "pipe"]
|
|
22440
22544
|
});
|
|
22441
|
-
spinner.succeed(`Upgraded to ${
|
|
22545
|
+
spinner.succeed(`Upgraded to ${indigo9(`v${latestVersion}`)}`);
|
|
22442
22546
|
console.log();
|
|
22443
22547
|
console.log(source_default.dim(" Restart your terminal to use the new version"));
|
|
22444
22548
|
console.log();
|
|
@@ -22482,10 +22586,10 @@ function detectPackageManager() {
|
|
|
22482
22586
|
// src/commands/doctor.ts
|
|
22483
22587
|
import { existsSync as existsSync10 } from "fs";
|
|
22484
22588
|
import { execSync as execSync2 } from "child_process";
|
|
22485
|
-
var
|
|
22589
|
+
var indigo10 = source_default.hex("#6366f1");
|
|
22486
22590
|
async function doctorCommand() {
|
|
22487
22591
|
console.log();
|
|
22488
|
-
console.log(
|
|
22592
|
+
console.log(indigo10.bold("Skills Doctor"));
|
|
22489
22593
|
console.log(source_default.dim("Checking your environment..."));
|
|
22490
22594
|
console.log();
|
|
22491
22595
|
const results = [];
|
|
@@ -22589,7 +22693,7 @@ async function doctorCommand() {
|
|
|
22589
22693
|
console.log(source_default.yellow(` ${warnCount} warning(s)`));
|
|
22590
22694
|
}
|
|
22591
22695
|
if (okCount === results.length) {
|
|
22592
|
-
console.log(
|
|
22696
|
+
console.log(indigo10.bold(" All checks passed!"));
|
|
22593
22697
|
}
|
|
22594
22698
|
console.log();
|
|
22595
22699
|
if (!apiKey) {
|
|
@@ -22599,9 +22703,9 @@ async function doctorCommand() {
|
|
|
22599
22703
|
}
|
|
22600
22704
|
|
|
22601
22705
|
// src/index.ts
|
|
22602
|
-
var
|
|
22706
|
+
var indigo11 = source_default.hex("#6366f1");
|
|
22603
22707
|
var program2 = new Command;
|
|
22604
|
-
program2.name("skills").description("CLI for skills.md - AI Agent Skills Marketplace").version("0.1.
|
|
22708
|
+
program2.name("skills").description("CLI for skills.md - AI Agent Skills Marketplace").version("0.1.10");
|
|
22605
22709
|
program2.command("init").description("Initialize skills.md in current project").option("-f, --force", "Force re-initialization (removes existing .skills/)").action((options) => {
|
|
22606
22710
|
initCommand({ force: options.force });
|
|
22607
22711
|
});
|
|
@@ -22664,11 +22768,13 @@ program2.command("generate <mediaType> <prompt>").alias("gen").description("Gene
|
|
|
22664
22768
|
});
|
|
22665
22769
|
});
|
|
22666
22770
|
program2.command("jobs [jobId]").description("List generation jobs or view job details").action(jobsCommand);
|
|
22667
|
-
program2.command("history").description("View execution history").option("-s, --skill <name>", "Filter by skill name").option("-n, --limit <number>", "Limit number of entries", "20").option("-v, --verbose", "Show detailed output").action((options) => {
|
|
22771
|
+
program2.command("history").description("View execution history").option("-s, --skill <name>", "Filter by skill name").option("-n, --limit <number>", "Limit number of entries", "20").option("-v, --verbose", "Show detailed output").option("--status <status>", "Filter by status (completed, failed, pending)").option("-l, --local", "Show local history only (skip API)").action((options) => {
|
|
22668
22772
|
historyCommand({
|
|
22669
22773
|
skill: options.skill,
|
|
22670
22774
|
limit: parseInt(options.limit, 10),
|
|
22671
|
-
verbose: options.verbose
|
|
22775
|
+
verbose: options.verbose,
|
|
22776
|
+
status: options.status,
|
|
22777
|
+
local: options.local
|
|
22672
22778
|
});
|
|
22673
22779
|
});
|
|
22674
22780
|
program2.command("exports <skill>").description("View exported files for a skill").option("-t, --target <target>", "Target platform (claude, codex)").action((skill, options) => {
|
|
@@ -22695,7 +22801,7 @@ program2.command("update [skill]").description("Update installed skills to lates
|
|
|
22695
22801
|
program2.command("upgrade").description("Upgrade the Skills CLI to the latest version").action(upgradeCommand);
|
|
22696
22802
|
program2.command("doctor").description("Check your environment and diagnose issues").action(doctorCommand);
|
|
22697
22803
|
program2.addHelpText("after", `
|
|
22698
|
-
${
|
|
22804
|
+
${indigo11.bold("Examples:")}
|
|
22699
22805
|
${source_default.dim("# Initialize in current project")}
|
|
22700
22806
|
$ skills init
|
|
22701
22807
|
|
|
@@ -22723,6 +22829,8 @@ ${indigo10.bold("Examples:")}
|
|
|
22723
22829
|
${source_default.dim("# View execution history")}
|
|
22724
22830
|
$ skills history
|
|
22725
22831
|
$ skills history --skill image-generator
|
|
22832
|
+
$ skills history --status completed
|
|
22833
|
+
$ skills history --local
|
|
22726
22834
|
|
|
22727
22835
|
${source_default.dim("# View exports for a skill")}
|
|
22728
22836
|
$ skills exports image-generator
|
|
@@ -22748,7 +22856,7 @@ ${indigo10.bold("Examples:")}
|
|
|
22748
22856
|
${source_default.dim("# Check environment")}
|
|
22749
22857
|
$ skills doctor
|
|
22750
22858
|
|
|
22751
|
-
${
|
|
22752
|
-
${
|
|
22859
|
+
${indigo11.bold("Documentation:")}
|
|
22860
|
+
${indigo11("https://skills.md/docs")}
|
|
22753
22861
|
`);
|
|
22754
22862
|
program2.parse();
|