@dreamlogic-ai/cli 1.0.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.
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/dist/commands/catalog.d.ts +1 -0
- package/dist/commands/catalog.js +39 -0
- package/dist/commands/helpers.d.ts +2 -0
- package/dist/commands/helpers.js +15 -0
- package/dist/commands/install.d.ts +4 -0
- package/dist/commands/install.js +138 -0
- package/dist/commands/list.d.ts +1 -0
- package/dist/commands/list.js +31 -0
- package/dist/commands/login.d.ts +3 -0
- package/dist/commands/login.js +70 -0
- package/dist/commands/logout.d.ts +1 -0
- package/dist/commands/logout.js +19 -0
- package/dist/commands/rollback.d.ts +1 -0
- package/dist/commands/rollback.js +40 -0
- package/dist/commands/setup-mcp.d.ts +3 -0
- package/dist/commands/setup-mcp.js +204 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +69 -0
- package/dist/commands/update.d.ts +3 -0
- package/dist/commands/update.js +126 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +155 -0
- package/dist/lib/api-client.d.ts +25 -0
- package/dist/lib/api-client.js +132 -0
- package/dist/lib/config.d.ts +17 -0
- package/dist/lib/config.js +121 -0
- package/dist/lib/installer.d.ts +14 -0
- package/dist/lib/installer.js +283 -0
- package/dist/lib/ui.d.ts +39 -0
- package/dist/lib/ui.js +89 -0
- package/dist/types.d.ts +38 -0
- package/dist/types.js +7 -0
- package/package.json +49 -0
package/dist/lib/ui.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI helpers — branded output, spinners, prompts
|
|
3
|
+
*/
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import ora from "ora";
|
|
6
|
+
import { CLI_NAME, CLI_AUTHOR, CLI_VERSION } from "../types.js";
|
|
7
|
+
// Brand colors
|
|
8
|
+
const brand = chalk.hex("#7C3AED"); // Purple
|
|
9
|
+
const accent = chalk.hex("#06B6D4"); // Cyan
|
|
10
|
+
const success = chalk.green;
|
|
11
|
+
const warn = chalk.yellow;
|
|
12
|
+
const error = chalk.red;
|
|
13
|
+
const dim = chalk.dim;
|
|
14
|
+
export const ui = {
|
|
15
|
+
brand,
|
|
16
|
+
accent,
|
|
17
|
+
success,
|
|
18
|
+
warn,
|
|
19
|
+
error,
|
|
20
|
+
dim,
|
|
21
|
+
/** Print the welcome banner */
|
|
22
|
+
banner() {
|
|
23
|
+
console.log();
|
|
24
|
+
console.log(brand(" ╔══════════════════════════════════════════╗"));
|
|
25
|
+
console.log(brand(" ║") + " 🚀 " + chalk.bold.white(CLI_NAME) + " v" + CLI_VERSION + brand(" ║"));
|
|
26
|
+
console.log(brand(" ║") + " " + dim("AI Skill Manager for your team") + brand(" ║"));
|
|
27
|
+
console.log(brand(" ║") + " " + dim(CLI_AUTHOR) + brand(" ║"));
|
|
28
|
+
console.log(brand(" ╚══════════════════════════════════════════╝"));
|
|
29
|
+
console.log();
|
|
30
|
+
},
|
|
31
|
+
/** Print a section header */
|
|
32
|
+
header(text) {
|
|
33
|
+
console.log();
|
|
34
|
+
console.log(brand("━".repeat(50)));
|
|
35
|
+
console.log(brand(" " + text));
|
|
36
|
+
console.log(brand("━".repeat(50)));
|
|
37
|
+
},
|
|
38
|
+
/** Print success message */
|
|
39
|
+
ok(msg) {
|
|
40
|
+
console.log(success(" ✅ ") + msg);
|
|
41
|
+
},
|
|
42
|
+
/** Print warning */
|
|
43
|
+
warning(msg) {
|
|
44
|
+
console.log(warn(" ⚠️ ") + msg);
|
|
45
|
+
},
|
|
46
|
+
/** Print error */
|
|
47
|
+
err(msg) {
|
|
48
|
+
console.log(error(" ❌ ") + msg);
|
|
49
|
+
},
|
|
50
|
+
/** Print info line */
|
|
51
|
+
info(msg) {
|
|
52
|
+
console.log(accent(" ℹ ") + msg);
|
|
53
|
+
},
|
|
54
|
+
/** Indented line */
|
|
55
|
+
line(msg) {
|
|
56
|
+
console.log(" " + msg);
|
|
57
|
+
},
|
|
58
|
+
/** Create a spinner */
|
|
59
|
+
spinner(text) {
|
|
60
|
+
return ora({ text: " " + text, color: "cyan" });
|
|
61
|
+
},
|
|
62
|
+
/** Format file size */
|
|
63
|
+
fileSize(bytes) {
|
|
64
|
+
if (bytes < 1024)
|
|
65
|
+
return `${bytes} B`;
|
|
66
|
+
if (bytes < 1024 * 1024)
|
|
67
|
+
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
68
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
69
|
+
},
|
|
70
|
+
/** Format a skill for display */
|
|
71
|
+
skillLine(s) {
|
|
72
|
+
const ver = s.version ? dim(` (${s.version})`) : "";
|
|
73
|
+
const tag = s.tag ? ` ${s.tag}` : "";
|
|
74
|
+
return `${chalk.bold(s.name)}${ver} — ${dim(s.description)}${tag}`;
|
|
75
|
+
},
|
|
76
|
+
/** Print a key-value table */
|
|
77
|
+
table(rows) {
|
|
78
|
+
const maxKey = Math.max(...rows.map(([k]) => k.length));
|
|
79
|
+
for (const [k, v] of rows) {
|
|
80
|
+
console.log(` ${accent(k.padEnd(maxKey))} ${v}`);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
/** Goodbye message */
|
|
84
|
+
goodbye() {
|
|
85
|
+
console.log();
|
|
86
|
+
console.log(dim(" Powered by ") + brand("Dreamlogic-ai") + dim(" · github.com/dreamlogic-ai"));
|
|
87
|
+
console.log();
|
|
88
|
+
},
|
|
89
|
+
};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Shared type definitions for Dreamlogic CLI */
|
|
2
|
+
export interface SkillInfo {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
status: "active" | "deprecated" | "hidden";
|
|
7
|
+
default?: boolean;
|
|
8
|
+
latest_version?: string;
|
|
9
|
+
package_file?: string;
|
|
10
|
+
package_sha256?: string;
|
|
11
|
+
package_size?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface UserInfo {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
role: "admin" | "user";
|
|
17
|
+
}
|
|
18
|
+
export interface CliConfig {
|
|
19
|
+
api_key: string;
|
|
20
|
+
server: string;
|
|
21
|
+
install_dir: string;
|
|
22
|
+
}
|
|
23
|
+
export interface InstalledSkill {
|
|
24
|
+
version: string;
|
|
25
|
+
installed_at: string;
|
|
26
|
+
path: string;
|
|
27
|
+
sha256: string;
|
|
28
|
+
previous_version?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface InstalledRegistry {
|
|
31
|
+
[skillId: string]: InstalledSkill;
|
|
32
|
+
}
|
|
33
|
+
export declare const DEFAULT_SERVER = "https://skill.dreamlogic-claw.com";
|
|
34
|
+
export declare const DEFAULT_INSTALL_DIR_NAME = "dreamlogic-skills";
|
|
35
|
+
export declare const CONFIG_DIR_NAME = ".dreamlogic";
|
|
36
|
+
export declare const CLI_VERSION = "1.0.0";
|
|
37
|
+
export declare const CLI_NAME = "Dreamlogic CLI";
|
|
38
|
+
export declare const CLI_AUTHOR = "Dreamlogic-ai by MAJORNINE";
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Shared type definitions for Dreamlogic CLI */
|
|
2
|
+
export const DEFAULT_SERVER = "https://skill.dreamlogic-claw.com";
|
|
3
|
+
export const DEFAULT_INSTALL_DIR_NAME = "dreamlogic-skills";
|
|
4
|
+
export const CONFIG_DIR_NAME = ".dreamlogic";
|
|
5
|
+
export const CLI_VERSION = "1.0.0";
|
|
6
|
+
export const CLI_NAME = "Dreamlogic CLI";
|
|
7
|
+
export const CLI_AUTHOR = "Dreamlogic-ai by MAJORNINE";
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dreamlogic-ai/cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Dreamlogic AI Skill Manager — Install, update and manage AI agent skills",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"dreamlogic": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"dev": "tsx src/index.ts",
|
|
12
|
+
"prepublishOnly": "npm run build"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"dreamlogic",
|
|
24
|
+
"ai",
|
|
25
|
+
"skills",
|
|
26
|
+
"mcp",
|
|
27
|
+
"agent",
|
|
28
|
+
"cli",
|
|
29
|
+
"suno"
|
|
30
|
+
],
|
|
31
|
+
"author": "Dreamlogic-ai by MAJORNINE",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@inquirer/prompts": "^7.10.1",
|
|
38
|
+
"chalk": "^5.6.2",
|
|
39
|
+
"commander": "^12.1.0",
|
|
40
|
+
"ora": "^8.2.0",
|
|
41
|
+
"yauzl": "^3.3.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^22.19.17",
|
|
45
|
+
"@types/yauzl": "^2.10.3",
|
|
46
|
+
"tsx": "^4.21.0",
|
|
47
|
+
"typescript": "^5.9.3"
|
|
48
|
+
}
|
|
49
|
+
}
|