SAM is an AI-assisted video editor and asset workspace built with Electron, React, and Remotion. It combines a timeline-based editor with an OpenCode-driven agent, local SQLite storage, and FFmpeg-backed analysis.
flowchart TB
subgraph renderer [Renderer - React]
VideoEditor[VideoEditor + Remotion Player]
AgentChat[AgentChat]
end
subgraph main [Main - Electron]
IPC[IPC handlers]
Bridge[HTTP bridge :7824]
Agent[OpenCode agent + SSE]
DB[(SQLite)]
FFmpeg[FFmpeg / analysis queue]
end
VideoEditor --> IPC
AgentChat --> IPC
Agent --> renderer
Bridge --> VideoEditor
Bridge --> IPC
IPC --> DB
IPC --> FFmpeg
- Node.js (LTS recommended)
- pnpm for installs (
corepack enableornpm install -g pnpm)
pnpm install
cp .env.example .env
# Edit .env: at minimum set GEMINI_API_KEY and PEXELS_API_KEY where needed.
pnpm startSee .env.example for optional keys (Tavily, ElevenLabs, Anthropic, OpenAI). Do not commit .env—it is gitignored.
| Command | Description |
|---|---|
pnpm start |
Run the Electron app in development |
pnpm package |
Package the app |
pnpm make |
Create distributables (platform-specific) |
pnpm lint |
ESLint |
pnpm test |
Vitest |
A Next.js marketing site lives under site/. See site/README.md for how to run and build it.
MIT — see the repository metadata for the full license text.