π 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:
Quick, practical actions at your fingertips:
git clone https://github.com/1850298154/selectly.git
cd selectly
pnpm install
pnpm dev
This starts the development server with hot reload.
chrome://extensions/build/chrome-mv3-dev directorySelect 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:
| 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:
# 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
Contributions are welcome! Hereβs how you can help:
Built with amazing open-source projects:
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter issues or have questions:
If this project helps you, please consider giving it a β star!
Made with β€οΈ for the open source community