π Selectly is an AI-powered browser extension that enhances text selection with intelligent actions. Transform your browsing experience with context-aware text processing powered by Large Language Models (LLMs).
English | δΈζζζ‘£
Harness the power of LLMs to process selected text instantly:
- π Smart Translation: Automatically detect language and translate to your preferred language
- β¨ Text Polishing: Improve expression, clarity, and fluency
- π‘ Content Explanation: Get detailed explanations of concepts and context
- β Grammar Correction: Fix grammar and spelling errors
- π¬ Interactive Chat: Have a conversation about selected text
Quick, practical actions at your fingertips:
- π Quick Search: Search selected text in your preferred search engine
- π Copy: One-click copy to clipboard
- π Open URL: Open selected URLs directly
- π Collect: Save interesting text snippets to your personal collection
- π€ Share: Generate beautiful text cards and share as images
- π Subscription System: Unlock advanced features with flexible plans
- βοΈ Cloud Sync: Sync your data across devices
- π Secure Authentication: OAuth2-based authentication
- π§ Multi-Provider Support: Compatible with OpenAI, Anthropic, DeepSeek, OpenRouter, SiliconFlow, and more
- βοΈ Function Toggle: Enable/disable features as needed
- π Custom Prompts: Personalize prompts for each function
- β Add Your Own: Create custom AI-powered functions
- π Multi-language: Supports English, Chinese, Japanese, Spanish, French, German, and Portuguese
- π¨ Flexible UI: Choose button position (above/below selection)
- Open Chrome browser
- Go to the Selectly Chrome Web Store page
- Click "Add to Chrome"
- Confirm by clicking "Add Extension"
git clone https://github.com/samanhappy/selectly.git
cd selectlypnpm installpnpm devThis starts the development server with hot reload.
- Open Chrome browser
- Navigate to
chrome://extensions/ - Enable "Developer mode" (top-right toggle)
- Click "Load unpacked"
- Select the
build/chrome-mv3-devdirectory
- Click the extension icon in the toolbar
- Navigate to "LLM Config" tab
- Select a provider and enter your API key
- Click "Test Connection" to verify
- Select your preferred model
Select any text on a webpage, and action buttons will appear automatically!
You can create custom AI-powered functions:
Function Key: code_review
Prompt: Please review the following code and provide suggestions for improvements:\n\n{text}
Model: default (or specific model)
Auto Execute: false
Function Key: simplify
Prompt: Simplify the following text to make it easier to understand:\n\n{text}
Function Key: brainstorm
Prompt: Generate 5 creative ideas related to:\n\n{text}
You can configure functions to:
- Auto-execute on specific domains: Automatically run when text is selected on certain websites
- Display only on specific domains: Show function buttons only on certain websites
- Auto-close buttons: Automatically hide buttons after execution
| Technology | Purpose | Version |
|---|---|---|
| Plasmo | Modern browser extension framework | 0.90.5 |
| TypeScript | Type-safe development | 5.3.3 |
| React | UI components | 18.2.0 |
| Tailwind CSS | Styling framework | 3.4.17 |
| OpenAI SDK | LLM integration | 5.16.0 |
| Dexie.js | IndexedDB wrapper for collections | 4.0.8 |
selectly/
βββ core/ # Core business logic
β βββ config/
β β βββ llm-config.ts # Configuration management
β βββ services/
β β βββ llm-service.ts # LLM service (provider-agnostic)
β β βββ action-service.ts # Action handling
β β βββ collect-service.ts # Collection management
β β βββ collect-sync-service.ts # Cloud sync for collections
β β βββ collect-sync-api.ts # Sync API client
β β βββ collect-sync-types.ts # Sync type definitions
β β βββ subscription-service-v2.ts # Subscription management
β β βββ cloud-sync-subscription-service.ts # Cloud subscription sync
β β βββ model-service.ts # LLM model resolution
β β βββ image-generator-service.ts # Image generation for sharing
β β βββ notification-service.ts # User notifications
β βββ storage/
β β βββ secure-storage.ts # Encrypted storage wrapper
β β βββ collect-db.ts # IndexedDB for collections
β β βββ dictionary-db.ts # IndexedDB for dictionary
β β βββ sync-queue-db.ts # Sync queue database
β β βββ crypto.ts # Cryptography utilities
β β βββ migration.ts # Storage migrations
β β βββ security-test.ts # Security testing
β βββ auth/
β β βββ auth-service.ts # OAuth2 authentication
β β βββ auth-background-bridge.ts # Auth background bridge
β βββ i18n/ # Internationalization
β β βββ index.ts # i18n entry
β β βββ types.ts # i18n type definitions
β β βββ hooks/ # i18n React hooks
β β βββ locales/ # Translation files
β βββ hooks/
β β βββ useSubscription.ts # Subscription React hook
β βββ content/
β β βββ Selectly.tsx # Main content script UI
β β βββ content-styles.ts # Content script styles
β βββ oauth/ # OAuth utilities
β βββ premium-api-v2.ts # Premium API client
β βββ user-info.tsx # User info component
βββ components/
β βββ content/
β β βββ ActionButtons.tsx # Floating action buttons
β β βββ StreamingResult.tsx # Streaming LLM response display
β β βββ ShareImageRenderer.tsx # Image generation for sharing
β β βββ SharePreview.tsx # Share preview component
β β βββ ErrorBoundary.tsx # Error handling
β βββ options/
β β βββ GeneralPage.tsx # General settings page
β β βββ LLMPage.tsx # LLM configuration page
β β βββ FunctionsPage.tsx # Functions configuration page
β β βββ FunctionCard.tsx # Function configuration cards
β β βββ SubscriptionPage.tsx # Subscription page
β β βββ SubscriptionManagerV3.tsx # Subscription manager UI
β β βββ SubscriptionStatus.tsx # Subscription status display
β β βββ CollectionsPage.tsx # Collections management page
β β βββ DictionaryPage.tsx # Dictionary page
β β βββ OptionsHeader.tsx # Options page header
β β βββ PopupHeader.tsx # Popup header
β β βββ Sidebar.tsx # Options sidebar
β β βββ TabsBar.tsx # Settings tabs
β β βββ Drawer.tsx # Drawer component
β β βββ constants.ts # UI constants
β β βββ forms/ # Form components
β βββ shared/
β β βββ PremiumCrown.tsx # Premium indicator component
β βββ ui/ # Reusable UI components (shadcn/ui)
β βββ badge.tsx
β βββ button.tsx
β βββ input.tsx
β βββ separator.tsx
βββ lib/
β βββ utils.ts # Utility functions
βββ utils/
β βββ icon-utils.ts # Icon utilities
β βββ url-utils.ts # URL utilities
βββ locales/ # Legacy locale files
βββ scripts/
β βββ generate-keys.js # Key generation utility
βββ background.ts # Service worker (event handler)
βββ content.tsx # Content script entry
βββ popup.tsx # Extension popup
βββ options.tsx # Options page
βββ style.css # Global styles
βββ tailwind.config.js # Tailwind configuration
βββ postcss.config.js # PostCSS configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Project dependencies
Following single responsibility and modular design:
- Services: Each service handles one concern (LLM, actions, storage, etc.)
- Separation of Concerns: UI components only handle presentation; business logic lives in services
- Provider-Agnostic: LLM service supports multiple providers through adapters
- Secure by Default: Sensitive data encrypted at rest
- Testable: Small, pure functions with clear interfaces
- β Local-First: All configuration stored locally in browser storage
- β No Data Collection: Zero tracking or analytics
- β API Keys Stay Private: Keys never leave your browser
- β Direct LLM Communication: Text sent only to your configured LLM provider
- β Encrypted Storage: Sensitive data encrypted using Chrome's secure storage
- β Open Source: Full transparency - audit the code yourself
# Development with hot reload
pnpm dev
# Production build
pnpm build
# Package extension (creates zip)
pnpm package
# Generate OAuth keys
pnpm generate-keys
# Format all files
pnpm format
# Check formatting status
pnpm format:check- TypeScript: Strict type checking
- Modular: Single responsibility principle
- Composable: Small, reusable functions
- No Global State: Services use dependency injection where possible
Contributions are welcome! Here's how you can help:
- Follow the existing code style (TypeScript + React)
- Keep services focused (single responsibility)
- Add comments for complex logic
- Test in multiple scenarios
- Update documentation if needed
- π Add new language translations
- π Add support for new LLM providers
- β¨ Create new built-in functions
- π Fix bugs and improve error handling
- π Improve documentation
- π¨ Enhance UI/UX
- Firefox and Edge support
- More built-in AI functions
- Advanced prompt templates
- Export/import configurations
- Function marketplace (share custom functions)
Built with amazing open-source projects:
- Plasmo - Modern extension framework
- Tailwind CSS - Styling
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter issues or have questions:
- Check existing Issues
- Search Discussions
- Open a new issue with detailed information
If this project helps you, please consider giving it a β star!
Made with β€οΈ for the open source community