Skip to content

Commit 6b460c9

Browse files
add the feature for collab (in dev, not ready for use yet)
1 parent 09388ab commit 6b460c9

50 files changed

Lines changed: 4187 additions & 9776 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 127 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Icon](icon/icon.ico)
44

5-
**🌈 Create mathematical animations visually with the power of Python, AI, and Production-Grade Type Safety.**
5+
**🌈 Create mathematical animations visually with the power of Python, AI, and real-time collaboration.**
66

77
---
88

@@ -22,161 +22,180 @@
2222
### 📦 VGroup Utility
2323
- Select Mobject nodes → click **Create VGroup** in the **VGroups** tab
2424
- VGroup code automatically generated: `group_1 = VGroup(circle_1, square_1)`
25-
- Groups shown in expandable tree view
25+
- Groups shown in expandable tree view with source badges (canvas / AI / snippet / GitHub)
26+
- Full member management: add, remove, highlight on canvas, copy code
2627

27-
### 🤖 Gemini AI Code Generation
28-
- Describe animations in plain English — AI generates Manim code
29-
- AI code parsed into editable nodes with correct wiring
30-
- Streaming responses with real-time feedback
31-
32-
### 🎙️ AI-Powered Voiceover Studio
33-
- Gemini TTS Integration with multi-voice support (Zephyr, Puck, Fenrir, etc.)
34-
- Auto-sync animation duration to audio length
28+
---
3529

36-
### 🐙 GitHub Snippet Loader
37-
- Clone any GitHub repository into `~/.efficientmanim/snippets/`
38-
- Browse `.py` files; double-click to load into AI panel as snippet
39-
- All cloned repos automatically repopulated on startup
30+
## 🤝 Live Collaboration
4031

41-
### ⭐ Recents Panel
42-
- Top-5 most-used Mobjects + top-5 most-used Animations tracked per session
43-
- Persisted to `~/.efficientmanim/usage.json`
44-
- Double-click to instantly add to canvas
32+
EfficientManim supports **real-time multi-user editing** over a local network or on the same machine — no cloud accounts, no third-party services.
4533

46-
### ⌨️ Editable Keybindings
47-
- **Help → Edit Keybindings…** opens the keybindings editor
48-
- Double-click any shortcut to change it
49-
- Duplicate detection; changes persisted to QSettings
34+
### What It Is
35+
Two or more EfficientManim windows share the same node graph live. Every node move, property change, wire add/delete, and scene switch is broadcast as a JSON delta and applied to all connected instances within milliseconds. A 6-digit **PIN** identifies the session — easy to read aloud or paste into chat.
5036

51-
### 📁 Editable Project Name
52-
- Project name textbox in the top-right corner of the window
53-
- Rename your `.efp` file without leaving the editor
37+
### Starting a Session
38+
1. Open your project in EfficientManim.
39+
2. Click **Collaboration → Start Live Collaboration**.
40+
3. A dialog shows your PIN in large, bold text. Share it with collaborators.
41+
4. The toolbar shows a green ● and the active PIN.
5442

55-
### 📦 Portable Project Format (.efp)
56-
- Bundled images, sounds, and videos included
57-
- ZIP-based, cross-platform, easy to share
43+
### Joining a Session
44+
1. Click **Collaboration → Join Collaboration**.
45+
2. Enter the 6-digit PIN.
46+
3. Click **Connect** — your canvas loads the host's full graph and live sync begins.
5847

59-
### 🌓 Dark / Light Themes
60-
- Full dark mode with no white bleed-through
61-
- Switch via the theme button in the corner or Settings
62-
- QSS-based styling with ColorToken system
48+
### Multi-Window (Same Machine)
49+
Run `python main.py` a second time, join via the same PIN — both windows stay in sync.
6350

64-
### 🎨 Manim Class Browser
65-
- 60+ Manim classes in 8 categories (Geometry, Text, Graphs, 3D, Animations, etc.)
66-
- Search bar filters in real-time
67-
- Double-click or drag to add node to canvas
51+
### Network Requirements
52+
- **Same machine:** No setup needed.
53+
- **LAN:** Host firewall must allow the ephemeral TCP port shown in the session dialog.
54+
- **Internet:** Not supported out-of-the-box; use a reverse proxy (e.g. `ngrok`) on the host.
6855

69-
### 🎬 Professional Video Rendering
70-
- Full scene export to MP4/WebM
71-
- Up to 4K resolution, 15–60 FPS, quality presets
56+
📖 Full details: [docs/live_collaboration.md](docs/live_collaboration.md)
7257

7358
---
7459

75-
## 🏠 Home Screen
60+
## 🤖 Gemini AI Integration
7661

77-
Run `python home.py` to see the home screen with recent projects.
78-
Run `python main.py` to skip the home screen and open the editor directly.
62+
### Code Generation
63+
- Describe animations in plain English — AI generates a complete `Scene.construct()` block
64+
- AI code parsed into typed, editable nodes with correct wiring
65+
- Streaming responses with real-time feedback in the AI Assistant dock
66+
67+
### MCP Agent Mode
68+
- Gemini reads the live scene state as JSON and issues typed commands executed directly against the running app
69+
- No merge step — Gemini edits the graph the same way a human would
70+
- Full action log: **Help → MCP Agent → Show Action Log**
71+
72+
### Auto Voiceover Agent
73+
- Analyzes all nodes, writes per-node scripts, generates TTS, attaches audio automatically
74+
- At render time, all segments merge into a synchronized voiceover track
75+
76+
📖 Full details: [docs/ai_features.md](docs/ai_features.md)
7977

8078
---
8179

82-
## ⌨️ Keyboard Shortcuts
80+
## 🎙️ AI Voiceover Studio
81+
- Gemini TTS with six voices: Puck, Charon, Kore, Fenrir, Aoede, Zephyr
82+
- Built-in audio player with play/pause/stop/seek and time display
83+
- Attach audio to any node — duration auto-syncs `run_time=`
8384

84-
| Action | Shortcut |
85-
|--------|----------|
86-
| New Project | `Ctrl+N` |
87-
| Open Project | `Ctrl+O` |
88-
| Save Project | `Ctrl+S` |
89-
| Save As | `Ctrl+Shift+S` |
90-
| Exit | `Ctrl+Q` |
91-
| Undo | `Ctrl+Z` |
92-
| Redo | `Ctrl+Y` |
93-
| Delete Selected | `Del` |
94-
| Fit View | `Ctrl+0` |
95-
| Auto-Layout | `Ctrl+L` |
96-
| Export Code | `Ctrl+E` |
97-
| Copy Code | `Ctrl+Shift+C` |
98-
| Toggle Theme | `Ctrl+T` |
99-
| Edit Keybindings | `Ctrl+,` |
85+
---
10086

101-
All shortcuts are editable via **Help → Edit Keybindings…**
87+
## 🐙 GitHub Snippet Loader
88+
- Clone any GitHub repository and browse its `.py` files
89+
- Double-click to load into the AI panel as a snippet
90+
- VGroup definitions auto-detected and registered
10291

10392
---
10493

105-
## 🛠️ Prerequisites
94+
## ⭐ Recents Panel
95+
- Top-5 most-used Mobjects and Animations by actual insertion count
96+
- Persisted to `~/.efficientmanim/usage.json`
97+
- Double-click to instantly add to canvas
10698

107-
1. **Python 3.10+**
108-
2. **FFmpeg** — for video rendering (must be in PATH)
109-
3. **Git** — optional, for GitHub Snippet Loader
110-
4. **LaTeX** — optional, for local LaTeX rendering
99+
---
111100

112-
## 📦 Installation
101+
## ⌨️ Editable Keybindings
102+
- **Help → Edit Keybindings…** — changes apply instantly, no restart
103+
- Duplicate detection; persisted to `QSettings`
113104

114-
```bash
115-
git clone https://github.com/pro-grammer-SD/EfficientManim.git
116-
cd EfficientManim
117-
pip install -r requirements.txt
118-
python home.py # Full experience with home screen
119-
# or
120-
python main.py # Open editor directly
121-
```
105+
---
122106

123-
Manual install:
124-
```bash
125-
pip install manim PySide6 google-genai pydub requests numpy
126-
```
107+
## 📦 Portable Project Format (.efp)
108+
- ZIP-based: graph JSON + compiled code + all bundled media
109+
- Cross-platform — one file contains everything
110+
📖 Full details: [docs/efp_format.md](docs/efp_format.md)
111+
112+
---
113+
114+
## 🎨 Manim Class Browser
115+
- 60+ Manim classes in 8 categories with real-time search filter
116+
- Double-click or drag to add node to canvas
127117

128118
---
129119

130-
## 📸 Gallery
120+
## 🎬 Professional Video Rendering
121+
- Full scene export to MP4/WebM, up to 4K, 15–60 FPS, four quality presets
122+
- Integrated video player for instant review
131123

132-
### Overview & Setup
124+
---
133125

134-
![Starting up](gallery/1.png)
135-
Launch the application and initialize the workspace.
126+
## ✒️ LaTeX Studio
127+
- Live LaTeX preview via MathPad API
128+
- One-click apply to any `MathTex` or `Tex` node
136129

137-
![Blank node canvas](gallery/2.png)
138-
Start with a clean node canvas, ready for composition and design.
130+
---
139131

140-
![Recents Menu](gallery/3.png)
141-
Quickly access recently opened projects and elements from the Recents panel.
132+
## 🔌 Plugin / Extension System
133+
- Extensions in `~/.efficientmanim/ext/<author>/<name>/`
134+
- Permission-gated: nodes, UI panels, timeline tracks, MCP hooks
135+
📖 Full details: [docs/plugin_api.md](docs/plugin_api.md)
142136

143137
---
144138

145-
### Customization & Rendering
139+
## 🏠 Home Screen
140+
141+
```bash
142+
python home.py # Home screen with recent projects
143+
python main.py # Open editor directly
144+
```
146145

147-
![Tinkering with Nodes](gallery/4.png)
148-
Manipulate nodes interactively to refine workflows and structures.
146+
---
149147

150-
![Searching for elements](gallery/5.png)
151-
Use the search tool to locate elements and components efficiently.
148+
## ⌨️ Keyboard Shortcuts
152149

153-
![GitHub snippets panel](gallery/6.png)
154-
Access GitHub snippets directly for rapid code reuse and integration.
150+
| Action | Shortcut | Action | Shortcut |
151+
|--------|----------|--------|----------|
152+
| New Project | `Ctrl+N` | Fit View | `Ctrl+0` |
153+
| Open Project | `Ctrl+O` | Zoom In | `Ctrl+=` |
154+
| Save Project | `Ctrl+S` | Zoom Out | `Ctrl+-` |
155+
| Save As | `Ctrl+Shift+S` | Auto-Layout | `Ctrl+L` |
156+
| Exit | `Ctrl+Q` | Export Code | `Ctrl+E` |
157+
| Undo | `Ctrl+Z` | Copy Code | `Ctrl+Shift+C` |
158+
| Redo | `Ctrl+Y` | Render Video | `Ctrl+R` |
159+
| Delete Selected | `Del` | Add Play Node | `Ctrl+Shift+P` |
160+
| Select All | `Ctrl+A` | Add Wait Node | `Ctrl+Shift+W` |
161+
| Create VGroup | `Ctrl+G` | Edit Keybindings | `Ctrl+,` |
162+
163+
📖 Full reference: [docs/shortcuts.md](docs/shortcuts.md)
155164

156165
---
157166

158-
### Features in Action
167+
## 📚 Documentation
159168

160-
![Selecting a GitHub snippet](gallery/7.png)
161-
Select a snippet from GitHub to integrate seamlessly into your project.
169+
| Document | Contents |
170+
|---|---|
171+
| [docs/overview.md](docs/overview.md) | Architecture, modules, data flow |
172+
| [docs/setup.md](docs/setup.md) | Installation, requirements, first launch |
173+
| [docs/live_collaboration.md](docs/live_collaboration.md) | PIN sessions, delta sync, network setup |
174+
| [docs/node_reference.md](docs/node_reference.md) | All node types and properties |
175+
| [docs/ai_features.md](docs/ai_features.md) | Code gen, MCP agent, voiceover, LaTeX |
176+
| [docs/shortcuts.md](docs/shortcuts.md) | Full keyboard shortcut reference |
177+
| [docs/efp_format.md](docs/efp_format.md) | Project file format internals |
178+
| [docs/plugin_api.md](docs/plugin_api.md) | Extension / plugin development guide |
179+
| [docs/contributing.md](docs/contributing.md) | Dev setup, code style, PR guide |
162180

163-
![Loading the snippet](gallery/8.png)
164-
Load and insert external code dynamically into the workspace.
181+
---
165182

166-
![Quickly previewing with the handy Preview tab](gallery/9.png)
167-
Preview your work instantly for faster iteration and verification.
183+
## 🛠️ Installation
168184

169-
![Rendered snippet output](gallery/10.png)
170-
View the resulting output, demonstrating final rendering in the node canvas.
185+
```bash
186+
git clone https://github.com/pro-grammer-SD/EfficientManim.git
187+
cd EfficientManim
188+
pip install -r requirements.txt
189+
python main.py
190+
```
171191

172-
### Tiny Demo
192+
**Requirements:** Python 3.10+, FFmpeg (on PATH), Git, LaTeX (for MathTex)
173193

174-
[![Watch Demo](https://img.youtube.com/vi/91sLPCofwFs/0.jpg)](https://youtu.be/91sLPCofwFs)
194+
Full guide: [docs/setup.md](docs/setup.md)
175195

176196
---
177197

178-
Made with lots of ❤️💚💙 by Soumalya a.k.a. @pro-grammer-SD
179-
180-
- 🌿 Legacy Discussion (v1): https://www.reddit.com/r/manim/comments/1qck0ji/i_built_a_nodebased_manim_ide_with_ai_assistance/
198+
## 🌿 About
181199

182-
- 🎯 Latest Discussion (v2): https://www.reddit.com/r/manim/comments/1rhou29/efficientmanim_v2xx_major_update_with_mcp/
200+
© 2026 — Soumalya Das (@pro-grammer-SD) · Co-authored with Bailey Beber
201+
Built with PySide6 · Manim · Google Gemini

collab/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""EfficientManim live collaboration package."""
2+
3+
from .manager import CollaborationManager
4+
5+
__all__ = ["CollaborationManager"]

0 commit comments

Comments
 (0)