@clipkit/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 +201 -0
- package/README.md +182 -0
- package/dist/commands/docs.d.ts +3 -0
- package/dist/commands/docs.d.ts.map +1 -0
- package/dist/commands/docs.js +31 -0
- package/dist/commands/docs.js.map +1 -0
- package/dist/commands/explain.d.ts +3 -0
- package/dist/commands/explain.d.ts.map +1 -0
- package/dist/commands/explain.js +25 -0
- package/dist/commands/explain.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +176 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login.d.ts +3 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +88 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +26 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/new.d.ts +3 -0
- package/dist/commands/new.d.ts.map +1 -0
- package/dist/commands/new.js +77 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/commands/preview.d.ts +3 -0
- package/dist/commands/preview.d.ts.map +1 -0
- package/dist/commands/preview.js +69 -0
- package/dist/commands/preview.js.map +1 -0
- package/dist/commands/render.d.ts +3 -0
- package/dist/commands/render.d.ts.map +1 -0
- package/dist/commands/render.js +213 -0
- package/dist/commands/render.js.map +1 -0
- package/dist/commands/schema.d.ts +3 -0
- package/dist/commands/schema.d.ts.map +1 -0
- package/dist/commands/schema.js +20 -0
- package/dist/commands/schema.js.map +1 -0
- package/dist/commands/still.d.ts +3 -0
- package/dist/commands/still.d.ts.map +1 -0
- package/dist/commands/still.js +58 -0
- package/dist/commands/still.js.map +1 -0
- package/dist/commands/transcribe.d.ts +3 -0
- package/dist/commands/transcribe.d.ts.map +1 -0
- package/dist/commands/transcribe.js +52 -0
- package/dist/commands/transcribe.js.map +1 -0
- package/dist/commands/validate.d.ts +3 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +46 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +58 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/lint.d.ts +8 -0
- package/dist/lint.d.ts.map +1 -0
- package/dist/lint.js +75 -0
- package/dist/lint.js.map +1 -0
- package/dist/load-source.d.ts +5 -0
- package/dist/load-source.d.ts.map +1 -0
- package/dist/load-source.js +63 -0
- package/dist/load-source.js.map +1 -0
- package/dist/templates/agents-content.d.ts +3 -0
- package/dist/templates/agents-content.d.ts.map +1 -0
- package/dist/templates/agents-content.js +3282 -0
- package/dist/templates/agents-content.js.map +1 -0
- package/dist/util.d.ts +17 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +40 -0
- package/dist/util.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-content.js","sourceRoot":"","sources":["../../src/templates/agents-content.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,+DAA+D;AAE/D,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
1
|
+
/** Structural shape of a @clipkit/protocol validation error. */
|
|
2
|
+
export interface ValidationIssue {
|
|
3
|
+
path: ReadonlyArray<string | number>;
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
/** Print a validation failure to stderr in the standard CLI format. */
|
|
7
|
+
export declare function printValidationErrors(path: string, errors: ReadonlyArray<ValidationIssue>): void;
|
|
8
|
+
/**
|
|
9
|
+
* Open a URL in the user's default browser. Best-effort and non-blocking;
|
|
10
|
+
* never throws (a headless box just won't have a browser, and the caller has
|
|
11
|
+
* already printed the URL as a fallback).
|
|
12
|
+
*/
|
|
13
|
+
export declare function openUrl(url: string): void;
|
|
14
|
+
/** Human-readable byte size. */
|
|
15
|
+
export declare function fmtBytes(n: number): string;
|
|
16
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAIA,gEAAgE;AAChE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC,GACrC,IAAI,CAQN;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAWzC;AAED,gCAAgC;AAChC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAI1C;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C"}
|
package/dist/util.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Small shared helpers for the CLI commands.
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
|
+
/** Print a validation failure to stderr in the standard CLI format. */
|
|
4
|
+
export function printValidationErrors(path, errors) {
|
|
5
|
+
process.stderr.write(`✗ ${path} failed validation (${errors.length} error${errors.length === 1 ? '' : 's'}):\n`);
|
|
6
|
+
for (const err of errors) {
|
|
7
|
+
const at = err.path.length > 0 ? err.path.join('.') : '(root)';
|
|
8
|
+
process.stderr.write(` - ${at}: ${err.message}\n`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Open a URL in the user's default browser. Best-effort and non-blocking;
|
|
13
|
+
* never throws (a headless box just won't have a browser, and the caller has
|
|
14
|
+
* already printed the URL as a fallback).
|
|
15
|
+
*/
|
|
16
|
+
export function openUrl(url) {
|
|
17
|
+
const platform = process.platform;
|
|
18
|
+
const cmd = platform === 'darwin' ? 'open' : platform === 'win32' ? 'cmd' : 'xdg-open';
|
|
19
|
+
const args = platform === 'win32' ? ['/c', 'start', '', url] : [url];
|
|
20
|
+
try {
|
|
21
|
+
const child = spawn(cmd, args, { stdio: 'ignore', detached: true });
|
|
22
|
+
child.on('error', () => { });
|
|
23
|
+
child.unref();
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
/* no browser available */
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** Human-readable byte size. */
|
|
30
|
+
export function fmtBytes(n) {
|
|
31
|
+
if (n < 1024)
|
|
32
|
+
return `${n} B`;
|
|
33
|
+
if (n < 1024 * 1024)
|
|
34
|
+
return `${(n / 1024).toFixed(1)} KB`;
|
|
35
|
+
return `${(n / (1024 * 1024)).toFixed(1)} MB`;
|
|
36
|
+
}
|
|
37
|
+
export function sleep(ms) {
|
|
38
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=util.js.map
|
package/dist/util.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["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CAAC;QACpE,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC5B,KAAK,CAAC,KAAK,EAAE,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,0BAA0B;IAC5B,CAAC;AACH,CAAC;AAED,gCAAgC;AAChC,MAAM,UAAU,QAAQ,CAAC,CAAS;IAChC,IAAI,CAAC,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,IAAI,CAAC;IAC9B,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1D,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@clipkit/cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Clipkit CLI — init, new, validate, explain, preview, render, still, docs, schema, mcp, login. The local-first onboarding surface.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": { "type": "git", "url": "git+https://github.com/clipkit-video/clipkit.git", "directory": "packages/cli" },
|
|
7
|
+
"homepage": "https://clipkit.dev",
|
|
8
|
+
"bugs": "https://github.com/clipkit-video/clipkit/issues",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"bin": {
|
|
11
|
+
"clipkit": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"embed-agents": "node ./scripts/embed-agents.mjs",
|
|
22
|
+
"prebuild": "npm run embed-agents",
|
|
23
|
+
"predev": "npm run embed-agents",
|
|
24
|
+
"pretypecheck": "npm run embed-agents",
|
|
25
|
+
"build": "tsc",
|
|
26
|
+
"dev": "tsc --watch",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"clean": "rm -rf dist src/templates/agents-content.ts",
|
|
29
|
+
"start": "node ./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@clipkit/lint": "^1.0.0",
|
|
33
|
+
"@clipkit/mcp-server": "^1.0.0",
|
|
34
|
+
"@clipkit/patterns": "^1.0.0",
|
|
35
|
+
"@clipkit/protocol": "^1.0.0",
|
|
36
|
+
"@clipkit/speech-to-text": "^1.0.0",
|
|
37
|
+
"commander": "^12.1.0",
|
|
38
|
+
"jiti": "^2.4.2",
|
|
39
|
+
"zod-to-json-schema": "^3.24.1"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@clipkit/renderer": "^1.0.0",
|
|
43
|
+
"playwright": "^1.49.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependenciesMeta": {
|
|
46
|
+
"@clipkit/renderer": {
|
|
47
|
+
"optional": true
|
|
48
|
+
},
|
|
49
|
+
"playwright": {
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@clipkit/renderer": "^1.0.0",
|
|
55
|
+
"@types/node": "^22.0.0",
|
|
56
|
+
"typescript": "^5.7.3"
|
|
57
|
+
}
|
|
58
|
+
}
|