@slatesvideo/cli 0.6.1 → 0.6.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/README.md +3 -3
- package/dist/commands/doctor.js +29 -4
- package/dist/commands/install-skills.d.ts +5 -3
- package/dist/commands/install-skills.js +17 -7
- package/dist/commands/logout.js +5 -2
- package/dist/index.js +3 -3
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @slatesvideo/cli
|
|
2
2
|
|
|
3
|
-
The `slates` command for the [Slates](https://slates.video) AI video studio. Drive Slates from your terminal, or let Codex (with your ChatGPT account) or Claude Code shell out to it instead of loading <!-- gen:tool-count -->
|
|
3
|
+
The `slates` command for the [Slates](https://slates.video) AI video studio. Drive Slates from your terminal, or let Codex (with your ChatGPT account) or Claude Code shell out to it instead of loading <!-- gen:tool-count -->189<!-- /gen:tool-count --> tool schemas into context.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ Requires Node.js 18+ and the Slates desktop app ([slates.video](https://slates.v
|
|
|
19
19
|
| `slates status` | Show connection state, account, and credit balance |
|
|
20
20
|
| `slates mcp` | Detect Codex, Claude and Cursor; print the Codex/Claude Code setup commands or the JSON config; `--write` merges it into Claude Desktop / Cursor configs (with a `.bak` backup) |
|
|
21
21
|
| `slates install-skills` | Install the same bundled skills for Claude Code and Codex; `--client claude` or `--client codex` selects one, and `--global` covers every project |
|
|
22
|
-
| `slates run <op>` | Invoke any Slates operation by id; `--list` shows all <!-- gen:tool-count -->
|
|
22
|
+
| `slates run <op>` | Invoke any Slates operation by id; `--list` shows all <!-- gen:tool-count -->189<!-- /gen:tool-count -->, `<op> --help` shows one op's flags |
|
|
23
23
|
| `slates run <op> --input '<json>'` | Pass a NESTED object (Shot `params`/`refs`, batch updates) — flags cannot express those |
|
|
24
24
|
| `slates use <project>` | Set the default project, by id or name, so ops stop needing `--projectId` |
|
|
25
25
|
| `slates doctor` | Check every setup precondition and print the fix for each failure |
|
|
@@ -27,7 +27,7 @@ Requires Node.js 18+ and the Slates desktop app ([slates.video](https://slates.v
|
|
|
27
27
|
|
|
28
28
|
## Skills
|
|
29
29
|
|
|
30
|
-
<!-- gen:skill-count -->
|
|
30
|
+
<!-- gen:skill-count -->46<!-- /gen:skill-count --> agent skills come with a Slates account (the card and the router ship in `@slatesvideo/shared`; `slates install-skills` writes the ones your account opens): <!-- gen:workflow-skill-count -->30<!-- /gen:workflow-skill-count --> workflow recipes (<!-- gen:workflow-skills -->start-here, ad-variants, blocking-to-prompt, camera-language, captions, character-identity, chatgpt-images, cinematic-look, content-policy, cost-discipline, cuts, dialogue-blocking, direct-response-ad, edit-and-iterate, layer-brand-captions, layer-lower-third, layer-title, model-selection, motion, one-prompt-film, previs-blocking, project-organization, restyle-from-blocking, script-craft, shot-variety, storyboard-from-script, style-prompting, transitions, ugc-influencer-ad, vision-feedback-loop<!-- /gen:workflow-skills -->) and <!-- gen:per-model-skill-count -->16<!-- /gen:per-model-skill-count --> per-model prompting guides covering <!-- gen:video-roster -->kling-v3.0-std, kling-v3.0-pro, kling-v3.0-omni, Seedance 2.0, Seedance 2.5, Gemini Omni Flash 1.1, Wan 3.0, Kling 4.0, MiniMax H3, MiniMax H3 Max, MiniMax H3 Max Turbo, LTX-2.5, LTX-2.5 Pro<!-- /gen:video-roster -->, <!-- gen:image-roster -->Nano Banana 2.1, GPT Image 2.5 Flare, GPT Image 2.5 Sunburst, FLUX 3 Image, Seedream 5 Lite<!-- /gen:image-roster --> and <!-- gen:audio-roster -->Seed Audio 1.0, ElevenLabs Sound Effects v2, Inworld Realtime TTS-2<!-- /gen:audio-roster -->.
|
|
31
31
|
|
|
32
32
|
`slates install-skills` writes each portable `SKILL.md` to `.claude/skills/<skill-name>/` for Claude Code and `.agents/skills/<skill-name>/` for Codex. Both receive identical content. Use `--global` for every project, or `--client claude` / `--client codex` to install for one client. Skills reload automatically; use `/reload-skills` in Claude Code if the root was just created, or restart Codex if its list has not refreshed. The installer preserves other files, including old flat Markdown copies.
|
|
33
33
|
|
package/dist/commands/doctor.js
CHANGED
|
@@ -2,7 +2,7 @@ import { readFileSync, existsSync } from 'node:fs';
|
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
|
-
import { readConnection, CONNECTION_FILE, SlatesCloudClient, SlatesDesktopClient,
|
|
5
|
+
import { readConnection, CONNECTION_FILE, SlatesCloudClient, SlatesDesktopClient, brainFiles, refreshLatestVersion, compareVersions, } from '@slatesvideo/shared';
|
|
6
6
|
import { EXIT } from '../exit-codes.js';
|
|
7
7
|
import { skillInstallTargets, inspectSkillInstallation } from './install-skills.js';
|
|
8
8
|
import { CODEX_MCP_SETUP, inspectCodexMcpConfig } from './mcp-config.js';
|
|
@@ -13,21 +13,38 @@ const REQUIRED_CAPABILITIES = [
|
|
|
13
13
|
['shots', 'Shots — the whole shot-list surface'],
|
|
14
14
|
['background-generation', 'background: true on any generate op'],
|
|
15
15
|
['image-references', 'reference images on image generation'],
|
|
16
|
-
['image-models-v2', 'nano-banana-pro / nano-banana-2-lite'],
|
|
17
16
|
['image-models-v3', 'gpt-image-2-5-flare / gpt-image-2-5-sunburst (five quality tiers)'],
|
|
17
|
+
['image-models-v4', 'nano-banana-2-1 / flux-3'],
|
|
18
18
|
['edit-image', 'image edits'],
|
|
19
19
|
['edit-video', 'video edits'],
|
|
20
20
|
['audio-generation', 'the audio lane'],
|
|
21
21
|
['voices', 'the preset voice shelf'],
|
|
22
22
|
['timeline', 'the timeline'],
|
|
23
23
|
['timeline-tracks', 'timeline tracks and settings'],
|
|
24
|
+
['timeline-overlays', 'text and image overlays'],
|
|
25
|
+
['text-fonts', 'bundled fonts, exact sizes, pictures and lines on text clips'],
|
|
26
|
+
['timeline-keyframes', 'clip keyframes'],
|
|
27
|
+
['keys-between-frames', 'keys between frames (a frame such as 110.4)'],
|
|
28
|
+
['timeline-transitions', 'transitions on cuts'],
|
|
29
|
+
['timeline-editing', 'trim, roll, ripple, slip, move, split and clip settings'],
|
|
30
|
+
['clip-look', "a clip's blend, grain and colour"],
|
|
31
|
+
['audio-effects', 'audio effects and speed ramps'],
|
|
32
|
+
['sound-precision', 'sound edges to the sample, millisecond crossfades and the sound bitrate'],
|
|
33
|
+
['transcripts', 'transcribing speech on this machine'],
|
|
34
|
+
['captions', 'captions'],
|
|
35
|
+
['transcript-edit', 'correcting a transcript'],
|
|
36
|
+
['caption-components', 'captions drawn by a caption component'],
|
|
37
|
+
['caption-html', 'caption layers an agent writes (html)'],
|
|
38
|
+
['html-clips', 'HTML motion layers and the motion block library'],
|
|
24
39
|
['export', 'video and XML export'],
|
|
40
|
+
['ad-variant-export', 'variant batch export, grid, delivery framing and selection'],
|
|
25
41
|
['chatgpt-image-generation', 'connected ChatGPT images'],
|
|
26
42
|
['external-image-metadata', 'saving an external image with its generation record'],
|
|
27
43
|
['selection', 'reading the live selection'],
|
|
28
44
|
['view', 'the window layout'],
|
|
29
45
|
['pins', 'pinned references'],
|
|
30
46
|
['asset-favorite', 'favorites'],
|
|
47
|
+
['asset-naming', 'naming an upload and renaming an asset'],
|
|
31
48
|
['asset-export', 'exporting media'],
|
|
32
49
|
['library', 'the Library'],
|
|
33
50
|
['templates', 'templates'],
|
|
@@ -36,6 +53,7 @@ const REQUIRED_CAPABILITIES = [
|
|
|
36
53
|
['board-quote', 'Shot prices and the board quote'],
|
|
37
54
|
['board-progress', 'board progress'],
|
|
38
55
|
['cut-edit', 'editing a cut'],
|
|
56
|
+
['recipe-lookup', 'what made an exported ad'],
|
|
39
57
|
['sheet-tool-seats', 'sheet tools on the default image seat'],
|
|
40
58
|
['image-variations', 'more than 4 images per call'],
|
|
41
59
|
['shot-position', 'placing a new Shot at a slot'],
|
|
@@ -50,18 +68,25 @@ const REQUIRED_CAPABILITIES = [
|
|
|
50
68
|
['reorder', 'reordering folders and pins'],
|
|
51
69
|
['usage', 'usage'],
|
|
52
70
|
['app-settings', 'app settings'],
|
|
53
|
-
['agent-host', "choosing who does
|
|
71
|
+
['agent-host', "choosing who does Slates Director's thinking"],
|
|
54
72
|
['asset-detail', 'reading one asset in full'],
|
|
55
73
|
['asset-link', 'linking a clip to its picture'],
|
|
56
74
|
['frame-extract', 'extracting a frame from a clip'],
|
|
57
75
|
['view-v2', 'showing and opening things in the window'],
|
|
58
76
|
['selection-set', 'ticking cards and shots'],
|
|
77
|
+
['timeline-select', 'selecting timeline clips'],
|
|
59
78
|
['first-frames', 'using pictures as first frames'],
|
|
60
79
|
['grid-extract', 'extracting cells from a grid picture'],
|
|
61
80
|
['frame-preferred-clip', 'choosing the clip a slot uses'],
|
|
62
81
|
['trim-pieces', 'cutting a clip into pieces'],
|
|
63
82
|
['shot-from-asset', 'saving a result as a Shot'],
|
|
64
83
|
['media-folder', 'choosing the folder a generation or upload lands in'],
|
|
84
|
+
['reference-breakdown', 'breaking a reference ad into shots'],
|
|
85
|
+
['reference-cancel', 'stopping a reference breakdown'],
|
|
86
|
+
['product-intake', 'adding products from their pages'],
|
|
87
|
+
['ad-variants', 'ad variants on one shared body'],
|
|
88
|
+
['variant-grid', 'the variant grid and its export from the segment cache'],
|
|
89
|
+
['loudness', 'measuring the loudness of a mix'],
|
|
65
90
|
];
|
|
66
91
|
export async function runDoctor() {
|
|
67
92
|
const checks = [];
|
|
@@ -152,7 +177,7 @@ export async function runDoctor() {
|
|
|
152
177
|
ok: absent || (!state.missing.length && !state.stale.length),
|
|
153
178
|
detail: absent
|
|
154
179
|
? 'not installed; MCP guides remain available'
|
|
155
|
-
: `${state.installed} of ${Object.keys(
|
|
180
|
+
: `${state.installed} of ${Object.keys(brainFiles()).length} installed; ${state.missing.length} missing, ${state.stale.length} outdated, ${state.duplicates.length} duplicate names`,
|
|
156
181
|
fix: `Run slates install-skills --client ${target.client}; also add --global if you have a global copy.`,
|
|
157
182
|
});
|
|
158
183
|
}
|
|
@@ -11,7 +11,7 @@ export interface InstallSkillsOptions {
|
|
|
11
11
|
interface SkillEnvironment {
|
|
12
12
|
cwd: string;
|
|
13
13
|
home: string;
|
|
14
|
-
skills: Record<string, string
|
|
14
|
+
skills: Readonly<Record<string, string>>;
|
|
15
15
|
log: (message: string) => void;
|
|
16
16
|
}
|
|
17
17
|
export declare function skillInstallTargets(client: SkillClient, base: string): Array<{
|
|
@@ -19,13 +19,15 @@ export declare function skillInstallTargets(client: SkillClient, base: string):
|
|
|
19
19
|
path: string;
|
|
20
20
|
}>;
|
|
21
21
|
/** Check every installed copy: Codex can discover same-name skills in both scopes. */
|
|
22
|
-
export declare function inspectSkillInstallation(roots: string[], skills?: Record<string, string
|
|
22
|
+
export declare function inspectSkillInstallation(roots: string[], skills?: Readonly<Record<string, string>>): {
|
|
23
23
|
installed: number;
|
|
24
24
|
missing: string[];
|
|
25
25
|
stale: string[];
|
|
26
26
|
duplicates: string[];
|
|
27
27
|
};
|
|
28
|
-
/**
|
|
28
|
+
/** The card and router ship in this package; the playbooks, rules and guides come from the connected account's brain. */
|
|
29
|
+
export declare function runInstallSkillsFromAccount(opts: InstallSkillsOptions): Promise<void>;
|
|
30
|
+
/** Both clients consume the same portable SKILL.md source. */
|
|
29
31
|
export declare function runInstallSkills(opts: InstallSkillsOptions, environment?: SkillEnvironment): void;
|
|
30
32
|
export {};
|
|
31
33
|
//# sourceMappingURL=install-skills.d.ts.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
4
|
-
import {
|
|
4
|
+
import { SlatesCloudClient, brainFiles, parseSkillMetadata, refreshServedBrain } from '@slatesvideo/shared';
|
|
5
5
|
const CLIENT_DIRECTORIES = { claude: '.claude', codex: '.agents' };
|
|
6
6
|
export const SKILL_CLIENTS = ['both', ...Object.keys(CLIENT_DIRECTORIES)];
|
|
7
|
+
/** The brain's source comments say where a lesson came from; that is for the repo and its review, not an installed copy. */
|
|
8
|
+
const SOURCE_COMMENT_RE = /[\t ]*<!--\s*src:[^]*?-->/g;
|
|
9
|
+
const installedCopy = (content) => content.replace(SOURCE_COMMENT_RE, '');
|
|
7
10
|
export function skillInstallTargets(client, base) {
|
|
8
11
|
if (client !== 'both' && !Object.hasOwn(CLIENT_DIRECTORIES, client))
|
|
9
12
|
throw new Error(`Unknown skill client: ${client}`);
|
|
@@ -12,7 +15,7 @@ export function skillInstallTargets(client, base) {
|
|
|
12
15
|
.map(([name, directory]) => ({ client: name, path: join(base, directory, 'skills') }));
|
|
13
16
|
}
|
|
14
17
|
/** Check every installed copy: Codex can discover same-name skills in both scopes. */
|
|
15
|
-
export function inspectSkillInstallation(roots, skills =
|
|
18
|
+
export function inspectSkillInstallation(roots, skills = brainFiles()) {
|
|
16
19
|
const missing = [];
|
|
17
20
|
const stale = [];
|
|
18
21
|
const duplicates = [];
|
|
@@ -21,22 +24,29 @@ export function inspectSkillInstallation(roots, skills = SKILLS) {
|
|
|
21
24
|
const files = [...new Set(roots)].map(root => join(root, name, 'SKILL.md')).filter(path => existsSync(path));
|
|
22
25
|
if (!files.length)
|
|
23
26
|
missing.push(name);
|
|
24
|
-
else if (files.some(file => readFileSync(file, 'utf8') !== content))
|
|
27
|
+
else if (files.some(file => readFileSync(file, 'utf8') !== installedCopy(content)))
|
|
25
28
|
stale.push(name);
|
|
26
29
|
if (files.length > 1)
|
|
27
30
|
duplicates.push(name);
|
|
28
31
|
}
|
|
29
32
|
return { installed: Object.keys(skills).length - missing.length, missing, stale, duplicates };
|
|
30
33
|
}
|
|
31
|
-
/**
|
|
34
|
+
/** The card and router ship in this package; the playbooks, rules and guides come from the connected account's brain. */
|
|
35
|
+
export async function runInstallSkillsFromAccount(opts) {
|
|
36
|
+
const brain = await refreshServedBrain(() => new SlatesCloudClient(), { force: true });
|
|
37
|
+
runInstallSkills(opts);
|
|
38
|
+
if (brain.source === 'none')
|
|
39
|
+
console.log(`Only the Director card and the router are installed: the playbooks come from your Slates account (${brain.problem ?? 'not reached'}). Run slates login, then slates install-skills again.`);
|
|
40
|
+
}
|
|
41
|
+
/** Both clients consume the same portable SKILL.md source. */
|
|
32
42
|
export function runInstallSkills(opts, environment = {
|
|
33
|
-
cwd: process.cwd(), home: homedir(), skills:
|
|
43
|
+
cwd: process.cwd(), home: homedir(), skills: brainFiles(), log: console.log,
|
|
34
44
|
}) {
|
|
35
45
|
const entries = Object.entries(environment.skills).map(([key, content]) => ({
|
|
36
46
|
...parseSkillMetadata(content, key), content,
|
|
37
47
|
}));
|
|
38
48
|
if (!entries.length)
|
|
39
|
-
throw new Error('No
|
|
49
|
+
throw new Error('No skills found in @slatesvideo/shared or the Slates brain');
|
|
40
50
|
const targets = skillInstallTargets(opts.client ?? 'both', opts.global ? environment.home : environment.cwd);
|
|
41
51
|
for (const target of targets) {
|
|
42
52
|
let fresh = 0;
|
|
@@ -49,7 +59,7 @@ export function runInstallSkills(opts, environment = {
|
|
|
49
59
|
else
|
|
50
60
|
fresh++;
|
|
51
61
|
mkdirSync(directory, { recursive: true });
|
|
52
|
-
writeFileSync(file, content);
|
|
62
|
+
writeFileSync(file, installedCopy(content));
|
|
53
63
|
}
|
|
54
64
|
environment.log(`Installed ${entries.length} ${target.client} skills (${fresh} new, ${updated} updated) into ${target.path}`);
|
|
55
65
|
}
|
package/dist/commands/logout.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { clearCloudToken } from '@slatesvideo/shared';
|
|
1
|
+
import { clearCloudToken, clearServedBrain } from '@slatesvideo/shared';
|
|
2
2
|
export function runLogout() {
|
|
3
|
+
// The brain this login received goes with it, read before the token goes (the cache names its login by it); a
|
|
4
|
+
// cache the desktop app received stays.
|
|
5
|
+
clearServedBrain('cli');
|
|
3
6
|
clearCloudToken();
|
|
4
|
-
console.log('Cloud token cleared.');
|
|
7
|
+
console.log('Cloud token and the Slates brain this login received cleared.');
|
|
5
8
|
}
|
|
6
9
|
//# sourceMappingURL=logout.js.map
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { runLogin } from './commands/login.js';
|
|
|
8
8
|
import { runLogout } from './commands/logout.js';
|
|
9
9
|
import { runStatus } from './commands/status.js';
|
|
10
10
|
import { runOp } from './commands/op.js';
|
|
11
|
-
import {
|
|
11
|
+
import { runInstallSkillsFromAccount, SKILL_CLIENTS } from './commands/install-skills.js';
|
|
12
12
|
import { runMcp } from './commands/mcp.js';
|
|
13
13
|
import { runSetup } from './commands/setup.js';
|
|
14
14
|
import { runDoctor } from './commands/doctor.js';
|
|
@@ -82,10 +82,10 @@ program
|
|
|
82
82
|
.action((opts) => runMcp(opts));
|
|
83
83
|
program
|
|
84
84
|
.command('install-skills')
|
|
85
|
-
.description('Install
|
|
85
|
+
.description('Install the Slates skills your account opens for Claude Code and Codex from one portable source.')
|
|
86
86
|
.option('--global', 'Install skills for every project instead of the current project', false)
|
|
87
87
|
.addOption(new Option('--client <client>', 'Choose native skill clients').choices(SKILL_CLIENTS).default('both'))
|
|
88
|
-
.action((opts) =>
|
|
88
|
+
.action((opts) => runInstallSkillsFromAccount(opts));
|
|
89
89
|
program
|
|
90
90
|
.command('doctor')
|
|
91
91
|
.description('Check every setup precondition at once — connection file, cloud token, desktop server and its capabilities, installed skills, MCP configs — and print the fix for each failure.')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slatesvideo/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Slates CLI: drive the Slates AI video studio from your terminal or let Codex (with your ChatGPT account) or Claude Code shell out to it. Includes the bundled agent skills and an MCP client configurator.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"claude",
|
|
40
40
|
"claude-code",
|
|
41
41
|
"agent-skills",
|
|
42
|
-
"veo",
|
|
43
42
|
"kling",
|
|
44
43
|
"seedance"
|
|
45
44
|
],
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
49
|
"@iarna/toml": "^2.2.5",
|
|
51
|
-
"@slatesvideo/shared": "^0.7.
|
|
50
|
+
"@slatesvideo/shared": "^0.7.8",
|
|
52
51
|
"commander": "^12.1.0",
|
|
53
52
|
"zod": "^3.23.0"
|
|
54
53
|
},
|