OpenPatchEdit Markdown in VS Code with the AI you choose. Select text. Describe the edit. Get a patch in place. OpenPatch is a VS Code extension that rewrites selected Markdown without leaving your editor. Select a passage, tell it what to change, and OpenPatch replaces that selection with a streamed AI patch. No chat copy-paste. No moving text into a browser, waiting on a conversation, then pasting an answer back into your file. Your edit happens where you write.
What you do
It is that simple. Automatic patching opens the instruction prompt when you select text; turn it off if you prefer to run OpenPatch: Patch Selected Markdown yourself from the Command Palette. InstallInstall OpenPatch from the Visual Studio Marketplace, or download a release Bring your own AIOpenPatch works with OpenAI-compatible Chat Completions endpoints. Bring the provider, model, and API key that fit your work: a hosted API, an internal gateway, or a local model server. Batteries not included. OpenPatch does not include a model, an AI subscription, or a hosted service. You provide the endpoint and, when it needs one, the API key. Your data and AI spend stay under your control. For every patch, OpenPatch sends your instruction, selected Markdown, and the active Markdown document as context to the endpoint you configure. Use an endpoint you trust and avoid selecting content you would not share with its operator. Set it upIn VS Code Settings, configure these three essentials:
Then run OpenPatch: Set API Key to store an optional bearer key in VS Code SecretStorage. If your endpoint does not require a key, leave it unset. Useful controls
For contributorsOpenPatch requires Node.js 22 or newer.
Read CONTRIBUTING.md before opening a pull request. Bug reports and feature ideas belong in GitHub Issues. For support, security reporting, and release information, see SUPPORT.md, SECURITY.md, and RELEASING.md. LicenseOpenPatch is available under the MIT License. |
