skillett 0.1.9 → 0.2.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.
- package/dist/commands/feedback.d.ts +5 -0
- package/dist/commands/feedback.js +61 -0
- package/dist/commands/status.js +1 -1
- package/dist/index.js +57 -48
- package/dist/lib/api.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import ora from "ora";
|
|
2
|
+
import { loadApiKey } from "../lib/config.js";
|
|
3
|
+
import { skillettFetch } from "../lib/api.js";
|
|
4
|
+
const VALID_CATEGORIES = ["bug_report", "integration_request", "feature_request", "improvement", "other"];
|
|
5
|
+
export async function feedback(options) {
|
|
6
|
+
const apiKey = loadApiKey();
|
|
7
|
+
if (!apiKey) {
|
|
8
|
+
console.error(JSON.stringify({
|
|
9
|
+
error: "not_authenticated",
|
|
10
|
+
message: "Run `skillett login` first.",
|
|
11
|
+
}));
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
if (!options.title) {
|
|
15
|
+
console.error(JSON.stringify({
|
|
16
|
+
error: "missing_field",
|
|
17
|
+
message: "Title is required. Use --title \"Your feedback title\"",
|
|
18
|
+
}));
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
if (!options.body) {
|
|
22
|
+
console.error(JSON.stringify({
|
|
23
|
+
error: "missing_field",
|
|
24
|
+
message: "Body is required. Use --body \"Describe your feedback\"",
|
|
25
|
+
}));
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
const category = options.category && VALID_CATEGORIES.includes(options.category)
|
|
29
|
+
? options.category
|
|
30
|
+
: "other";
|
|
31
|
+
const isTTY = process.stdout.isTTY;
|
|
32
|
+
const spinner = isTTY ? ora({ text: " Submitting feedback…" }).start() : null;
|
|
33
|
+
try {
|
|
34
|
+
const res = await skillettFetch("/v1/feedback", apiKey, {
|
|
35
|
+
method: "POST",
|
|
36
|
+
body: JSON.stringify({
|
|
37
|
+
title: options.title,
|
|
38
|
+
body: options.body,
|
|
39
|
+
category,
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
42
|
+
spinner?.stop();
|
|
43
|
+
const data = await res.json();
|
|
44
|
+
if (res.ok) {
|
|
45
|
+
console.log(JSON.stringify({ status: 201, data }, null, 2));
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
console.error(JSON.stringify({ status: res.status, ...data }, null, 2));
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
spinner?.stop();
|
|
54
|
+
console.error(JSON.stringify({
|
|
55
|
+
error: "network_error",
|
|
56
|
+
message: err.message,
|
|
57
|
+
status: 0,
|
|
58
|
+
}));
|
|
59
|
+
process.exit(2);
|
|
60
|
+
}
|
|
61
|
+
}
|
package/dist/commands/status.js
CHANGED
|
@@ -32,7 +32,7 @@ export async function status() {
|
|
|
32
32
|
const spinner = isTTY ? ora(" Checking status…").start() : null;
|
|
33
33
|
// Fetch user info and skills in parallel
|
|
34
34
|
const [userRes, skillsRes] = await Promise.all([
|
|
35
|
-
skillettFetch("/
|
|
35
|
+
skillettFetch("/v1/me", apiKey).catch(() => null),
|
|
36
36
|
skillettFetch("/v1/skills", apiKey).catch(() => null),
|
|
37
37
|
]);
|
|
38
38
|
spinner?.stop();
|
package/dist/index.js
CHANGED
|
@@ -10,54 +10,56 @@ import { connect } from "./commands/connect.js";
|
|
|
10
10
|
import { disconnect } from "./commands/disconnect.js";
|
|
11
11
|
import { pull } from "./commands/pull.js";
|
|
12
12
|
import { seed } from "./commands/seed.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
skillett login
|
|
22
|
-
skillett
|
|
23
|
-
skillett
|
|
24
|
-
skillett skills
|
|
25
|
-
skillett skills <
|
|
26
|
-
skillett
|
|
27
|
-
skillett
|
|
28
|
-
skillett
|
|
29
|
-
skillett
|
|
30
|
-
skillett
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
skillett
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
13
|
+
import { feedback } from "./commands/feedback.js";
|
|
14
|
+
const HELP_TEXT = `
|
|
15
|
+
Skillett — Agent Skills Platform
|
|
16
|
+
|
|
17
|
+
Connect and use external services (GitHub, Slack, Gmail, etc.) through CLI commands.
|
|
18
|
+
|
|
19
|
+
COMMANDS
|
|
20
|
+
|
|
21
|
+
skillett login Authenticate with Skillett (opens browser)
|
|
22
|
+
skillett login --key <key> Authenticate with an API key directly
|
|
23
|
+
skillett status Show current user, connections, and API key info
|
|
24
|
+
skillett skills List available integrations and connection status
|
|
25
|
+
skillett skills <integration> List all endpoints for an integration
|
|
26
|
+
skillett skills <integ> <name> Show full docs for a specific endpoint
|
|
27
|
+
skillett run <integ> <name> Execute an endpoint
|
|
28
|
+
skillett connect <integration> Connect an integration (opens browser for OAuth)
|
|
29
|
+
skillett disconnect <integ> Disconnect an integration
|
|
30
|
+
skillett pull <integration> Download skill docs locally for faster agent context
|
|
31
|
+
skillett feedback Submit feedback (bug report, feature request, etc.)
|
|
32
|
+
skillett help Show this help message
|
|
33
|
+
|
|
34
|
+
QUICK START
|
|
35
|
+
|
|
36
|
+
skillett login # authenticate
|
|
37
|
+
skillett skills # see what's available
|
|
38
|
+
skillett run github create_issue \\
|
|
39
|
+
--repo acme/webapp --title "Fix login bug" # execute
|
|
40
|
+
|
|
41
|
+
PASSING PARAMETERS
|
|
42
|
+
|
|
43
|
+
As flags: skillett run github create_issue --repo acme/webapp --title "Bug"
|
|
44
|
+
As JSON: skillett run github create_issue '{"repo":"acme/webapp","title":"Bug"}'
|
|
45
|
+
|
|
46
|
+
CONFIGURATION
|
|
47
|
+
|
|
48
|
+
Skillett stores config in a .env file in the current working directory.
|
|
49
|
+
All commands must be run from the same directory where you ran \`skillett login\`.
|
|
50
|
+
|
|
51
|
+
Stored variables:
|
|
52
|
+
SKILLETT_API_KEY Your API key (starts with sk_)
|
|
53
|
+
SKILLETT_PLATFORM Detected platform (claude, cursor, windsurf, generic)
|
|
54
|
+
SKILLETT_API_URL API base URL (default: https://api.skillett.dev)
|
|
55
|
+
|
|
56
|
+
You can also set SKILLETT_API_KEY as an environment variable instead of
|
|
57
|
+
using the .env file: SKILLETT_API_KEY=sk_... skillett status
|
|
58
|
+
|
|
59
|
+
OUTPUT
|
|
60
|
+
|
|
61
|
+
All commands output JSON to stdout. Errors include an "error" field.
|
|
62
|
+
Exit code 0 = success, non-zero = failure.
|
|
61
63
|
`;
|
|
62
64
|
const program = new Command();
|
|
63
65
|
program
|
|
@@ -118,6 +120,13 @@ program
|
|
|
118
120
|
.argument("<integration>", "Integration slug (e.g. github)")
|
|
119
121
|
.option("--path <dir>", "Custom output directory")
|
|
120
122
|
.action(pull);
|
|
123
|
+
program
|
|
124
|
+
.command("feedback")
|
|
125
|
+
.description("Submit feedback (bug report, feature request, etc.)")
|
|
126
|
+
.option("--title <title>", "Feedback title")
|
|
127
|
+
.option("--body <body>", "Feedback description")
|
|
128
|
+
.option("--category <category>", "Category: bug_report, integration_request, feature_request, improvement, other")
|
|
129
|
+
.action(feedback);
|
|
121
130
|
program
|
|
122
131
|
.command("seed", { hidden: true })
|
|
123
132
|
.argument("<skill-folder>", "Path to skill folder")
|
package/dist/lib/api.js
CHANGED
|
@@ -43,7 +43,7 @@ export async function downloadSkill(apiKey, name) {
|
|
|
43
43
|
return res.json();
|
|
44
44
|
}
|
|
45
45
|
export async function whoami(apiKey) {
|
|
46
|
-
const res = await skillettFetch("/
|
|
46
|
+
const res = await skillettFetch("/v1/me", apiKey);
|
|
47
47
|
if (!res.ok)
|
|
48
48
|
throw new Error(`Failed to get user info: ${res.status}`);
|
|
49
49
|
return res.json();
|