How palmier-io/palmier-pro works
Palmier Pro is a single macOS Swift application organized as a set of feature modules under one app target. It is a native video editor, not a web app, and it runs locally on Apple Silicon with a UI built from SwiftUI/AppKit-style views, view models, and window controllers.
The top-level app shell lives in App/ and is responsible for lifecycle, global app state, notifications, menu wiring, and update handling. main.swift boots the app, AppDelegate and AppState coordinate startup and shared state, and Updater plus Changelog manage in-app release/update behavior.
The core user workflow is project-centric. Project/ handles home/welcome screens, project cards, registry, sample projects, and project settings mismatch handling. Models/VideoProject.swift and related model types define the persisted project structure that the editor, exporter, agent, and MCP server all operate on.
The main editor surface is split into three major interaction zones: the timeline, preview, and inspector/media side panels. Editor/, Timeline/, Inspector/, MediaPanel/, Preview/, and Toolbar/ together form the editing workspace, with EditorViewModel.swift acting as the central state coordinator for tracks, clips, keyframes, clipboard, ripple edits, linking, relinking, project settings, and preview tabs.
The timeline is where most editing state changes happen. Components such as TimelineView, ClipRenderer, SnapEngine, OverwriteEngine, and RippleEngine handle clip placement, snapping, drag state, range selection, and destructive vs. ripple-style edits. The preview subsystem renders the current timeline state through CompositionBuilder, TimelineRenderer, VideoEngine, and overlay views for crop/transform/text interactions.
Media is modeled separately from timeline edits. Models/MediaAsset, MediaFolder, MediaManifest, and MediaResolver describe imported content and how it is found on disk; MediaPanel/ provides browsing, search, drag-and-drop, and folder tiles; StoragePane and related settings govern local storage behavior. This boundary keeps asset management distinct from timeline composition.
AI generation is a first-class subsystem. Generation/ contains model catalogs, cost estimation, backend selection, and submission types for image, audio, music, and video generation. GenerationService and the submission types bridge the editor UI to a backend, while Generation/Edit covers AI-assisted edit actions such as trim extraction and submitter logic. The README makes clear that the generative processing itself is the closed-source part of the product.
The in-app agent is another major subsystem. Agent/ provides the chat UI, session storage, mention handling, prompt/tool orchestration, and client implementations. It supports two external agent backends through AnthropicClient and PalmierClient, and the agent panel is wired into editor/project state so it can manipulate the same timeline the user sees.
Palmier Pro exposes its local editor to external agents through an MCP server boundary. Agent/MCP/MCPHTTPServer.swift and MCPService.swift serve an HTTP MCP endpoint on 127.0.0.1:19789/mcp, and the app bundles a Claude Desktop extension manifest under Resources/MCPB plus a separate mcpb/server package. This means external tools like Claude Code, Codex, Cursor, or Claude Desktop can call into the app while it is running.
The agent’s capabilities are implemented as explicit tools rather than free-form access. Agent/Tools/ defines the tool schema, instructions, results, and concrete tool executors for searches, captions, folders, timeline inspection, text extraction, import/generate operations, and short ID helpers. These tools operate on editor/project state and are the bridge between natural-language requests and deterministic timeline mutations.
Search and transcription are separate local intelligence layers. Search/ builds an embedding-based visual search index using a model downloader, frame sampler, visual embedder, and query engine; Transcription/ provides transcript caching and transcript search. These systems feed both the media panel and the agent/tooling so clips can be found semantically, not just by filename.
Export is a distinct output boundary. Export/ includes a project exporter and XML exporter, and tests indicate round-tripping plus composition generation are important guarantees. This suggests the app can serialize the project for interchange and also render or package it for downstream video workflows.
Account and backend integration are isolated from the editor core. Account/ manages login, credit summaries, top-off, backend configuration, and identity/account UI; GenerationBackend and the agent clients are the main consumers of this configuration. In practice, the free editor path is local-first, while AI generation requires authenticated backend access.
Cross-cutting support lives in utility and infrastructure modules. Utilities/ provides disk caching, keychain storage, logging, async throttling, formatting, and bundled font support; Telemetry/ tracks usage; Help/ and Settings/ expose onboarding, shortcuts, privacy, model, storage, notification, and agent configuration. scripts/, mcpb/, and .github/workflows/ci.yml show the project is built and packaged as a distributable macOS app with CI, release automation, and MCP desktop-extension packaging.
Overall, the architecture is a local native editor with three major external boundaries: a closed generative AI backend, a local MCP server for agent integration, and the user’s local filesystem/media library. Most feature modules feed one shared project/timeline state, which is the central data model that everything else reads from or mutates.
Main entry points: EditorViewModel.swift Editor state · VideoProject.swift Video project · ToolExecutor.swift Agent tools · AgentService.swift Agent
Components 30
App shell
Lifecycle, global state, menus, updates, and app startup.
- App entry · Bootstraps the macOS application.
Sources/PalmierPro/App/main.swift - App delegate · Coordinates startup and lifecycle events.
Sources/PalmierPro/App/AppDelegate.swift - App state · Global application state and wiring.
Sources/PalmierPro/App/AppState.swift - Main menu · Builds app menu commands and actions.
Sources/PalmierPro/App/MainMenu.swift - Updater · Handles in-app update checks and application of releases.
Sources/PalmierPro/App/Updater.swift - Changelog · Loads and presents release history.
Sources/PalmierPro/App/Changelog.swift
Projects
Welcome flow and project registry around the persisted project model.
- Project registry · Tracks projects and home screen entries.
Sources/PalmierPro/Project/ProjectRegistry.swift - Video project · Persisted project structure shared across editor, export, agent, and MCP.
Sources/PalmierPro/Project/VideoProject.swift - Home screen · Welcome, project cards, sample projects, and mismatch handling.
Sources/PalmierPro/Project/HomeView.swift
Editor workspace
Core editing surface and timeline mutation logic.
- Editor state · Central coordinator for timeline, clips, keyframes, clipboard, ripple, linking, and preview tabs.
Sources/PalmierPro/Editor/ViewModel/EditorViewModel.swift - Editor shell · Main editor surface and window framing.
Sources/PalmierPro/Editor/EditorView.swift - Timeline · Clip placement, snapping, drag state, and range selection.
Sources/PalmierPro/Timeline/TimelineView.swift - Edit engines · Overwrite and ripple edit behavior for destructive and non-destructive changes.
Sources/PalmierPro/Editor/OverwriteEngine.swift - Inspector · Text, keyframes, generation references, and clip property editing.
Sources/PalmierPro/Inspector/InspectorView.swift
Media and preview
Asset browsing, search, transcription, and playback composition.
- Preview · Composition building, timeline rendering, and overlay interaction.
Sources/PalmierPro/Preview/PreviewView.swift - Render pipeline · Builds compositions, normalizes media, and renders the current timeline state.
Sources/PalmierPro/Preview/CompositionBuilder.swift - Media panel · Browsing, search, drag-and-drop, captions, and folder tiles.
Sources/PalmierPro/MediaPanel/MediaPanelView.swift - Media model · Imported assets, folders, manifests, and on-disk resolution.
Sources/PalmierPro/Models/MediaAsset.swift - Visual search · Embedding-based local semantic search over media frames.
Sources/PalmierPro/Search/SearchIndexCoordinator.swift - Transcription · Transcript caching and transcript search for media and agent tools.
Sources/PalmierPro/Transcription/Transcription.swift
AI systems
Generation and agent subsystems, including MCP exposure.
- Generation · Model catalog, cost estimation, backend selection, and submission types.
Sources/PalmierPro/Generation/GenerationService.swift - AI edits · AI-assisted edit actions such as trim extraction and submitter orchestration.
Sources/PalmierPro/Generation/Edit/EditSubmitter.swift - Agent · Chat UI, sessions, mentions, prompt/tool orchestration, and client backends.
Sources/PalmierPro/Agent/AgentService.swift - MCP server · Local HTTP MCP endpoint and desktop extension packaging.
Sources/PalmierPro/Agent/MCP/MCPService.swift - Agent tools · Explicit tools that inspect and mutate editor state deterministically.
Sources/PalmierPro/Agent/Tools/ToolExecutor.swift
Support
Cross-cutting settings, account, export, telemetry, and utilities.
- Account · Login, credits, top-off, backend configuration, and identity UI.
Sources/PalmierPro/Account/AccountService.swift - Export · Project exporter and XML export for interchange and downstream workflows.
Sources/PalmierPro/Export/ExportService.swift - Settings · Application settings panes for account, agent, models, privacy, storage, and notifications.
Sources/PalmierPro/Settings/SettingsView.swift - Telemetry · Cross-cutting usage instrumentation.
Sources/PalmierPro/Telemetry/Telemetry.swift - Utilities · Caching, keychain, logging, formatting, and bundled fonts.
Sources/PalmierPro/Utilities/Log.swift
Connections 39
- App entry → App delegate: launches · App entry hands off lifecycle control.
- App delegate → App state: initializes · Creates and maintains shared app state.
- App delegate → Main menu: wires · Connects app commands and menu actions.
- App delegate → Updater: checks updates · Startup and foreground flows trigger update handling.
- Updater → Changelog: reads · Uses release notes for update presentation.
- App state → Project registry: tracks · Holds project-level navigation and selection state.
- Project registry → Video project: loads · Registry manages persisted project records.
- Home screen → Project registry: surfaces · Home UI presents the project registry.
- Home screen → Video project: creates · Welcome and sample flows open or create projects.
- Editor shell → Editor state: binds · Editor UI is driven by the central view model.
- Editor state → Video project: mutates · View model reads and updates the shared project model.
- Editor state → Timeline: coordinates · Timeline interactions flow through editor state.
- Editor state → Inspector: drives · Inspector state derives from current selection and edits.
- Editor state → Preview: feeds · Preview reflects current timeline and selection state.
- Editor state → Media panel: connects · Media browser actions affect the editor workspace.
- Timeline → Edit engines: uses · Timeline gestures dispatch to edit engines.
- Edit engines → Video project: rewrites · Edit engines transform the persisted timeline/project data.
- Preview → Render pipeline: renders through · Preview UI delegates composition and frame generation.
- Render pipeline → Video project: reads · Rendering is built from project timeline state.
- Media panel → Media model: browses · Media browser is organized around imported assets and folders.
- Visual search → Media panel: powers · Semantic search feeds the media browser.
- Visual search → Utilities: caches · Search relies on shared local caching and loading utilities.
- Transcription → Media panel: feeds captions · Transcript data supports media browsing and caption workflows.
- Generation → Account: uses backend · Authenticated backend selection and credits inform generation.
- AI edits → Generation: submits · AI edit actions are prepared and sent through generation services.
- Agent → Agent tools: orchestrates · Agent chat uses explicit tools for deterministic actions.
- Agent → Generation: requests · Agent can invoke generation-backed capabilities.
- Agent → Video project: operates on · Agent manipulates the same project and timeline as the editor.
- MCP server → Agent: exposes · MCP endpoint bridges external clients into the app.
- MCP server → Agent tools: invokes · External tool calls execute through the tool layer.
- Agent tools → Editor state: mutates · Tools coordinate with editor state for timeline changes.
- Agent tools → Visual search: queries · Tooling can perform semantic search over media.
- Agent tools → Transcription: queries · Tooling can access transcripts and transcript search.
- Export → Video project: serializes · Export reads the project model for interchange/output.
- Settings → Account: configures · Settings exposes account and backend preferences.
- Settings → Generation: configures · Model and generation preferences are surfaced in settings.
- Telemetry → Agent: observes · Usage tracking captures agent activity.
- Telemetry → Generation: observes · Usage tracking captures generation usage.
- Utilities → Account: supports · Shared utilities back secure storage and formatting.