A cross-platform floating desktop assistant powered by OpenAI's GPT models, built with Electron.js. Chat with an AI assistant, execute commands, and get quick answers—all from a sleek, always-on-top widget.
- 🤖 AI Chat: Conversational AI powered by OpenAI GPT-3.5
- 🪟 Floating Widget: Draggable, resizable, always-on-top window
- 💬 Chat History: Persistent conversation history stored locally
- 🎨 Customizable Styles: Choose from 5 different assistant personalities
- ⚡ Quick Commands:
open [url]- Open any website in your default browsersummarize clipboard- AI-powered summarization of clipboard contentcalculate [expression]- Instant math calculations
- 🎯 Minimal UI: Clean, modern interface with dark theme
- 🔒 Secure: Context isolation with proper IPC communication
- Node.js (v16 or higher)
- npm or yarn
- OpenAI API key (Get one here)
-
Clone or navigate to the project directory
-
Install dependencies
npm install
-
Run the application
npm start
-
Launch the app using
npm start -
Set your OpenAI API key:
- Click the settings icon (⚙️) in the title bar
- Paste your OpenAI API key
- Click "Save Key"
-
Start chatting! Type your message and press Enter or click the send button
Simply type your question or message and press Enter:
What's the weather like today?
Explain quantum computing in simple terms
Write a haiku about coding
open google.com
open https://github.com
open youtube.com
First copy some text to your clipboard, then type:
summarize clipboard
summarize
calculate 2 + 2
calc 15 * 7 + 3
calculate (100 - 25) / 5
Choose from 5 different assistant personalities in settings:
- Helpful Assistant - Balanced, clear, and informative
- Concise & Direct - Brief answers without fluff
- Friendly & Casual - Warm and conversational
- Professional - Formal and well-structured
- Creative & Fun - Playful and engaging
Access settings via the ⚙️ icon:
- API Key: Set or update your OpenAI API key
- Assistant Style: Change the AI's response personality
- Always on Top: Toggle window stay-on-top behavior
- Clear History: Remove all chat history
- Drag: Click and drag the title bar to move the window
- Resize: Drag window edges to resize
- Minimize:
-button to minimize - Close:
×button to close the app - Settings:
⚙️button for configuration
clippy-ai-assistant/
├── main.js # Electron main process
├── preload.js # IPC bridge (secure communication)
├── index.html # Application UI structure
├── styles.css # UI styling
├── renderer.js # Frontend logic and event handlers
└── package.json # Project dependencies and scripts
- Context Isolation: Enabled for security
- No Node Integration: Renderer process isolated from Node.js
- Secure IPC: Communication via contextBridge
- Local Storage: API key and chat history stored locally
-
Keyboard Shortcuts:
Enterto send messageShift + Enterfor new line in input
-
Chat History: Your conversations are automatically saved and restored when you reopen the app
-
Token Limits: Responses are limited to 500 tokens to keep them concise
-
Context Window: Only the last 10 messages are sent to the API for context
To run in development mode with DevTools:
npm run devTo package the app for your platform, you can use electron-builder or electron-forge:
-
Install electron-builder:
npm install --save-dev electron-builder
-
Add build scripts to
package.json:"scripts": { "build": "electron-builder" }
-
Build the app:
npm run build
- Ensure your API key starts with
sk- - Check that you have credits in your OpenAI account
- Verify the key has proper permissions
- Check if the window is minimized
- Try restarting the application
- Ensure no other instances are running
- Verify the exact command syntax
- Check the status bar for error messages
- Ensure the API key is set for summarize commands
MIT License - feel free to use this project for personal or commercial purposes.
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
Potential features for future versions:
- Multiple AI model support (GPT-4, Claude, etc.)
- Custom keyboard shortcuts
- Voice input/output
- File attachment support
- Multi-window support
- Plugin system for custom commands
- Theme customization
Built with ❤️ using Electron.js and OpenAI