@synthetic-ai/premiere-mcp 2.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/LICENSE +21 -0
  3. package/README.md +242 -0
  4. package/cep-plugin/.debug +8 -0
  5. package/cep-plugin/CSInterface.js +70 -0
  6. package/cep-plugin/CSXS/manifest.xml +49 -0
  7. package/cep-plugin/host.jsx +7 -0
  8. package/cep-plugin/index.html +419 -0
  9. package/cep-plugin/main.js +327 -0
  10. package/cep-plugin/premiere.jsx +24947 -0
  11. package/cep-plugin/synthetic-logo.png +0 -0
  12. package/dist/bridge/file-bridge.d.ts +29 -0
  13. package/dist/bridge/file-bridge.js +145 -0
  14. package/dist/bridge/script-builder.d.ts +19 -0
  15. package/dist/bridge/script-builder.js +408 -0
  16. package/dist/http-server.d.ts +21 -0
  17. package/dist/http-server.js +140 -0
  18. package/dist/index.d.ts +3 -0
  19. package/dist/index.js +70 -0
  20. package/dist/resources/extendscript-reference.d.ts +2 -0
  21. package/dist/resources/extendscript-reference.js +219 -0
  22. package/dist/server.d.ts +4 -0
  23. package/dist/server.js +276 -0
  24. package/dist/tools/advanced.d.ts +530 -0
  25. package/dist/tools/advanced.js +923 -0
  26. package/dist/tools/audio-advanced.d.ts +847 -0
  27. package/dist/tools/audio-advanced.js +1653 -0
  28. package/dist/tools/audio.d.ts +84 -0
  29. package/dist/tools/audio.js +123 -0
  30. package/dist/tools/captions.d.ts +30 -0
  31. package/dist/tools/captions.js +73 -0
  32. package/dist/tools/clipboard.d.ts +153 -0
  33. package/dist/tools/clipboard.js +381 -0
  34. package/dist/tools/color-advanced.d.ts +821 -0
  35. package/dist/tools/color-advanced.js +772 -0
  36. package/dist/tools/discovery.d.ts +128 -0
  37. package/dist/tools/discovery.js +445 -0
  38. package/dist/tools/effects.d.ts +211 -0
  39. package/dist/tools/effects.js +554 -0
  40. package/dist/tools/export-presets.d.ts +333 -0
  41. package/dist/tools/export-presets.js +490 -0
  42. package/dist/tools/export.d.ts +320 -0
  43. package/dist/tools/export.js +618 -0
  44. package/dist/tools/health.d.ts +9 -0
  45. package/dist/tools/health.js +25 -0
  46. package/dist/tools/inspection.d.ts +179 -0
  47. package/dist/tools/inspection.js +1089 -0
  48. package/dist/tools/keyframes.d.ts +253 -0
  49. package/dist/tools/keyframes.js +611 -0
  50. package/dist/tools/markers.d.ts +117 -0
  51. package/dist/tools/markers.js +206 -0
  52. package/dist/tools/media.d.ts +297 -0
  53. package/dist/tools/media.js +493 -0
  54. package/dist/tools/metadata.d.ts +178 -0
  55. package/dist/tools/metadata.js +278 -0
  56. package/dist/tools/multicam.d.ts +199 -0
  57. package/dist/tools/multicam.js +212 -0
  58. package/dist/tools/playback.d.ts +34 -0
  59. package/dist/tools/playback.js +63 -0
  60. package/dist/tools/playhead.d.ts +77 -0
  61. package/dist/tools/playhead.js +185 -0
  62. package/dist/tools/project-manager.d.ts +65 -0
  63. package/dist/tools/project-manager.js +81 -0
  64. package/dist/tools/project.d.ts +390 -0
  65. package/dist/tools/project.js +596 -0
  66. package/dist/tools/scripting.d.ts +98 -0
  67. package/dist/tools/scripting.js +434 -0
  68. package/dist/tools/selection.d.ts +120 -0
  69. package/dist/tools/selection.js +334 -0
  70. package/dist/tools/sequence-advanced.d.ts +84 -0
  71. package/dist/tools/sequence-advanced.js +471 -0
  72. package/dist/tools/sequence-settings.d.ts +397 -0
  73. package/dist/tools/sequence-settings.js +967 -0
  74. package/dist/tools/sequence.d.ts +211 -0
  75. package/dist/tools/sequence.js +378 -0
  76. package/dist/tools/source-monitor.d.ts +95 -0
  77. package/dist/tools/source-monitor.js +180 -0
  78. package/dist/tools/text.d.ts +97 -0
  79. package/dist/tools/text.js +159 -0
  80. package/dist/tools/timeline.d.ts +265 -0
  81. package/dist/tools/timeline.js +575 -0
  82. package/dist/tools/track-management.d.ts +482 -0
  83. package/dist/tools/track-management.js +787 -0
  84. package/dist/tools/track-targeting.d.ts +666 -0
  85. package/dist/tools/track-targeting.js +1318 -0
  86. package/dist/tools/tracks.d.ts +90 -0
  87. package/dist/tools/tracks.js +183 -0
  88. package/dist/tools/transitions-motion.d.ts +788 -0
  89. package/dist/tools/transitions-motion.js +680 -0
  90. package/dist/tools/transitions.d.ts +124 -0
  91. package/dist/tools/transitions.js +267 -0
  92. package/dist/tools/utility.d.ts +469 -0
  93. package/dist/tools/utility.js +1118 -0
  94. package/dist/tools/workspace.d.ts +25 -0
  95. package/dist/tools/workspace.js +61 -0
  96. package/package.json +66 -0
  97. package/scripts/build-chat-dmg.sh +210 -0
  98. package/scripts/build-chat-zip.sh +291 -0
  99. package/scripts/install-cep-windows.ps1 +99 -0
  100. package/scripts/install-cep.sh +66 -0
  101. package/scripts/install-chat-plugin.bat +67 -0
  102. package/scripts/install-chat-plugin.sh +85 -0
  103. package/scripts/install-windows.bat +95 -0
  104. package/scripts/package.mjs +218 -0
@@ -0,0 +1,25 @@
1
+ import { BridgeOptions } from "../bridge/file-bridge.js";
2
+ export declare function getWorkspaceTools(bridgeOptions: BridgeOptions): {
3
+ get_workspaces: {
4
+ description: string;
5
+ parameters: {};
6
+ handler: () => Promise<import("../bridge/file-bridge.js").CommandResult>;
7
+ };
8
+ set_workspace: {
9
+ description: string;
10
+ parameters: {
11
+ type: "object";
12
+ properties: {
13
+ name: {
14
+ type: string;
15
+ description: string;
16
+ };
17
+ };
18
+ required: string[];
19
+ };
20
+ handler: (args: {
21
+ name: string;
22
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
23
+ };
24
+ };
25
+ //# sourceMappingURL=workspace.d.ts.map
@@ -0,0 +1,61 @@
1
+ import { buildToolScript, escapeForExtendScript } from "../bridge/script-builder.js";
2
+ import { sendCommand } from "../bridge/file-bridge.js";
3
+ export function getWorkspaceTools(bridgeOptions) {
4
+ return {
5
+ get_workspaces: {
6
+ description: "List all available workspace layouts in Premiere Pro",
7
+ parameters: {},
8
+ handler: async () => {
9
+ const script = buildToolScript(`
10
+ var list = [];
11
+ try {
12
+ if (typeof app.getWorkspaces === "function") {
13
+ var workspaces = app.getWorkspaces();
14
+ if (workspaces) {
15
+ for (var i = 0; i < workspaces.length; i++) {
16
+ list.push(workspaces[i]);
17
+ }
18
+ return __result({ workspaces: list, count: list.length });
19
+ }
20
+ }
21
+ } catch (e) {}
22
+ return __result({
23
+ workspaces: list,
24
+ count: 0,
25
+ note: "Workspace enumeration is not available in this Premiere Pro version (app.getWorkspaces is undocumented and unsupported here)."
26
+ });
27
+ `);
28
+ return sendCommand(script, bridgeOptions);
29
+ },
30
+ },
31
+ set_workspace: {
32
+ description: "Switch to a specific workspace layout (e.g., 'Editing', 'Color', 'Audio', 'Effects', 'Graphics')",
33
+ parameters: {
34
+ type: "object",
35
+ properties: {
36
+ name: {
37
+ type: "string",
38
+ description: "Name of the workspace to activate (use get_workspaces to see available options)",
39
+ },
40
+ },
41
+ required: ["name"],
42
+ },
43
+ handler: async (args) => {
44
+ const script = buildToolScript(`
45
+ try {
46
+ if (typeof app.setWorkspace !== "function") {
47
+ return __error("Setting the workspace is not available in this Premiere Pro version (app.setWorkspace is undocumented and unsupported here).");
48
+ }
49
+ var result = app.setWorkspace("${escapeForExtendScript(args.name)}");
50
+ if (result === false) return __error("Failed to set workspace: ${escapeForExtendScript(args.name)}");
51
+ return __result({ set: true, workspace: "${escapeForExtendScript(args.name)}" });
52
+ } catch (e) {
53
+ return __error("Failed to set workspace '${escapeForExtendScript(args.name)}': " + (e && e.message ? e.message : e));
54
+ }
55
+ `);
56
+ return sendCommand(script, bridgeOptions);
57
+ },
58
+ },
59
+ };
60
+ }
61
+ //# sourceMappingURL=workspace.js.map
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@synthetic-ai/premiere-mcp",
3
+ "version": "2.0.0",
4
+ "description": "MCP server for controlling Adobe Premiere Pro via CEP/ExtendScript — 437 tools for AI-driven video editing",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "premiere-mcp": "dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist/**/*.js",
12
+ "dist/**/*.d.ts",
13
+ "cep-plugin",
14
+ "scripts",
15
+ "README.md",
16
+ "LICENSE",
17
+ "CHANGELOG.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "dev": "tsc --watch",
22
+ "start": "node dist/index.js",
23
+ "start:http": "node dist/http-server.js",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest",
26
+ "test:coverage": "vitest run --coverage",
27
+ "install-cep": "bash scripts/install-cep.sh"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/matiasEltrece/premiere-pro-mcp.git"
32
+ },
33
+ "homepage": "https://synthetic.com.ar",
34
+ "bugs": {
35
+ "url": "https://synthetic.com.ar"
36
+ },
37
+ "author": "Synthetic",
38
+ "keywords": [
39
+ "mcp",
40
+ "model-context-protocol",
41
+ "adobe",
42
+ "premiere-pro",
43
+ "video-editing",
44
+ "ai",
45
+ "extendscript",
46
+ "cep",
47
+ "claude",
48
+ "windsurf",
49
+ "cursor",
50
+ "automation"
51
+ ],
52
+ "license": "MIT",
53
+ "engines": {
54
+ "node": ">=18.0.0"
55
+ },
56
+ "dependencies": {
57
+ "@modelcontextprotocol/sdk": "^1.12.1",
58
+ "zod": "^3.23.0"
59
+ },
60
+ "devDependencies": {
61
+ "@types/node": "^22.10.0",
62
+ "javascript-obfuscator": "^4.2.2",
63
+ "typescript": "^5.7.0",
64
+ "vitest": "^4.0.18"
65
+ }
66
+ }
@@ -0,0 +1,210 @@
1
+ #!/usr/bin/env bash
2
+ # Build a macOS DMG for the Premiere Pro AI Chat plugin.
3
+ # The DMG contains the plugin folder + an installer script.
4
+
5
+ set -e
6
+
7
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
+ PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
9
+ PLUGIN_SRC="$PROJECT_ROOT/chat-plugin"
10
+ BUILD_DIR="$PROJECT_ROOT/build"
11
+ DMG_NAME="Premiere-Pro-AI-Chat"
12
+ DMG_VOLUME="Premiere Pro AI Chat"
13
+ VERSION="1.0.0"
14
+
15
+ echo "========================================"
16
+ echo " Building DMG: $DMG_NAME v$VERSION"
17
+ echo "========================================"
18
+ echo ""
19
+
20
+ # Clean previous DMG staging (preserve other build artifacts)
21
+ rm -rf "$BUILD_DIR/dmg-staging"
22
+ mkdir -p "$BUILD_DIR/dmg-staging"
23
+
24
+ STAGING="$BUILD_DIR/dmg-staging"
25
+
26
+ # ---- Copy plugin files ----
27
+ echo "Copying plugin files..."
28
+ mkdir -p "$STAGING/Premiere Pro AI Chat.cep"
29
+ cp -R "$PLUGIN_SRC/"* "$STAGING/Premiere Pro AI Chat.cep/"
30
+ echo "✓ Plugin files copied"
31
+
32
+ # ---- Create installer script inside DMG ----
33
+ cat > "$STAGING/Install Plugin.command" << 'INSTALLER_EOF'
34
+ #!/usr/bin/env bash
35
+ # Premiere Pro AI Chat — One-click Installer
36
+
37
+ set -e
38
+
39
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
40
+ PLUGIN_NAME="com.ppro.ai.chat"
41
+ PLUGIN_SRC="$SCRIPT_DIR/Premiere Pro AI Chat.cep"
42
+ CEP_DIR="$HOME/Library/Application Support/Adobe/CEP/extensions"
43
+
44
+ echo ""
45
+ echo "╔══════════════════════════════════════════╗"
46
+ echo "║ Premiere Pro AI Chat — Installer ║"
47
+ echo "╚══════════════════════════════════════════╝"
48
+ echo ""
49
+
50
+ # Verify source
51
+ if [ ! -d "$PLUGIN_SRC" ]; then
52
+ echo "✗ Error: Plugin files not found."
53
+ echo " Make sure you're running this from the DMG."
54
+ exit 1
55
+ fi
56
+
57
+ # Create CEP directory
58
+ mkdir -p "$CEP_DIR"
59
+
60
+ # Remove old installation
61
+ if [ -d "$CEP_DIR/$PLUGIN_NAME" ] || [ -L "$CEP_DIR/$PLUGIN_NAME" ]; then
62
+ echo "Removing previous installation..."
63
+ rm -rf "$CEP_DIR/$PLUGIN_NAME"
64
+ fi
65
+
66
+ # Copy plugin
67
+ echo "Installing plugin..."
68
+ cp -R "$PLUGIN_SRC" "$CEP_DIR/$PLUGIN_NAME"
69
+ echo "✓ Plugin installed to: $CEP_DIR/$PLUGIN_NAME"
70
+
71
+ # Enable unsigned extensions
72
+ echo "Enabling unsigned CEP extensions..."
73
+ for ver in 9 10 11 12; do
74
+ defaults write com.adobe.CSXS.$ver PlayerDebugMode 1 2>/dev/null || true
75
+ done
76
+ echo "✓ Debug mode enabled"
77
+
78
+ echo ""
79
+ echo "════════════════════════════════════════════"
80
+ echo " ✓ Installation complete!"
81
+ echo ""
82
+ echo " Next steps:"
83
+ echo " 1. Restart Premiere Pro (if running)"
84
+ echo " 2. Go to: Window → Extensions → AI Chat"
85
+ echo " 3. Enter your Claude or Gemini API key"
86
+ echo " 4. Start chatting!"
87
+ echo "════════════════════════════════════════════"
88
+ echo ""
89
+ echo "Press any key to close..."
90
+ read -n 1 -s
91
+ INSTALLER_EOF
92
+
93
+ chmod +x "$STAGING/Install Plugin.command"
94
+ echo "✓ Installer script created"
95
+
96
+ # ---- Create README ----
97
+ cat > "$STAGING/README.txt" << 'README_EOF'
98
+ Premiere Pro AI Chat Plugin
99
+ ============================
100
+
101
+ An embedded AI chat panel for Adobe Premiere Pro.
102
+ Control your edits with natural language using Claude or Gemini.
103
+
104
+ INSTALLATION
105
+ ============
106
+
107
+ Option 1: Double-click "Install Plugin.command"
108
+ - This will copy the plugin to your Adobe CEP extensions folder
109
+ - It will enable unsigned extensions automatically
110
+
111
+ Option 2: Manual Install
112
+ - Copy the "Premiere Pro AI Chat.cep" folder to:
113
+ ~/Library/Application Support/Adobe/CEP/extensions/com.ppro.ai.chat
114
+ - Enable unsigned extensions by running in Terminal:
115
+ defaults write com.adobe.CSXS.11 PlayerDebugMode 1
116
+
117
+ USAGE
118
+ =====
119
+
120
+ 1. Open Premiere Pro
121
+ 2. Go to: Window → Extensions → AI Chat
122
+ 3. Choose Claude or Gemini as your AI provider
123
+ 4. Enter your API key
124
+ 5. Start chatting! The AI can:
125
+ - Query your project (clips, sequences, tracks)
126
+ - Edit your timeline (add clips, effects, transitions)
127
+ - Export sequences
128
+ - And much more
129
+
130
+ REQUIREMENTS
131
+ ============
132
+
133
+ - macOS 10.14+
134
+ - Adobe Premiere Pro 2020 (v14.0) or later
135
+ - Claude API key (console.anthropic.com) or
136
+ Gemini API key (aistudio.google.com)
137
+
138
+ SUPPORT
139
+ =======
140
+
141
+ GitHub: https://github.com/ppmcp/premiere-pro-mcp
142
+ Issues: https://github.com/ppmcp/premiere-pro-mcp/issues
143
+ README_EOF
144
+
145
+ echo "✓ README created"
146
+
147
+ # ---- Create Uninstaller ----
148
+ cat > "$STAGING/Uninstall Plugin.command" << 'UNINSTALL_EOF'
149
+ #!/usr/bin/env bash
150
+ set -e
151
+
152
+ PLUGIN_NAME="com.ppro.ai.chat"
153
+ CEP_DIR="$HOME/Library/Application Support/Adobe/CEP/extensions"
154
+
155
+ echo ""
156
+ echo "Uninstalling Premiere Pro AI Chat..."
157
+
158
+ if [ -d "$CEP_DIR/$PLUGIN_NAME" ] || [ -L "$CEP_DIR/$PLUGIN_NAME" ]; then
159
+ rm -rf "$CEP_DIR/$PLUGIN_NAME"
160
+ echo "✓ Plugin removed."
161
+ else
162
+ echo "Plugin not found — nothing to remove."
163
+ fi
164
+
165
+ echo ""
166
+ echo "Press any key to close..."
167
+ read -n 1 -s
168
+ UNINSTALL_EOF
169
+
170
+ chmod +x "$STAGING/Uninstall Plugin.command"
171
+ echo "✓ Uninstaller created"
172
+
173
+ # ---- Build DMG ----
174
+ echo ""
175
+ echo "Building DMG..."
176
+
177
+ DMG_PATH="$BUILD_DIR/$DMG_NAME-v$VERSION.dmg"
178
+ TEMP_DMG="$BUILD_DIR/temp.dmg"
179
+
180
+ # Create a temporary DMG
181
+ hdiutil create -srcfolder "$STAGING" \
182
+ -volname "$DMG_VOLUME" \
183
+ -format UDRW \
184
+ -fs HFS+ \
185
+ -size 20m \
186
+ "$TEMP_DMG" \
187
+ -quiet
188
+
189
+ # Convert to compressed read-only DMG
190
+ hdiutil convert "$TEMP_DMG" \
191
+ -format UDZO \
192
+ -imagekey zlib-level=9 \
193
+ -o "$DMG_PATH" \
194
+ -quiet
195
+
196
+ rm -f "$TEMP_DMG"
197
+
198
+ echo "✓ DMG built: $DMG_PATH"
199
+
200
+ # Get file size
201
+ DMG_SIZE=$(du -h "$DMG_PATH" | cut -f1 | xargs)
202
+
203
+ echo ""
204
+ echo "========================================"
205
+ echo " ✓ Build complete!"
206
+ echo ""
207
+ echo " File: $DMG_PATH"
208
+ echo " Size: $DMG_SIZE"
209
+ echo "========================================"
210
+ echo ""
@@ -0,0 +1,291 @@
1
+ #!/usr/bin/env bash
2
+ # Build a cross-platform ZIP for the Premiere Pro AI Chat plugin.
3
+ # The ZIP contains the plugin folder + installers for macOS and Windows.
4
+
5
+ set -e
6
+
7
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
+ PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
9
+ PLUGIN_SRC="$PROJECT_ROOT/chat-plugin"
10
+ BUILD_DIR="$PROJECT_ROOT/build"
11
+ ZIP_NAME="Premiere-Pro-AI-Chat"
12
+ VERSION="1.0.0"
13
+
14
+ echo "========================================"
15
+ echo " Building ZIP: $ZIP_NAME v$VERSION"
16
+ echo "========================================"
17
+ echo ""
18
+
19
+ # Clean previous build
20
+ rm -rf "$BUILD_DIR/zip-staging"
21
+ mkdir -p "$BUILD_DIR/zip-staging"
22
+
23
+ STAGING="$BUILD_DIR/zip-staging/$ZIP_NAME-v$VERSION"
24
+ mkdir -p "$STAGING"
25
+
26
+ # ---- Copy plugin files ----
27
+ echo "Copying plugin files..."
28
+ mkdir -p "$STAGING/com.ppro.ai.chat"
29
+ cp -R "$PLUGIN_SRC/"* "$STAGING/com.ppro.ai.chat/"
30
+ echo "✓ Plugin files copied"
31
+
32
+ # ---- Create Windows installer (.bat) ----
33
+ cat > "$STAGING/Install-Windows.bat" << 'BAT_EOF'
34
+ @echo off
35
+ REM Premiere Pro AI Chat — Windows Installer
36
+
37
+ setlocal enabledelayedexpansion
38
+
39
+ echo.
40
+ echo ==========================================
41
+ echo Premiere Pro AI Chat - Windows Installer
42
+ echo ==========================================
43
+ echo.
44
+
45
+ set "SCRIPT_DIR=%~dp0"
46
+ set "PLUGIN_SRC=%SCRIPT_DIR%com.ppro.ai.chat"
47
+ set "PLUGIN_NAME=com.ppro.ai.chat"
48
+ set "CEP_DIR=%APPDATA%\Adobe\CEP\extensions"
49
+
50
+ if not exist "%PLUGIN_SRC%" (
51
+ echo [ERROR] Plugin files not found.
52
+ echo Make sure you extracted the ZIP first.
53
+ pause
54
+ exit /b 1
55
+ )
56
+
57
+ REM Create CEP directory
58
+ if not exist "%CEP_DIR%" mkdir "%CEP_DIR%"
59
+
60
+ REM Remove old installation
61
+ if exist "%CEP_DIR%\%PLUGIN_NAME%" (
62
+ echo Removing previous installation...
63
+ rmdir /s /q "%CEP_DIR%\%PLUGIN_NAME%"
64
+ )
65
+
66
+ REM Copy plugin
67
+ echo Installing plugin...
68
+ xcopy /s /e /i /q "%PLUGIN_SRC%" "%CEP_DIR%\%PLUGIN_NAME%"
69
+ echo [OK] Plugin installed to: %CEP_DIR%\%PLUGIN_NAME%
70
+
71
+ REM Enable unsigned extensions (CSXS 9-12)
72
+ echo Enabling unsigned CEP extensions...
73
+ for %%v in (9 10 11 12) do (
74
+ reg add "HKCU\SOFTWARE\Adobe\CSXS.%%v" /v PlayerDebugMode /t REG_SZ /d 1 /f >nul 2>&1
75
+ )
76
+ echo [OK] Debug mode enabled
77
+
78
+ echo.
79
+ echo ==========================================
80
+ echo [OK] Installation complete!
81
+ echo.
82
+ echo Next steps:
83
+ echo 1. Restart Premiere Pro (if running)
84
+ echo 2. Go to: Window ^> Extensions ^> AI Chat
85
+ echo 3. Enter your Claude or Gemini API key
86
+ echo 4. Start chatting!
87
+ echo ==========================================
88
+ echo.
89
+ pause
90
+ BAT_EOF
91
+
92
+ echo "✓ Windows installer created"
93
+
94
+ # ---- Create Windows uninstaller (.bat) ----
95
+ cat > "$STAGING/Uninstall-Windows.bat" << 'UNBAT_EOF'
96
+ @echo off
97
+ REM Premiere Pro AI Chat — Windows Uninstaller
98
+
99
+ set "PLUGIN_NAME=com.ppro.ai.chat"
100
+ set "CEP_DIR=%APPDATA%\Adobe\CEP\extensions"
101
+
102
+ echo.
103
+ echo Uninstalling Premiere Pro AI Chat...
104
+
105
+ if exist "%CEP_DIR%\%PLUGIN_NAME%" (
106
+ rmdir /s /q "%CEP_DIR%\%PLUGIN_NAME%"
107
+ echo [OK] Plugin removed.
108
+ ) else (
109
+ echo Plugin not found - nothing to remove.
110
+ )
111
+
112
+ echo.
113
+ pause
114
+ UNBAT_EOF
115
+
116
+ echo "✓ Windows uninstaller created"
117
+
118
+ # ---- Create macOS installer (.command) ----
119
+ cat > "$STAGING/Install-macOS.command" << 'MAC_EOF'
120
+ #!/usr/bin/env bash
121
+ # Premiere Pro AI Chat — macOS Installer
122
+
123
+ set -e
124
+
125
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
126
+ PLUGIN_NAME="com.ppro.ai.chat"
127
+ PLUGIN_SRC="$SCRIPT_DIR/com.ppro.ai.chat"
128
+ CEP_DIR="$HOME/Library/Application Support/Adobe/CEP/extensions"
129
+
130
+ echo ""
131
+ echo "╔══════════════════════════════════════════╗"
132
+ echo "║ Premiere Pro AI Chat — Installer ║"
133
+ echo "╚══════════════════════════════════════════╝"
134
+ echo ""
135
+
136
+ if [ ! -d "$PLUGIN_SRC" ]; then
137
+ echo "✗ Error: Plugin files not found."
138
+ exit 1
139
+ fi
140
+
141
+ mkdir -p "$CEP_DIR"
142
+
143
+ if [ -d "$CEP_DIR/$PLUGIN_NAME" ] || [ -L "$CEP_DIR/$PLUGIN_NAME" ]; then
144
+ echo "Removing previous installation..."
145
+ rm -rf "$CEP_DIR/$PLUGIN_NAME"
146
+ fi
147
+
148
+ echo "Installing plugin..."
149
+ cp -R "$PLUGIN_SRC" "$CEP_DIR/$PLUGIN_NAME"
150
+ echo "✓ Plugin installed to: $CEP_DIR/$PLUGIN_NAME"
151
+
152
+ echo "Enabling unsigned CEP extensions..."
153
+ for ver in 9 10 11 12; do
154
+ defaults write com.adobe.CSXS.$ver PlayerDebugMode 1 2>/dev/null || true
155
+ done
156
+ echo "✓ Debug mode enabled"
157
+
158
+ echo ""
159
+ echo "════════════════════════════════════════════"
160
+ echo " ✓ Installation complete!"
161
+ echo ""
162
+ echo " Next steps:"
163
+ echo " 1. Restart Premiere Pro (if running)"
164
+ echo " 2. Go to: Window → Extensions → AI Chat"
165
+ echo " 3. Enter your Claude or Gemini API key"
166
+ echo " 4. Start chatting!"
167
+ echo "════════════════════════════════════════════"
168
+ echo ""
169
+ echo "Press any key to close..."
170
+ read -n 1 -s
171
+ MAC_EOF
172
+
173
+ chmod +x "$STAGING/Install-macOS.command"
174
+ echo "✓ macOS installer created"
175
+
176
+ # ---- Create macOS uninstaller ----
177
+ cat > "$STAGING/Uninstall-macOS.command" << 'UNMAC_EOF'
178
+ #!/usr/bin/env bash
179
+ set -e
180
+
181
+ PLUGIN_NAME="com.ppro.ai.chat"
182
+ CEP_DIR="$HOME/Library/Application Support/Adobe/CEP/extensions"
183
+
184
+ echo ""
185
+ echo "Uninstalling Premiere Pro AI Chat..."
186
+
187
+ if [ -d "$CEP_DIR/$PLUGIN_NAME" ] || [ -L "$CEP_DIR/$PLUGIN_NAME" ]; then
188
+ rm -rf "$CEP_DIR/$PLUGIN_NAME"
189
+ echo "✓ Plugin removed."
190
+ else
191
+ echo "Plugin not found — nothing to remove."
192
+ fi
193
+
194
+ echo ""
195
+ echo "Press any key to close..."
196
+ read -n 1 -s
197
+ UNMAC_EOF
198
+
199
+ chmod +x "$STAGING/Uninstall-macOS.command"
200
+ echo "✓ macOS uninstaller created"
201
+
202
+ # ---- Create README ----
203
+ cat > "$STAGING/README.txt" << 'README_EOF'
204
+ Premiere Pro AI Chat Plugin
205
+ ============================
206
+
207
+ An embedded AI chat panel for Adobe Premiere Pro.
208
+ Control your edits with natural language using Claude or Gemini.
209
+
210
+ INSTALLATION
211
+ ============
212
+
213
+ Windows:
214
+ 1. Extract this ZIP file
215
+ 2. Right-click "Install-Windows.bat" → Run as administrator
216
+ 3. Restart Premiere Pro
217
+ 4. Go to: Window → Extensions → AI Chat
218
+
219
+ macOS:
220
+ 1. Extract this ZIP file
221
+ 2. Double-click "Install-macOS.command"
222
+ 3. Restart Premiere Pro
223
+ 4. Go to: Window → Extensions → AI Chat
224
+
225
+ Manual Install (any OS):
226
+ - Copy the "com.ppro.ai.chat" folder to your CEP extensions folder:
227
+ Windows: %APPDATA%\Adobe\CEP\extensions\
228
+ macOS: ~/Library/Application Support/Adobe/CEP/extensions/
229
+ - Enable unsigned extensions:
230
+ Windows: Set registry key HKCU\SOFTWARE\Adobe\CSXS.11 → PlayerDebugMode = "1"
231
+ macOS: Run: defaults write com.adobe.CSXS.11 PlayerDebugMode 1
232
+
233
+ UNINSTALL
234
+ =========
235
+
236
+ Windows: Run "Uninstall-Windows.bat"
237
+ macOS: Double-click "Uninstall-macOS.command"
238
+
239
+ USAGE
240
+ =====
241
+
242
+ 1. Open Premiere Pro
243
+ 2. Go to: Window → Extensions → AI Chat
244
+ 3. Choose Claude or Gemini as your AI provider
245
+ 4. Enter your API key
246
+ 5. Start chatting! The AI can:
247
+ - Query your project (clips, sequences, tracks)
248
+ - Edit your timeline (add clips, effects, transitions)
249
+ - Export sequences
250
+ - And much more
251
+
252
+ REQUIREMENTS
253
+ ============
254
+
255
+ - Windows 10+ or macOS 10.14+
256
+ - Adobe Premiere Pro 2020 (v14.0) or later
257
+ - Claude API key (console.anthropic.com) or
258
+ Gemini API key (aistudio.google.com)
259
+
260
+ SUPPORT
261
+ =======
262
+
263
+ GitHub: https://github.com/ppmcp/premiere-pro-mcp
264
+ Issues: https://github.com/ppmcp/premiere-pro-mcp/issues
265
+ README_EOF
266
+
267
+ echo "✓ README created"
268
+
269
+ # ---- Build ZIP ----
270
+ echo ""
271
+ echo "Building ZIP..."
272
+
273
+ ZIP_PATH="$BUILD_DIR/$ZIP_NAME-v$VERSION.zip"
274
+ rm -f "$ZIP_PATH"
275
+
276
+ cd "$BUILD_DIR/zip-staging"
277
+ zip -r -q "$ZIP_PATH" "$ZIP_NAME-v$VERSION/"
278
+
279
+ ZIP_SIZE=$(du -h "$ZIP_PATH" | cut -f1 | xargs)
280
+
281
+ echo "✓ ZIP built: $ZIP_PATH"
282
+
283
+ echo ""
284
+ echo "========================================"
285
+ echo " ✓ Build complete!"
286
+ echo ""
287
+ echo " File: $ZIP_PATH"
288
+ echo " Size: $ZIP_SIZE"
289
+ echo " Works on: macOS + Windows"
290
+ echo "========================================"
291
+ echo ""