A VS Code-like IDE built with Electron, Monaco Editor, and AI-powered coding assistance.
- ✅ Electron app with Monaco Editor
- ✅ File management (create, open, save, delete)
- ✅ Code execution (JavaScript, Python)
- ✅ Integrated terminal (fallback and xterm.js)
- ✅ File explorer with context menus
- ✅ AI Chat sidebar (Ctrl+L to toggle)
- ✅ Groq API integration for code generation
- ✅ Automatic file creation in
ai-processingfolder - ✅ Context-aware code assistance
- ✅ Support for multiple programming languages
npm installThe AI features use a Python script to handle API calls:
cd ai-processing
pip install -r requirements.txtOr on Windows, run:
cd ai-processing
install_dependencies.batThe API key is already configured in ai-processing/.env!
If you need to update it:
- Edit
ai-processing/.env - Update the
GROQ_API_KEYvalue - Optionally configure the model:
GROQ_API_KEY=your_actual_api_key_here LLM_MODEL=llama3-70b-8192 LLM_PROVIDER=groq
🔍 Test the AI integration:
cd ai-processing
python groq_api.py "write a hello world in python"- The API key is only accessed in the main process (Node.js), never exposed to the renderer
- Never commit API keys to git
- Use user-scope environment variables for better security
npm start- File Management: Use the sidebar to create, rename, delete files/folders
- Code Editing: Full Monaco editor with syntax highlighting
- Terminal: Integrated terminal for running commands
- Code Execution: Use the Run button or Ctrl+R
- Open AI Chat: Press
Ctrl+Lto toggle the AI sidebar - Ask Questions: Type natural language prompts like:
- "Create a Python hello world"
- "Fix this JavaScript function"
- "Add error handling to this code"
- "Explain what this code does"
- Code Generation: The AI will generate code and automatically:
- Create files in the
ai-processingfolder - Open the generated file in the editor
- Suggest appropriate filenames based on content
- Create files in the
Ctrl+L- Toggle AI chat sidebarCtrl+S- Save current fileCtrl+R- Run current fileCtrl+Enter(in AI chat) - Send messageEscape- Close modals/AI chat
cursor-app/
├── src/
│ ├── index.html # Main UI
│ ├── styles.css # All styling
│ └── renderer.js # Frontend logic
├── workspace/ # User files
├── ai-processing/ # AI-generated files
├── index.js # Main Electron process
├── preload.js # IPC bridge
└── package.json
- User types prompt in AI chat sidebar
- Current editor content + prompt sent to main process
- Main process calls Groq API with structured prompts
- Response parsed for code blocks and explanations
- Generated code saved to
ai-processing/folder - File automatically opened in editor
- Groq: llama3-70b-8192 (default), mixtral-8x7b-32768
- Configure via
LLM_MODELenvironment variable
- API key never exposed to frontend
- All AI requests go through main process
- Generated files isolated in
ai-processingfolder - Error handling for API failures
- Graceful fallback when API key is missing
- Modify the
ask-aihandler inindex.js - Add provider-specific API calls
- Update environment variable documentation
Edit the system prompt in index.js around line 520 to change how the AI responds.
- Check if
GROQ_API_KEYis set:echo $env:GROQ_API_KEY - Restart the application after setting environment variables
- Check console for API error messages
- Verify API key is valid at Groq Console
- On Windows, uses
cmd.exeby default - For better experience, ensure Node.js and Python are in PATH
- App creates workspace and ai-processing folders automatically
- If file operations fail, check folder permissions
This is a learning project implementing a Cursor-like IDE. Feel free to extend features:
- Add more AI providers (OpenAI, Anthropic)
- Implement code completion
- Add debugging features
- Enhance terminal integration
MIT License - Feel free to use and modify for learning purposes.