Scratch Copilot AI is a powerful Chrome extension that acts as an intelligent assistant for the Scratch editor. It empowers users to create, modify, and control their Scratch projects using natural language through an integrated Gemini AI chat interface.
- Natural Language Coding: Generate complex Scratch block scripts using simple English prompts.
- Automated Asset Management: Automatically create and add sprites, costumes, sounds, and backdrops to your project.
- Smart VM Control: Real-time control of the Scratch VM, including green flag triggers, variable setting, and sprite manipulation.
- Project Inspection: Quickly summarize your current Scratch project state.
- Modern UI: Sleek, dark-themed, and responsive interface with an easy-to-access 🤖 launcher.
- Clone this repository to your local machine.
- Open Chrome and navigate to
chrome://extensions/. - Enable Developer mode in the top-right corner.
- Click Load unpacked and select the directory containing these files.
- Open any Scratch project in the Scratch Editor.
- Click the 🤖 floating button in the bottom-right corner.
- Configure your Gemini API Key in the extension settings panel.
- Start chatting with the AI to begin building your games!
aiClient.js: Integrates with Google's Gemini API to process prompts and output Scratch-compatible JSON.vmController.js: Interfaces directly with the Scratch VM instance to perform actions like creating sprites, adding costumes, and injecting block scripts.ui.js: Manages the visual components, chat interface, and user interactions.content.js: Handles the injection of the extension's scripts into the Scratch editor's main execution context.
This project is licensed under the MIT License - see the LICENSE file for details.