AI Code Stitcher & Stitch Viewer
NEW - SUPPORT FOR GDSCRIPT (GODOT)
MILESTONE VERSION 3.0 - Single block markdown, multi-file processing! Update your codebase from a single clipboard copy.
Welcome to AI Code Stitcher, the ultimate bridge between Large Language Models (like ChatGPT, Claude, or DeepSeek) and your local codebase.
When working with AI, copying and pasting modified functions, hunting for the right insertion points, and fixing indentation can break your flow. This tool suite completely automates that process. It watches your clipboard, instantly finds where the AI's code belongs in your local files, and seamlessly "stitches" it in.
This suite is divided into two deeply integrated applications:
- Code Stitcher (The Orchestrator)
- Stitch Viewer (The Visualizer & Editor)
example_basic.mp4
1. AI Code Stitcher
The background orchestrator that does the heavy lifting.
The Stitcher runs as an interactive terminal application. You tell it which folders to monitor, and it builds a lightweight index of your codebase.
How it Works
- Clipboard Monitoring: When "Armed," the Stitcher actively watches your clipboard for code.
- Intelligent Parsing: When you copy a response from an LLM, the Stitcher parses it. It strips away the conversational text (e.g., "Here is the updated code:") and isolates the actual code blocks.
- Context Resolution: It figures out what the code is. Is it a Unified Diff? An Aider Patch? A single updated class? A brand new function?
- Auto-Stitching: It scans your local files, finds the exact location the code belongs, perfectly aligns the indentation, safely removes any
// ... existing code ...hallucinations, and writes the file.
Key Features
- Format Agnostic: Understands pure drop-in replacements, unified diffs, Aider patches, and headless snippets.
- Auto-Healing: Automatically fixes mangled brackets, missing imports, and broken indentation caused by LLMs.
- Instant Rollbacks: Maintains an internal
.baksystem. PressCtrl+Zin the terminal to instantly undo the last patch, andCtrl+Yto redo it.
Essential Hotkeys
F9- Arm / Disarm: Toggles clipboard monitoring on and off.Shift + F9- Tactical Arm: Intercepts the clipboard but pauses to let you manually choose how and where to inject the code.F8- Filelock: Locks the AI's output to a specific file, preventing the Stitcher from guessing where it belongs.F7- Compose: Opens a UI to draft your next prompt to the LLM, allowing you to easily attach local files as context.F11- Launch Stitch Viewer.
2. AI Stitch Viewer
The graphical interface for reviewing, reverting, and tweaking AI edits.
Because AI isn't perfect, you need a way to review exactly what the Stitcher just did to your files. The Stitch Viewer is a blazing-fast, Pygame-based UI that provides a Git-like historical view of your files without needing Git commits.
How it Works
When launched (usually via F11 from the Stitcher), it reads the hidden ep_backups folder generated by the Stitcher. It displays your codebase's history in a clean side-by-side diff layout.
Key Features
- Side-by-Side Diff: Instantly see the historical version (Old) next to your current live file (New). Deletions are highlighted in red, additions in green.
- Granular Reverts: In the center gap between the two files, you'll see arrows (
→) and crosses (×). Click them to instantly reject a specific AI hallucination or restore a chunk of your original code. - Live Text Editor: Click "Edit Current File" at the top right to smoothly transition the right-hand panel into a full text editor. You can fix typos, adjust variables, and press
ESCto save the changes directly to disk. - RegEdit-style History Tree: The left panel organizes your files chronologically. Expand a file to see every single AI injection ("Run") applied to it during your session.
- Context View: Click
[~] Contextto collapse the entire file and view a highly condensed summary card of only the specific functions that were changed.
https://aicodestitcher.com for more info
Please note that Windows Defender SmartScreen may flag this program/install as 'potentially dangerous'. This is due to the tool being new and a limited install base. We promise there is no spy/malware in this program.
Users agree to all usual software T&C by downloading and installing this tool subject to all usual boilerplate blah blah blah .