OpenGravity: A Vanilla JS WebContainer IDE with AI Agent Loop
Build a lightweight vanilla JS IDE using WebContainer API and xterm.js; keep API key in localStorage.
Test the demo; fork the repo; experiment with adding UI components.
Summary
The author introduces OpenGravity, an open‑source, lightweight IDE built entirely with vanilla JavaScript, HTML, and CSS, intentionally avoiding any build tools or dependencies. It leverages the WebContainer API to provide a real, in‑browser Linux environment for running shell commands, installing dependencies, and editing files, while xterm.js supplies a terminal emulator. The AI agent can proactively start projects and edit files, but the UI remains in an alpha state with hard‑coded dropdowns and buttons.
The project stores the Gemini API key in localStorage, keeping it client‑side, and is available for early experimentation on the live demo at https://opengravity.pages.dev. The author encourages community contributions to flesh out the UI and agent loop, noting that the foundation of a vanilla‑JS + WebContainer IDE is strong and could inspire further innovation. The repo is open source on GitHub, and the demo prompts for a Gemini key on load.
Key changes
- Uses WebContainer API to provide an in‑browser Linux environment.
- Integrates xterm.js for terminal emulation.
- Stores Gemini API key in localStorage, keeping it client‑side.
- AI agent can start projects and edit files, but UI is alpha with hard‑coded placeholders.
- No build step or dependencies; pure vanilla JS, HTML, CSS.
- Demo available at https://opengravity.pages.dev, prompting for Gemini key on load.
- Project is open source on GitHub, encouraging community contributions.
- Early release aims to inspire further innovation in vanilla‑JS WebContainer IDEs.