@slatesvideo/cli 0.4.3 → 0.4.5
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/dist/commands/setup.d.ts +7 -0
- package/dist/commands/setup.js +46 -0
- package/dist/index.js +7 -0
- package/package.json +2 -2
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { readConnection } from '@slatesvideo/shared';
|
|
2
|
+
import { runMcp } from './mcp.js';
|
|
3
|
+
import { runInstallSkills } from './install-skills.js';
|
|
4
|
+
// `slates setup` — the one-command onboarding. Does the three setup steps in
|
|
5
|
+
// order so a user (or an agent following a single instruction) can go from
|
|
6
|
+
// "nothing" to "connected":
|
|
7
|
+
// 1. Write the Slates MCP config into every detected client (Claude Desktop,
|
|
8
|
+
// Claude Code, Cursor) — no manual JSON editing.
|
|
9
|
+
// 2. Install the bundled agent skills into the current project.
|
|
10
|
+
// 3. Point at the account-connect step (magic link — interactive, so it
|
|
11
|
+
// happens in the Slates desktop app or via `slates login`, not here).
|
|
12
|
+
//
|
|
13
|
+
// Steps 1-2 are mechanical and run automatically; step 3 is auth and only ever
|
|
14
|
+
// guided, never silently performed.
|
|
15
|
+
export function runSetup(opts) {
|
|
16
|
+
console.log('Slates setup — getting you connected.');
|
|
17
|
+
// 1. MCP client config — always write in the one-command flow (that's the point).
|
|
18
|
+
console.log('\n① Configuring MCP clients');
|
|
19
|
+
runMcp({ write: true });
|
|
20
|
+
// 2. Agent skills.
|
|
21
|
+
if (opts.skipSkills) {
|
|
22
|
+
console.log('\n② Skills — skipped (--skip-skills). Run `slates install-skills` when ready.');
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
console.log('\n② Installing agent skills');
|
|
26
|
+
runInstallSkills({ global: !!opts.global });
|
|
27
|
+
}
|
|
28
|
+
// 3. Account connection — interactive (magic link), so guide rather than block.
|
|
29
|
+
console.log('\n③ Connect your Slates account');
|
|
30
|
+
const conn = readConnection();
|
|
31
|
+
const hasCloud = !!conn.cloud?.token;
|
|
32
|
+
const hasDesktop = !!conn.desktop?.token;
|
|
33
|
+
if (hasCloud && hasDesktop) {
|
|
34
|
+
console.log(' ✓ Already connected (cloud + desktop tokens present).');
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
if (hasCloud || hasDesktop) {
|
|
38
|
+
console.log(` Partially connected (${hasCloud ? 'cloud' : 'desktop'} only) — finish the link below.`);
|
|
39
|
+
}
|
|
40
|
+
console.log(' Open Slates desktop → Settings → Agent Control → enter your email → Send link,');
|
|
41
|
+
console.log(' then click the link in your email. (Or run `slates login`.)');
|
|
42
|
+
console.log(' That one step authorizes the agent AND starts the local server the tools talk to.');
|
|
43
|
+
}
|
|
44
|
+
console.log('\nDone. Restart your AI tool to load Slates, then verify with: slates status');
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=setup.js.map
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { runStatus } from './commands/status.js';
|
|
|
10
10
|
import { runOp } from './commands/op.js';
|
|
11
11
|
import { runInstallSkills } from './commands/install-skills.js';
|
|
12
12
|
import { runMcp } from './commands/mcp.js';
|
|
13
|
+
import { runSetup } from './commands/setup.js';
|
|
13
14
|
import { ALL_OPERATIONS } from '@slatesvideo/shared';
|
|
14
15
|
// Slates CLI. The CLI mirrors the MCP tool surface as commands so Claude
|
|
15
16
|
// Code can shell out to them instead of loading every tool schema into
|
|
@@ -53,6 +54,12 @@ program
|
|
|
53
54
|
.command('status')
|
|
54
55
|
.description('Show the current Slates connection status.')
|
|
55
56
|
.action(() => runStatus());
|
|
57
|
+
program
|
|
58
|
+
.command('setup')
|
|
59
|
+
.description('One-command onboarding: write the MCP config into every detected client, install the skills, and point you at the account-connect step.')
|
|
60
|
+
.option('--global', 'Install skills into ~/.claude/skills instead of the current project', false)
|
|
61
|
+
.option('--skip-skills', 'Only write MCP configs; do not install skills', false)
|
|
62
|
+
.action((opts) => runSetup(opts));
|
|
56
63
|
program
|
|
57
64
|
.command('mcp')
|
|
58
65
|
.description('Detect installed MCP clients and print (or write) the Slates MCP config for each.')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slatesvideo/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Slates CLI: drive the Slates AI video studio from your terminal or let Claude Code shell out to it. Includes the bundled agent skills and an MCP client configurator.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@slatesvideo/shared": "0.4.
|
|
50
|
+
"@slatesvideo/shared": "0.4.5",
|
|
51
51
|
"commander": "^12.1.0",
|
|
52
52
|
"zod": "^3.23.0"
|
|
53
53
|
},
|