melty
The AI code editor where every chat message is a git commit you can revert, branch, or squash
Melty is an AI-powered code editor built on VS Code that makes every AI conversation a first-class git citizen. Instead of copy-pasting code from a chat window, each exchange with the AI assistant becomes a commit in your repository — complete with a generated commit message — so you can revert, branch, or squash AI-generated changes exactly as you would any other code.
At its core, Melty runs a stateful task-and-conversation engine where human and AI turns are modeled as typed ‘Joules’ that drive a deterministic state machine. The AI understands your full codebase by building a context-aware repo map that prioritizes smaller files first to maximize coverage within Claude’s context window, then uses a meta-AI call to automatically suggest which files are relevant to each task.
The editor integrates tightly with your development workflow: it monitors your terminal output, communicates with GitHub to open pull requests directly from the AI session, and generates descriptive commit messages automatically. It supports both Claude Sonnet (via your own Anthropic API key or a Melty proxy) and is designed to extend to additional providers.
Melty was built by a two-person team in 28 days and used Melty itself to write approximately half of its own codebase, serving as a live demonstration of AI-assisted development at scale.
What You Get
- Chat-to-Commit workflow - Every AI-generated code change is automatically staged and committed to git with a generated commit message, making AI edits fully reversible and branchable
- Stateful task sessions - Each coding task maintains its own conversation history, codebase snapshot, and git branch, so context is never lost between messages
- Intelligent codebase awareness - RepoMapV2 builds a prioritized view of your repository that fits within Claude’s context window, and a meta-AI call automatically identifies which files are relevant to each request
- Multi-file editing with XML diff application - The AI proposes SEARCH/REPLACE blocks that are applied across multiple files in parallel using a multi-strategy fallback applicator, with PostHog telemetry tracking success rates
- GitHub pull request creation - GitHubManager uses Octokit to open PRs directly from an active Melty task, pushing the current branch and creating the PR with the session context
- Dual AI mode - Supports a ‘Coder’ mode for code generation with diff application and a ‘Vanilla’ mode for pure chat, selectable per task
Common Use Cases
- Iterative feature development - A developer opens a task, describes a feature in natural language, and Melty generates changes across multiple files and commits each iteration, leaving a clean git history to review or revert
- Refactoring with safety net - An engineer asks Melty to rename a type or restructure a module; the changes are committed immediately so the engineer can
git difforgit revertif anything breaks - Bootstrapping a new project - A solo founder describes an app from scratch; Melty creates files, directories, and commits incrementally so the project has a meaningful history from day one
- Navigating an unfamiliar codebase - A new team member uses Melty’s codebase-aware chat to ask questions about architecture or find where a feature lives, with the repo map giving the AI full project context
Under The Hood
Architecture
Melty is a VS Code fork where all AI-specific logic lives in a purpose-built extension called ‘spectacular’. The extension follows a service-oriented architecture with singleton managers (GitManager, FileManager, GitHubManager, WebviewNotifier, ContextProvider) injected via constructors into the core components. Conversation state is modeled as an explicit graph of typed Joule turns — HumanChat, BotChat, BotCode, HumanConfirmCode — driven by a pure nextJouleType function that makes state transitions deterministic and auditable. Tasks own a conversation, a git branch, and a set of tracked files, cleanly separating the AI session lifecycle from the editor environment. The RPC bridge between the VS Code extension host and the React webview enforces a strict contract: human actions call named RPC handlers, which update task state and trigger bot turns that stream back to the UI.
Tech Stack
The application is built predominantly in TypeScript on an Electron/Node.js runtime, forked from VS Code. AI capabilities are powered by the Anthropic Claude 3.5 Sonnet and Claude 3 Haiku models via the official @anthropic-ai/sdk, with a proxy endpoint on Fly.io for users who prefer not to manage their own API key. The React webview UI uses Radix UI primitives and Tailwind CSS, bundled with Vite. Git operations are handled through VS Code’s built-in git extension API, and GitHub integration uses Octokit. User analytics and telemetry are captured via PostHog. The extension itself is compiled with esbuild while the VS Code base continues to use Gulp with a complex multi-target pipeline.
Code Quality The extension includes targeted unit tests covering diff application strategies, the XML-based diff applicator, context encoding, and the repo map, using VS Code’s built-in test runner. TypeScript is used comprehensively throughout with explicit types, interfaces, and type guards that make the conversation state machine self-documenting. Error handling is explicit in service methods, which are documented as wrapping all public operations in try/catch to return sensible defaults. Naming is consistent and the CHARLIE_README.md captures internal architectural decisions in plain language. The gap in coverage is end-to-end integration tests for full conversation-to-commit flows and the webview UI, which relies on manual testing.
What Makes It Unique Melty’s defining innovation is elevating git commits to the primary unit of AI interaction: every code-generating response produces an actual commit with a generated message, making the entire AI collaboration history inspectable, reversible, and branchable with standard tools. The Joule type system’s explicit state machine ensures that every turn in the conversation has a known type and a determined next state, preventing the undefined behavior common in ad-hoc chat-plus-editor integrations. The RepoMapV2 component maximizes codebase coverage within the LLM’s context window by sorting files by size and doing a two-pass inclusion sweep, while a preliminary meta-AI call pre-selects relevant files before the main task prompt is ever sent. Together these choices push AI-assisted development from ‘helpful chat on the side’ to a fully version-controlled, context-aware pair programming session.
Self-Hosting
Melty is released under the MIT License, which grants broad freedoms: you can use, copy, modify, merge, publish, distribute, sublicense, and sell copies without restriction. The only obligations are preserving the copyright notice and license text. There are no copyleft clauses, so you can use Melty in proprietary projects or internal tools without any code-sharing requirement. The VS Code base it forks from is also MIT-licensed, meaning the entire stack is permissively open.
Running Melty yourself means operating a full Electron desktop application, not a web server. There is no server-side component to deploy or maintain — each developer installs and runs Melty locally. The main operational consideration is API key management: without a personal Anthropic API key, Melty routes requests through a Fly.io proxy (melty-api.fly.dev) maintained by the Melty team, which introduces an external dependency on a startup’s infrastructure. For teams that require data privacy or cost control, configuring each installation with a direct Anthropic API key bypasses the proxy entirely. Updates are manual unless you set up your own build pipeline from source.
As a project that reached public release with a very small team and limited activity since late 2024, there is no commercial cloud tier, no support SLA, and no managed update service. The trade-off versus a managed AI coding assistant like Cursor or GitHub Copilot is significant: you get full MIT freedom and local data control, but you give up active maintenance, enterprise support channels, polished onboarding, and the ongoing model and feature improvements that funded products provide. Teams evaluating Melty should treat it as a research artifact and proof-of-concept rather than a production-supported tool.
Related Apps
Dify
No Code Platforms · AI Development · Developer Tools
Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.
Dify
OtherGodot Engine
Developer Tools · Game Development · Design Tools
Free, MIT-licensed 2D and 3D game engine with one-click multi-platform export and no royalties.
Godot Engine
MITSupabase
Developer Tools · Databases · Search
The open-source Postgres development platform that replaces Firebase with authentication, real-time APIs, edge functions, storage, and vector embeddings — all built on PostgreSQL.