blitzreels 0.1.3 → 0.1.4
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/README.md +61 -0
- package/dist/cli-runtime.d.ts +25 -0
- package/dist/cli-runtime.d.ts.map +1 -0
- package/dist/cli-runtime.js +125 -0
- package/dist/cli-runtime.js.map +1 -0
- package/dist/cli-types.d.ts +20 -0
- package/dist/cli-types.d.ts.map +1 -0
- package/dist/cli-types.js +2 -0
- package/dist/cli-types.js.map +1 -0
- package/dist/command-metadata.d.ts +54 -0
- package/dist/command-metadata.d.ts.map +1 -0
- package/dist/command-metadata.js +457 -0
- package/dist/command-metadata.js.map +1 -0
- package/dist/command-registry.d.ts +3 -0
- package/dist/command-registry.d.ts.map +1 -0
- package/dist/command-registry.js +856 -0
- package/dist/command-registry.js.map +1 -0
- package/dist/commands/exports.d.ts +33 -0
- package/dist/commands/exports.d.ts.map +1 -0
- package/dist/commands/exports.js +71 -0
- package/dist/commands/exports.js.map +1 -0
- package/dist/commands/projects.d.ts +52 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +157 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/index.js +3280 -1116
- package/dist/index.js.map +1 -1
- package/dist/preview-first-edit.d.ts +37 -0
- package/dist/preview-first-edit.d.ts.map +1 -0
- package/dist/preview-first-edit.js +25 -0
- package/dist/preview-first-edit.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,6 +14,10 @@ package for users who prefer scoped installs.
|
|
|
14
14
|
After the first real publish:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
+
npx blitzreels version
|
|
18
|
+
npx blitzreels doctor
|
|
19
|
+
npx blitzreels prime
|
|
20
|
+
npx blitzreels agent-context --json
|
|
17
21
|
npx blitzreels auth login
|
|
18
22
|
```
|
|
19
23
|
|
|
@@ -70,6 +74,14 @@ blitzreels media folders rename --folder-id FOLDER_ID --name "New folder name"
|
|
|
70
74
|
blitzreels media folders update --folder-id FOLDER_ID --parent-folder-id root
|
|
71
75
|
blitzreels media folders delete --folder-id FOLDER_ID --confirm-delete
|
|
72
76
|
|
|
77
|
+
blitzreels clips create --source-type youtube --youtube-url "https://www.youtube.com/watch?v=..." --name "MKBHD hero loop" --min-duration 8 --max-duration 12 --qa-mode permissive
|
|
78
|
+
blitzreels clips create --source-type asset --asset-id ASSET_ID --selection-mode time_range --start-seconds 52 --end-seconds 64 --max-duration 12
|
|
79
|
+
blitzreels clips get --clip-id CLIP_ID --json
|
|
80
|
+
blitzreels clips wait --clip-id CLIP_ID --json
|
|
81
|
+
blitzreels clips reselect --clip-id CLIP_ID --selection-mode time_range --start-seconds 52 --end-seconds 64 --min-duration 8 --max-duration 12
|
|
82
|
+
blitzreels clips repair --clip-id CLIP_ID --repair-mode auto
|
|
83
|
+
blitzreels clips export --clip-id CLIP_ID --resolution 1080p --format mp4 --allow-blocking-qa-bypass false
|
|
84
|
+
|
|
73
85
|
blitzreels project inspect --project-id PROJECT_ID --json
|
|
74
86
|
blitzreels project timeline --project-id PROJECT_ID --json
|
|
75
87
|
blitzreels project snapshot --project-id PROJECT_ID --at 00:03
|
|
@@ -79,12 +91,19 @@ blitzreels timeline transform --project-id PROJECT_ID --timeline-item-id TIMELIN
|
|
|
79
91
|
blitzreels timeline move --project-id PROJECT_ID --timeline-item-id TIMELINE_ITEM_ID --at 00:06 --layer-index 2
|
|
80
92
|
blitzreels timeline delete --project-id PROJECT_ID --timeline-item-id TIMELINE_ITEM_ID --auto-pack false
|
|
81
93
|
|
|
94
|
+
blitzreels effects zoom add --project-id PROJECT_ID --at 9.8 --duration 1.8 --scale-start 1 --scale-end 1.1 --easing easeInOut
|
|
95
|
+
blitzreels effects zoom update --project-id PROJECT_ID --timeline-item-id EFFECT_TIMELINE_ITEM_ID --scale-end 1.1 --easing easeInOut --duration 1.8
|
|
96
|
+
blitzreels effects mask add --project-id PROJECT_ID --settings-json '{"shape":"rounded","size":{"width":0.8,"height":0.8}}'
|
|
97
|
+
blitzreels effects colorgrade update --project-id PROJECT_ID --timeline-item-id EFFECT_TIMELINE_ITEM_ID --settings-json '{"brightness":1.1,"vignetteEnabled":true}'
|
|
98
|
+
|
|
82
99
|
blitzreels text add --project-id PROJECT_ID --text "Hook" --at 0 --duration 4
|
|
83
100
|
blitzreels text add --project-id PROJECT_ID --text "SERVEURS MCP" --at 24.33 --duration 2.8 --font-family Pacifico --font-size 82 --color "#17FFA6" --background-color "rgba(3,7,18,0.82)" --top "24%"
|
|
84
101
|
blitzreels text list --project-id PROJECT_ID --json
|
|
85
102
|
blitzreels text update --project-id PROJECT_ID --content-item-id CONTENT_ITEM_ID --text "New hook" --font-family Inter --font-size 64 --color "#FFFFFF"
|
|
86
103
|
blitzreels text remove --project-id PROJECT_ID --content-item-id CONTENT_ITEM_ID
|
|
87
104
|
|
|
105
|
+
blitzreels audio search --query "ambient riser" --license cc0 --json
|
|
106
|
+
blitzreels audio import --provider openverse --external-id AUDIO_ID --project-id PROJECT_ID --at 0 --duration 12 --volume 0.5
|
|
88
107
|
blitzreels audio add --project-id PROJECT_ID --asset-id ASSET_ID --at 0 --volume 0.6
|
|
89
108
|
|
|
90
109
|
blitzreels captions words list --project-id PROJECT_ID --match-text "Supabase" --json
|
|
@@ -115,6 +134,48 @@ blitzreels api spec
|
|
|
115
134
|
```
|
|
116
135
|
|
|
117
136
|
Use `--json` for script and AI-agent workflows.
|
|
137
|
+
Use `--fields id,name` with `--json` to trim large responses.
|
|
138
|
+
|
|
139
|
+
## Agent Workflows
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
blitzreels prime
|
|
143
|
+
blitzreels prime --command "media attach"
|
|
144
|
+
blitzreels agent-context --json
|
|
145
|
+
blitzreels agent-context --command "media attach" --json
|
|
146
|
+
blitzreels schema --command "captions words style" --json
|
|
147
|
+
blitzreels media attach --project-id PROJECT_ID --asset-id ASSET_ID --at 6 --dry-run
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`prime` prints plain-language instructions that coding agents should read before
|
|
151
|
+
editing BlitzReels projects. It is inspired by agent-first CLIs like Beans'
|
|
152
|
+
`prime` command. `llms` is an alias.
|
|
153
|
+
|
|
154
|
+
`agent-context` is the machine-readable command contract for agents. It includes
|
|
155
|
+
command metadata, typed flags, examples, read/write markers, destructive markers,
|
|
156
|
+
and known error categories.
|
|
157
|
+
|
|
158
|
+
When the CLI detects an agent environment, command help also points agents to
|
|
159
|
+
`prime` and `agent-context` for the focused command.
|
|
160
|
+
|
|
161
|
+
`--dry-run` is available on mutating commands and prints the API request that
|
|
162
|
+
would be made without making the write request. Destructive dry-runs still require
|
|
163
|
+
the same explicit confirmation flags as real destructive commands.
|
|
164
|
+
|
|
165
|
+
## Updates
|
|
166
|
+
|
|
167
|
+
The CLI checks `https://www.blitzreels.com/api/cli/releases` at most once per
|
|
168
|
+
day and prints a short update notice to stderr when a newer version is
|
|
169
|
+
available. The notice is skipped for `--json`, CI, non-interactive shells, and
|
|
170
|
+
commands where it would be noisy.
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
blitzreels version
|
|
174
|
+
blitzreels doctor
|
|
175
|
+
npm i -g blitzreels@latest
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Set `BLITZREELS_NO_UPDATE_NOTIFIER=1` to disable passive update notices.
|
|
118
179
|
|
|
119
180
|
## Faulty Commands
|
|
120
181
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BlitzReelsClient } from "@blitzreels/sdk";
|
|
2
|
+
import type { Flags, StoredConfig } from "./cli-types.js";
|
|
3
|
+
export declare const CLI_VERSION = "0.1.4";
|
|
4
|
+
export declare const DEFAULT_BASE_URL = "https://www.blitzreels.com/api/v1";
|
|
5
|
+
export declare const CONFIG_PATH: string;
|
|
6
|
+
export declare function loadConfig(): Promise<StoredConfig>;
|
|
7
|
+
export declare function resolveRuntimeConfig({ flags, storedConfig, }: {
|
|
8
|
+
flags: Flags;
|
|
9
|
+
storedConfig: StoredConfig;
|
|
10
|
+
}): StoredConfig;
|
|
11
|
+
export declare function createCliClient({ config, }: {
|
|
12
|
+
config: StoredConfig;
|
|
13
|
+
}): BlitzReelsClient;
|
|
14
|
+
export declare function storeApiKey({ apiKey, baseUrl, }: {
|
|
15
|
+
apiKey: string;
|
|
16
|
+
baseUrl: string | undefined;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
configPath: string;
|
|
19
|
+
keyStorage: StoredConfig["keyStorage"];
|
|
20
|
+
}>;
|
|
21
|
+
export declare function persistLoggedInApiKey({ apiKey, baseUrl, }: {
|
|
22
|
+
apiKey: string;
|
|
23
|
+
baseUrl: string | undefined;
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=cli-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-runtime.d.ts","sourceRoot":"","sources":["../src/cli-runtime.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAA+B,MAAM,iBAAiB,CAAC;AAChF,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE1D,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,gBAAgB,sCAAsC,CAAC;AACpE,eAAO,MAAM,WAAW,QAAgD,CAAC;AAKzE,wBAAsB,UAAU,IAAI,OAAO,CAAC,YAAY,CAAC,CAiBxD;AAED,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,YAAY,GACb,EAAE;IACD,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,YAAY,CAAC;CAC5B,GAAG,YAAY,CAYf;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,GACP,EAAE;IACD,MAAM,EAAE,YAAY,CAAC;CACtB,GAAG,gBAAgB,CAQnB;AAED,wBAAsB,WAAW,CAAC,EAChC,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GAAG,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;CAAE,CAAC,CAW1E;AAED,wBAAsB,qBAAqB,CAAC,EAC1C,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhB"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { BlitzReelsClient } from "@blitzreels/sdk";
|
|
6
|
+
export const CLI_VERSION = "0.1.4";
|
|
7
|
+
export const DEFAULT_BASE_URL = "https://www.blitzreels.com/api/v1";
|
|
8
|
+
export const CONFIG_PATH = join(homedir(), ".blitzreels", "config.json");
|
|
9
|
+
const KEYCHAIN_SERVICE = "BlitzReels CLI";
|
|
10
|
+
const KEYCHAIN_ACCOUNT = "api-key";
|
|
11
|
+
export async function loadConfig() {
|
|
12
|
+
try {
|
|
13
|
+
const raw = await readFile(CONFIG_PATH, "utf8");
|
|
14
|
+
const value = JSON.parse(raw);
|
|
15
|
+
const keyStorage = value.keyStorage === "keychain" ? "keychain" : "config";
|
|
16
|
+
const keychainApiKey = keyStorage === "keychain" ? await readKeychainApiKey() : "";
|
|
17
|
+
return {
|
|
18
|
+
apiKey: keychainApiKey ||
|
|
19
|
+
(typeof value.apiKey === "string" ? value.apiKey : ""),
|
|
20
|
+
baseUrl: typeof value.baseUrl === "string" ? value.baseUrl : undefined,
|
|
21
|
+
keyStorage,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return { apiKey: "", baseUrl: undefined, keyStorage: undefined };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function resolveRuntimeConfig({ flags, storedConfig, }) {
|
|
29
|
+
return {
|
|
30
|
+
apiKey: getStringFlag({ flags, name: "api-key" }) ??
|
|
31
|
+
process.env.BLITZREELS_API_KEY ??
|
|
32
|
+
storedConfig.apiKey,
|
|
33
|
+
baseUrl: getStringFlag({ flags, name: "base-url" }) ??
|
|
34
|
+
process.env.BLITZREELS_BASE_URL ??
|
|
35
|
+
storedConfig.baseUrl,
|
|
36
|
+
keyStorage: storedConfig.keyStorage,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function createCliClient({ config, }) {
|
|
40
|
+
const clientConfig = {
|
|
41
|
+
apiKey: config.apiKey,
|
|
42
|
+
baseUrl: config.baseUrl,
|
|
43
|
+
fetchFn: undefined,
|
|
44
|
+
userAgent: `blitzreels-cli/${CLI_VERSION}`,
|
|
45
|
+
};
|
|
46
|
+
return new BlitzReelsClient(clientConfig);
|
|
47
|
+
}
|
|
48
|
+
export async function storeApiKey({ apiKey, baseUrl, }) {
|
|
49
|
+
const savedToKeychain = await saveApiKey({ apiKey });
|
|
50
|
+
const keyStorage = savedToKeychain ? "keychain" : "config";
|
|
51
|
+
await writeConfig({
|
|
52
|
+
config: {
|
|
53
|
+
apiKey: savedToKeychain ? "" : apiKey,
|
|
54
|
+
baseUrl,
|
|
55
|
+
keyStorage,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
return { configPath: CONFIG_PATH, keyStorage };
|
|
59
|
+
}
|
|
60
|
+
export async function persistLoggedInApiKey({ apiKey, baseUrl, }) {
|
|
61
|
+
await storeApiKey({ apiKey, baseUrl });
|
|
62
|
+
}
|
|
63
|
+
function getStringFlag({ flags, name, }) {
|
|
64
|
+
const value = flags[name];
|
|
65
|
+
return typeof value === "string" ? value : undefined;
|
|
66
|
+
}
|
|
67
|
+
async function writeConfig({ config, }) {
|
|
68
|
+
await mkdir(dirname(CONFIG_PATH), { recursive: true });
|
|
69
|
+
await writeFile(CONFIG_PATH, JSON.stringify(config, null, 2), {
|
|
70
|
+
mode: 0o600,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function canUseKeychain() {
|
|
74
|
+
return (process.platform === "darwin" &&
|
|
75
|
+
process.env.BLITZREELS_DISABLE_KEYCHAIN !== "1");
|
|
76
|
+
}
|
|
77
|
+
function runSecurity({ args, }) {
|
|
78
|
+
return new Promise((resolveCommand) => {
|
|
79
|
+
const child = spawn("security", args, {
|
|
80
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
81
|
+
});
|
|
82
|
+
const chunks = [];
|
|
83
|
+
child.stdout.on("data", (chunk) => chunks.push(Buffer.from(chunk)));
|
|
84
|
+
child.on("error", () => resolveCommand({ stdout: "", ok: false }));
|
|
85
|
+
child.on("close", (code) => resolveCommand({
|
|
86
|
+
stdout: Buffer.concat(chunks).toString("utf8").trim(),
|
|
87
|
+
ok: code === 0,
|
|
88
|
+
}));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
async function saveApiKey({ apiKey }) {
|
|
92
|
+
if (!canUseKeychain()) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
const result = await runSecurity({
|
|
96
|
+
args: [
|
|
97
|
+
"add-generic-password",
|
|
98
|
+
"-a",
|
|
99
|
+
KEYCHAIN_ACCOUNT,
|
|
100
|
+
"-s",
|
|
101
|
+
KEYCHAIN_SERVICE,
|
|
102
|
+
"-w",
|
|
103
|
+
apiKey,
|
|
104
|
+
"-U",
|
|
105
|
+
],
|
|
106
|
+
});
|
|
107
|
+
return result.ok;
|
|
108
|
+
}
|
|
109
|
+
async function readKeychainApiKey() {
|
|
110
|
+
if (!canUseKeychain()) {
|
|
111
|
+
return "";
|
|
112
|
+
}
|
|
113
|
+
const result = await runSecurity({
|
|
114
|
+
args: [
|
|
115
|
+
"find-generic-password",
|
|
116
|
+
"-a",
|
|
117
|
+
KEYCHAIN_ACCOUNT,
|
|
118
|
+
"-s",
|
|
119
|
+
KEYCHAIN_SERVICE,
|
|
120
|
+
"-w",
|
|
121
|
+
],
|
|
122
|
+
});
|
|
123
|
+
return result.ok ? result.stdout : "";
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=cli-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-runtime.js","sourceRoot":"","sources":["../src/cli-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAA+B,MAAM,iBAAiB,CAAC;AAGhF,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,mCAAmC,CAAC;AACpE,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;AAEzE,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAC1C,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEnC,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA0B,CAAC;QACvD,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC3E,MAAM,cAAc,GAClB,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,MA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,cAAc,EAAE,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC;QAC/B,IAAI,EAAE;YACJ,uBAAuB;YACvB,IAAI;YACJ,gBAAgB;YAChB,IAAI;YACJ,gBAAgB;YAChB,IAAI;SACL;KACF,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BlitzReelsClient } from "@blitzreels/sdk";
|
|
2
|
+
export type Flags = Record<string, string | boolean>;
|
|
3
|
+
export type ParsedArgs = {
|
|
4
|
+
command: string[];
|
|
5
|
+
flags: Flags;
|
|
6
|
+
};
|
|
7
|
+
export type StoredConfig = {
|
|
8
|
+
apiKey: string;
|
|
9
|
+
baseUrl: string | undefined;
|
|
10
|
+
keyStorage: "config" | "keychain" | undefined;
|
|
11
|
+
};
|
|
12
|
+
export type CliContext = {
|
|
13
|
+
args: ParsedArgs;
|
|
14
|
+
json: boolean;
|
|
15
|
+
dryRun: boolean;
|
|
16
|
+
fields: string[] | undefined;
|
|
17
|
+
client: BlitzReelsClient;
|
|
18
|
+
config: StoredConfig;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=cli-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-types.d.ts","sourceRoot":"","sources":["../src/cli-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;AAErD,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-types.js","sourceRoot":"","sources":["../src/cli-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type CommandSpec = {
|
|
2
|
+
command: string[];
|
|
3
|
+
usage: string;
|
|
4
|
+
description: string;
|
|
5
|
+
flags: readonly FlagSpec[];
|
|
6
|
+
examples: readonly string[];
|
|
7
|
+
mutates: boolean;
|
|
8
|
+
destructive: boolean;
|
|
9
|
+
requiresAuth: boolean;
|
|
10
|
+
dryRunSupported: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type FlagType = "string" | "number" | "boolean" | "json" | "csv" | "time";
|
|
13
|
+
export type FlagSpec = {
|
|
14
|
+
name: string;
|
|
15
|
+
type: FlagType;
|
|
16
|
+
required: boolean;
|
|
17
|
+
default: string | number | boolean | null | undefined;
|
|
18
|
+
enum: readonly string[] | undefined;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
export type FlagInput = string | (Partial<FlagSpec> & {
|
|
22
|
+
name: string;
|
|
23
|
+
});
|
|
24
|
+
export declare const GLOBAL_FLAGS: readonly ["api-key", "base-url", "json", "help", "dry-run", "fields"];
|
|
25
|
+
export declare const TEXT_STYLE_FLAGS: readonly ["spec-json", "font-family", "font-size", "font-weight", "color", "background-color", "padding-x", "padding-y", "border-radius", "top", "left", "text-align", "text-shadow", "no-background"];
|
|
26
|
+
export declare const CAPTION_WORD_SELECTOR_FLAGS: readonly ["word-id", "word-ids", "timeline-item-id", "match-text", "match-pattern", "all", "from", "to"];
|
|
27
|
+
export declare const CAPTION_WORD_STYLE_FLAGS: readonly ["style-json", "font-family", "font-weight", "font-style", "color", "active-color", "background-color", "active-animation", "text-transform", "text-shadow", "glow-color", "glow-blur-px", "scale", "offset-x", "offset-y", "rotation-deg", "letter-spacing", "opacity", "clear-existing"];
|
|
28
|
+
export declare function commandSpec({ command, usage, flags, description, examples, mutates, destructive, requiresAuth, dryRunSupported, }: {
|
|
29
|
+
command: string[];
|
|
30
|
+
usage: string;
|
|
31
|
+
flags?: readonly FlagInput[];
|
|
32
|
+
description?: string;
|
|
33
|
+
examples?: readonly string[];
|
|
34
|
+
mutates?: boolean;
|
|
35
|
+
destructive?: boolean;
|
|
36
|
+
requiresAuth?: boolean;
|
|
37
|
+
dryRunSupported?: boolean;
|
|
38
|
+
}): CommandSpec;
|
|
39
|
+
export declare function commandLabel({ command }: {
|
|
40
|
+
command: string[];
|
|
41
|
+
}): string;
|
|
42
|
+
export declare function commandsEqual(left: string[], right: string[]): boolean;
|
|
43
|
+
export declare function flagsForCommand({ spec }: {
|
|
44
|
+
spec: CommandSpec;
|
|
45
|
+
}): FlagSpec[];
|
|
46
|
+
export declare function suggestCommandSpecs({ command, specs, }: {
|
|
47
|
+
command: string[];
|
|
48
|
+
specs: CommandSpec[];
|
|
49
|
+
}): CommandSpec[];
|
|
50
|
+
export declare function suggestValues({ value, candidates, }: {
|
|
51
|
+
value: string;
|
|
52
|
+
candidates: string[];
|
|
53
|
+
}): string[];
|
|
54
|
+
//# sourceMappingURL=command-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-metadata.d.ts","sourceRoot":"","sources":["../src/command-metadata.ts"],"names":[],"mappings":"AAAA,MAAM,M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