video-director 1.0.0-alpha.8 → 1.0.0-alpha.9
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 +1 -1
- package/package.json +1 -1
- package/skills/vdr-setup/assets/setup.toml +1 -1
- package/tools/install-skills.mjs +46 -2
package/README.md
CHANGED
|
@@ -146,7 +146,7 @@ To skip the questions (for a script, or to have your assistant run it), pass the
|
|
|
146
146
|
npx video-director --provider claude --project /path/to/your-project
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
The crew is copied into your project. To get a newer version later, run the same command again: it replaces the crew's skills with the new version and leaves your project files (`project.md`, `bible/`, `episodes/`, `.vdr/`) alone. Running from a download of this repo instead? Run `npm install` once in it, then `node tools/install-skills.mjs`, and add `--link` to point your project at the download rather than copy. Claude Code users can alternatively install it as a plugin from this repository. Other assistants that read skill folders work the same way, using their own skills folder.
|
|
149
|
+
The crew is copied into your project. To get a newer version later, run the same command again: it replaces the crew's skills with the new version and leaves your project files (`project.md`, `bible/`, `episodes/`, `.vdr/`) alone. Running from a download of this repo instead? Run `npm install` once in it, then `node tools/install-skills.mjs`, and add `--link` to point your project at the download rather than copy. Claude Code users can also open a live **Director pane** beside the chat (stage, approvals, characters, next step, and whether the crew needs an update). The installer offers it at the end, or add `--mod`; type `/director` in Claude Code to open it. To add it by hand: `claude plugin marketplace add ayhid/video-director` then `claude plugin install vdr-director@vdr`. Claude Code users can alternatively install it as a plugin from this repository. Other assistants that read skill folders work the same way, using their own skills folder.
|
|
150
150
|
|
|
151
151
|
> Install **all** the skills together. They find each other by sitting side by side, so leaving one out will break the others.
|
|
152
152
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "video-director",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.9",
|
|
4
4
|
"description": "Video Director: an AI film crew (Screenwriter, Production Designer, Editor) as agent skills. Run `npx video-director` to install it into a video project.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Video Director setup questions and module metadata.
|
|
2
2
|
# Read by scripts/write-config.py. The version line is bumped by .github/scripts/set-version.mjs.
|
|
3
3
|
|
|
4
|
-
version = "1.0.0-alpha.
|
|
4
|
+
version = "1.0.0-alpha.9"
|
|
5
5
|
|
|
6
6
|
greeting = """
|
|
7
7
|
Your Video Director crew is ready. Start with the Screenwriter
|
package/tools/install-skills.mjs
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
// skill folders is touched: project.md, bible/, episodes/ and .vdr/ stay as they are.
|
|
14
14
|
// --link points at the download instead, so updating the download updates every project.
|
|
15
15
|
// Also creates the project folders the crew expects, so there is nothing to create by hand.
|
|
16
|
+
// For Claude Code it can also install the Director pane, a live side panel (a Claude Code mod):
|
|
17
|
+
// the wizard asks, --mod says yes and --no-mod says no. It is installed once per computer.
|
|
16
18
|
|
|
17
19
|
import fs from 'node:fs';
|
|
18
20
|
import os from 'node:os';
|
|
@@ -29,7 +31,7 @@ const PROVIDERS = {
|
|
|
29
31
|
const TOOLS_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
30
32
|
const REPO_ROOT = path.resolve(TOOLS_DIR, '..');
|
|
31
33
|
const SOURCE = path.join(REPO_ROOT, 'skills');
|
|
32
|
-
const USAGE = 'Usage: npx video-director [--provider claude|codex|claude,codex] [--project <folder>] [--link] [--update] [--yes]';
|
|
34
|
+
const USAGE = 'Usage: npx video-director [--provider claude|codex|claude,codex] [--project <folder>] [--link] [--update] [--mod | --no-mod] [--yes]';
|
|
33
35
|
|
|
34
36
|
// Colors only when a person is looking at a terminal: never in pipes, never with NO_COLOR.
|
|
35
37
|
const COLOR = Boolean(process.stdout.isTTY) && !process.env.NO_COLOR && process.env.TERM !== 'dumb';
|
|
@@ -68,6 +70,25 @@ export function linkSkills(provider, projectRoot, { link = false } = {}) {
|
|
|
68
70
|
return { destination, linked, skipped };
|
|
69
71
|
}
|
|
70
72
|
|
|
73
|
+
// The Director pane is a Claude Code mod published through this repository's marketplace.
|
|
74
|
+
const MOD_MARKETPLACE = 'ayhid/video-director';
|
|
75
|
+
const MOD_PLUGIN = 'vdr-director@vdr';
|
|
76
|
+
const MOD_COMMANDS = [
|
|
77
|
+
`claude plugin marketplace add ${MOD_MARKETPLACE}`,
|
|
78
|
+
`claude plugin install ${MOD_PLUGIN}`,
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
// Never throws and never stops the install: the pane is optional, so a failure only prints the manual commands.
|
|
82
|
+
export function installMod() {
|
|
83
|
+
const run = (args) => spawnSync('claude', args, { encoding: 'utf8', shell: process.platform === 'win32' });
|
|
84
|
+
const added = run(['plugin', 'marketplace', 'add', MOD_MARKETPLACE]);
|
|
85
|
+
// An existing marketplace makes `add` complain; the install below is the real test.
|
|
86
|
+
const installed = run(['plugin', 'install', MOD_PLUGIN]);
|
|
87
|
+
if (installed.status === 0) return { ok: true };
|
|
88
|
+
const detail = `${installed.stderr || installed.stdout || added.stderr || ''}`.trim().split('\n').slice(-2).join(' ');
|
|
89
|
+
return { ok: false, detail };
|
|
90
|
+
}
|
|
91
|
+
|
|
71
92
|
function hasCommand(binary) {
|
|
72
93
|
const result = spawnSync(binary, ['--version'], { stdio: 'ignore', shell: process.platform === 'win32' });
|
|
73
94
|
return result.status === 0;
|
|
@@ -78,6 +99,8 @@ function parseArgs(argv) {
|
|
|
78
99
|
for (let i = 0; i < argv.length; i++) {
|
|
79
100
|
if (argv[i] === '--yes' || argv[i] === '-y') out.yes = true;
|
|
80
101
|
else if (argv[i] === '--link') out.link = true;
|
|
102
|
+
else if (argv[i] === '--mod') out.mod = true;
|
|
103
|
+
else if (argv[i] === '--no-mod') out.noMod = true;
|
|
81
104
|
else if (argv[i] === '--update') out.update = true; // accepted for older scripts: re-running always updates
|
|
82
105
|
else if (argv[i] === '--provider') out.provider = argv[++i];
|
|
83
106
|
else if (argv[i] === '--project') out.project = argv[++i];
|
|
@@ -110,7 +133,7 @@ function uvLine() {
|
|
|
110
133
|
}
|
|
111
134
|
|
|
112
135
|
// Scripted path: no prompts, safe for CI and for assistants running it for you.
|
|
113
|
-
function runPlain({ provider, project, link, update }) {
|
|
136
|
+
function runPlain({ provider, project, link, update, mod }) {
|
|
114
137
|
const projectRoot = resolveProject(project);
|
|
115
138
|
if (fs.existsSync(projectRoot) && !fs.statSync(projectRoot).isDirectory()) fail(`Not a folder: ${projectRoot}`);
|
|
116
139
|
fs.mkdirSync(projectRoot, { recursive: true });
|
|
@@ -120,6 +143,11 @@ function runPlain({ provider, project, link, update }) {
|
|
|
120
143
|
console.log(`${c.green(`${link ? 'Linked' : 'Installed'} ${linked.length}`)} into ${c.cyan(destination)}${linked.length ? `: ${linked.join(', ')}` : ''}`);
|
|
121
144
|
if (skipped.length) console.log(`Left alone (already there): ${skipped.join(', ')}`);
|
|
122
145
|
}
|
|
146
|
+
if (mod && parseProviders(provider).includes('claude')) {
|
|
147
|
+
const result = installMod();
|
|
148
|
+
if (result.ok) console.log(c.green('Installed the Director pane.') + ' Type /director in Claude Code to open it.');
|
|
149
|
+
else console.log(`Could not install the Director pane${result.detail ? ` (${result.detail})` : ''}. Run by hand:\n ${MOD_COMMANDS.join('\n ')}`);
|
|
150
|
+
}
|
|
123
151
|
const uv = uvLine();
|
|
124
152
|
if (uv) console.log(uv);
|
|
125
153
|
}
|
|
@@ -207,6 +235,22 @@ async function runWizard(args) {
|
|
|
207
235
|
log.success(`${c.bold(PROVIDERS[r.id].label)}: ${c.green(`${r.linked.length} ${link ? 'linked' : 'installed'}`)}${r.skipped.length ? c.dim(`, ${r.skipped.length} already there`) : ''}`);
|
|
208
236
|
}
|
|
209
237
|
|
|
238
|
+
if (providers.includes('claude') && !args.noMod && hasCommand('claude')) {
|
|
239
|
+
const wantsMod = args.mod || await ask(confirm({
|
|
240
|
+
message: 'Also install the Director pane, a live side panel for Claude Code that shows your stage, approvals and next step? (once per computer)',
|
|
241
|
+
}));
|
|
242
|
+
if (wantsMod) {
|
|
243
|
+
const spinMod = spinner();
|
|
244
|
+
spinMod.start('Installing the Director pane');
|
|
245
|
+
const result = installMod();
|
|
246
|
+
if (result.ok) spinMod.stop(c.green('Director pane installed') + ' - type /director in Claude Code to open it');
|
|
247
|
+
else {
|
|
248
|
+
spinMod.stop(c.yellow('Could not install the Director pane') + (result.detail ? c.dim(` (${result.detail})`) : ''));
|
|
249
|
+
log.warn(`Run these by hand if you want it:\n ${MOD_COMMANDS.join('\n ')}`);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
210
254
|
if (!hasCommand('uv')) {
|
|
211
255
|
const install = await ask(confirm({ message: 'The crew needs the free helper `uv`, which is not installed. Install it now?' }));
|
|
212
256
|
if (install) {
|