Skip to content

programmersd21/scratch-copilot

Scratch Copilot AI

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.

🚀 Features

  • 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.

🛠 Installation

  1. Clone this repository to your local machine.
  2. Open Chrome and navigate to chrome://extensions/.
  3. Enable Developer mode in the top-right corner.
  4. Click Load unpacked and select the directory containing these files.

⚙ Usage

  1. Open any Scratch project in the Scratch Editor.
  2. Click the 🤖 floating button in the bottom-right corner.
  3. Configure your Gemini API Key in the extension settings panel.
  4. Start chatting with the AI to begin building your games!

🧩 Architecture

  • 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.

⚖ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

✨An AI-powered Chrome extension for Scratch 3.0 that acts as your copilot. Seamlessly generate entire games, inject blocks, and automatically load sprites, sounds, and backdrops from the Scratch library using Gemini AI directly within the editor.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors