A Chrome extension that generates flashcards from selected webpage text using Claude AI, and exports them to Mochi. Entirely vibe-coded, buyer beware.
- Select text on any webpage and generate flashcards with one keyboard shortcut
- Uses Claude AI to create high-quality, concise flashcards
- Edit flashcards before exporting
- Export directly to Mochi
- Clone this repository or download the ZIP file
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" (toggle in the top-right corner)
- Click "Load unpacked" and select the extension directory
- Get a Claude API key from Anthropic Console
- Get a Mochi API key from your Mochi account
- Create a
.env
file in the project root (copy from.env.example
):CLAUDE_API_KEY=sk-ant-your-api-key-here MOCHI_API_KEY=your-mochi-api-key-here
- Start the proxy server:
npm install npm start
- The server must be running whenever you use the extension
- Start the proxy server on your local machine
- Select text on any webpage
- Press
Cmd+Shift+
U (Mac) orCtrl+Shift+U
(Windows) to generate flashcards - Edit flashcards if needed
- Click "Export to Mochi" to send cards to your Mochi account
- You select text in your browser
- The extension captures the selected text
- The proxy server securely manages API keys (stored in the .env file)
- The server sends the text to Claude with a specialized prompt
- Claude creates 1-5 flashcards depending on text complexity
- Cards are returned as structured JSON objects
- You can edit cards before exporting to Mochi
- When exported, cards are formatted specifically for Mochi (front/back format with separator)
API keys are stored securely in the .env
file on your local machine, not in the browser. The browser extension never has direct access to your API keys.
- If you see "Proxy server not running" - make sure you've started the server with
npm start
- If cards fail to generate - check your Claude API key and available credits
- If export fails - check your Mochi API key and connection