@dealdeploy/skl 0.1.2 → 0.1.3
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/index.ts +12 -0
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
+
|
|
3
|
+
process.on("uncaughtException", (err) => {
|
|
4
|
+
console.error(`skl: ${err.message}`);
|
|
5
|
+
process.exit(1);
|
|
6
|
+
});
|
|
7
|
+
|
|
2
8
|
// ── Subcommand routing ───────────────────────────────────────────────
|
|
3
9
|
const [subcommand] = process.argv.slice(2);
|
|
4
10
|
if (subcommand === "add") {
|
|
@@ -32,6 +38,12 @@ import { homedir } from "os";
|
|
|
32
38
|
const LIBRARY = join(homedir(), "dotfiles/skills");
|
|
33
39
|
const GLOBAL_DIR = join(homedir(), ".agents/skills");
|
|
34
40
|
|
|
41
|
+
if (!existsSync(LIBRARY)) {
|
|
42
|
+
console.error(`skl: library not found at ${LIBRARY}`);
|
|
43
|
+
console.error("Create it with: mkdir -p ~/dotfiles/skills");
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
35
47
|
function ellipsize(text: string, max: number): string {
|
|
36
48
|
if (max <= 0) return "";
|
|
37
49
|
if (text.length <= max) return text;
|