This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm start # Run the app in development
npm run dist:win # Build Windows installer (NSIS + ZIP)
npm run dist:linux # Build Linux packages (AppImage + DEB)
npm run dist:all # Build both platformsNo test suite, linter, or transpilation step exists. Plain JavaScript runs directly in Electron.
- Update version in
package.json - Commit and tag:
git tag v2.x.x git push && git push --tags— triggers GitHub Actions to build and publish a release
This is a single-page Electron desktop app for cutting video clips with FFmpeg. No React/Vue/TypeScript — vanilla JS + Bootstrap 3 + jQuery.
Process model:
main.js— Electron main process: GPU detection, FFmpeg spawning viafluent-ffmpeg, IPC handlers, auto-updaterrenderer.js— Thin IPC bridge that exposeswindow.electronAPIto the rendererpreload.js— Context bridge (currently not active;renderer.jsis used instead vianodeIntegration: true)index.html— Entire UI in one HTML file; loads Bootstrap, jQuery, and app scriptsjs/controller.js— All UI logic: video playback, segment management, drag-drop, processing modaljs/core_functions.js— Shared utilities: time formatting, validation, file helpers
Core data flow:
- User loads a video → HTML5
<video>element inindex.html controller.jsmanages the segment list (start/end timestamps per segment)- On "Process" →
window.electronAPI.processVideo()→ IPC tomain.js main.jsspawns FFmpeg to cut/merge segments or produce GIF- Progress events returned via
ffmpeg-progressIPC channel back to the renderer
FFmpeg binaries are bundled at build time via ffmpeg-installer and ffprobe-installer npm packages; main.js resolves the correct binary path at runtime.
Auto-updates use electron-updater checking GitHub releases.