SmartReader is a powerful Safari Web Extension for macOS and iOS that uses AI to summarize web content instantly. By integrating Readability and ChatGPT API, it helps users quickly grasp the core ideas of any webpage.
- AI Summarization: Generate concise summaries and key points for the current webpage using the ChatGPT API.
- Readability Integration: Uses
Readability.jsto extract the main content, removing ads and distractions. - Multi-Platform: Seamlessly works on both macOS and iOS Safari.
- Customizable Modes:
- Mini Icon: A subtle floating icon to trigger summaries.
- Auto Summary: Automatically generates summaries when you visit a page (configurable).
- Hidden: Keep the UI clean until you need it.
- Custom AI Configuration: Fully customizable API URL, Key, Model, and Prompts.
- Markdown Support: Beautifully rendered summaries using
marked.js.
iOS (App)/macOS (App): Native wrappers for the extension on Apple platforms.Shared (Extension): The core logic of the Safari Web Extension, including:Readability.js: Content extraction logic.chatgpt-api.js: AI interaction and streaming response handling.popup.html/js: The main UI for the extension.settings.html/js: Configuration page for API settings.
- macOS with Xcode installed.
- An OpenAI API Key (or a compatible ChatGPT API provider).
- Clone this repository.
- Open
SmartReader.xcodeprojin Xcode. - Select the target (
SmartReader (macOS)orSmartReader (iOS)). - Build and Run the project.
- In Safari, go to
Settings>Extensionsand enable SmartReader.
Before using the extension, you need to configure your AI settings:
- Click the SmartReader icon in Safari and select Open Settings.
- Enter your API URL, API Key, and Model (e.g.,
gpt-3.5-turboorgpt-4). - (Optional) Customize the System Text and Prompt to change how the AI summarizes content.
- Click Check to verify your settings, then Save.
Once configured, simply click the AI Summary button in the extension popup or use the trigger icon on any webpage to generate a summary. The summary will include:
- A brief one-sentence overview.
- Multiple key points with decorative emojis.
Note: By default, the AI is prompted to translate the summary into Traditional Chinese regardless of the source language.
- Readability.js
- marked.js
- OpenAI API
- Apple Safari Web Extensions API
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.