# Repository Briefing: ybouane/melon
> Source: https://repoforai.com/repo/ybouane/melon (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/ybouane/melon
- **Official Docs / Website**: https://melon.surf
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Swift
- **License**: Apache-2.0
- **Engineering Health**: A (86/100 · Maintenance 35/35 · Adoption 11/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v158.0.8127.36-0.9.41 (2026-12-02) — https://github.com/ybouane/melon/releases
- **Review Snapshot**: 2026-12-04
- **Momentum**: 87 ★ total (+11 24h / +87 7d) · 7 forks
- **When to Use**: Best for: Apple silicon developers who switch among local and SSH projects and want browser profiles, previews, terminals and Claude or Codex sessions to stay with each project. Skip if: You need a cross-platform desktop client, depend on VS Code extensions, want an offline model runtime, or are looking for a standalone MCP server or a self-hosted sync backend.

## Overview
```text
### Architecture & Core Mechanics
Melon is a four-layer macOS app, not an Electron shell. The Swift AppKit/SwiftUI layer in macos/ owns windows, tabs, the omnibox and Spaces. It loads MelonEngineProtocol through NSClassFromString. The engine/ overlay builds ungoogled-chromium as Melon.framework, embedding WebContents without Chromium’s Browser or BrowserView so that the native shell owns the browsing UI.

React/Vite tools in apps/ and packages/ each have a separate melon:// origin. An in-process URL loader forwards requests over a Unix socket to the Node/TypeScript Core in core/, carrying the engine-supplied origin. The Core authorizes RPC methods per origin and coordinates the terminal PTY, filesystem, Git, language servers, search and agents. That origin check is a security boundary: a privileged tool tab is not the same execution surface as an ordinary website or a Manifest V3 extension.

### Key Capabilities & Differentiators
A Space binds a local directory or SSH host to a browser profile with separate cookies and site data, a saved split layout and project tools. The built-in toolkit includes a GPU-rendered terminal, Monaco with language servers, Git worktree and pull-request views, and ripgrep search. Tools retain context such as the open file or diff across restarts. Chromium brings Chrome Web Store Manifest V3 extensions, DevTools and WebAuthn to the same workspace.

Claude runs through the official Claude Agent SDK, alongside a Codex integration. Both use the project directory and the user’s own subscription; the app supports inline approvals, images, and resuming sessions started in a terminal. On a remote Space, tools operate against the host, and terminals and agents can stay active after the client disconnects. Remote access uses Noise with pinned server keys and server-side device authorization; the optional end-to-end encrypted account sync is separate from the remote session transport.

### Trade-offs & Limitations
Compared with Chrome, VS Code and a separate terminal, Melon’s concrete benefit is that switching a Space also switches browsing identity, tool layout and working directory. The cost is tighter coupling: the native shell, Chromium overlay and project tooling ship together, and touching engine C++ carries a much heavier build loop than editing a React tool. Monaco with language servers does not establish compatibility with the VS Code extension ecosystem. The desktop distribution also targets Apple silicon; the iPhone companion is not a cross-platform desktop substitute.

Evaluate Melon as a browser and agent workspace rather than as a standalone MCP server. The integration points shown are the Claude Agent SDK and Codex, with your own subscriptions; there is no specified offline model runtime. Optional encrypted sync and remote device approval address different problems and should be evaluated separately. Apache-2.0 covers the repository, but distribution still calls for checking notices and bundled-component terms, and a self-build does not provide a self-hosted sync service.

### Hardware & Deployment Guide
For daily use, install the self-updating app from melon.surf on an Apple silicon Mac; the iPhone app is a companion for opening Spaces and attaching to sessions. Spaces can work without a Melon account. To use a remote host, start with SSH setup and approve devices for subsequent access. Remote traffic does not use a Melon-operated relay; optional cloud discovery stores the server address encrypted.

Source builds require macOS 13+ on Apple silicon, Xcode 16+ (Swift 5.9+), Node.js 22.13+ and pnpm 9. Build the TypeScript workspace with pnpm build, use the scripts in engine/build/ to produce Melon.framework, then assemble the app with tooling/build-app.sh. Budget many hours and tens of gigabytes for the Chromium step. Self-builds omit Melon accounts, sync and traffic to Melon services. Release 0.9.39 expanded cross-device agent continuity and attachment to existing Claude Code and Codex sessions; 0.9.41 added closed-tab history restoration and refined split handling.
```

## Key Capabilities
```text
- Project state: Spaces bind a local or SSH directory to browser tabs, separate site data and saved split layouts.
- Browser engine: An ungoogled-chromium overlay builds Melon.framework, exposing Chromium WebContents to a native Swift shell.
- Tool isolation: Dedicated melon:// origins gate Core RPC calls over a Unix socket rather than a TCP listener.
- Agent sessions: Claude Agent SDK and Codex integrations use the Space’s working directory, with inline approvals and support for resuming terminal-started sessions.
- Remote continuity: Noise encryption, pinned server identity and server-side device authorization protect access to terminals and agents that remain active remotely.
- Optional sync: ChaCha20-Poly1305 records, HKDF-derived keys and HPKE key handoff support encrypted cross-device sync, with per-Space opt-out.
```

## Quick Start / Clone
```bash
# 1. TypeScript: shared packages, the Core and the web tools (a minute or two)
corepack enable && corepack prepare pnpm@9 --activate
pnpm install
pnpm build

# 2. Engine: Chromium as Melon.framework (once, or when engine/ C++ changes; many hours, tens of GB)
cd engine
./build/00-bootstrap.sh --install && ./build/10-sync.sh    # dependencies, then fetch the Chromium source
MELON_INTEGRATE=1 ./build/20-apply.sh && ./build/25-configure.sh
./build/30-build.sh && ./build/35-build-framework.sh       # build Chromium, then link Melon.framework
cd ..

# 3. Assemble, sign and run
./tooling/build-app.sh                       # swift build + embed framework -> dist/Melon.app
MELON_FORCE_ENGINE=1 dist/Melon.app/Contents/MacOS/Melon
```
