English | 简体中文
PolyPost is a WebExtension (Manifest V3) that helps you draft, polish, translate, and send posts to Twitter/X via web intent. One codebase builds extensions for Chrome, Firefox, and Safari.
- Generate, polish, and translate social content (multi-language)
- Main app UI (Dashboard / Editor / Settings)
- Browser-native entry behavior:
- Chrome: popup entry + side panel support
- Firefox: toolbar click opens native sidebar (
sidebar_action) - Safari: toolbar click toggles an in-page floating panel on X/Twitter
- Safari floating panel supports drag-to-resize width and falls back to a popup window if embedding is unavailable
- Works with OpenAI and OpenAI-compatible providers
src/background/: Service Worker entrysrc/popup/: popup UIsrc/sidepanel/: main app UIsrc/components/: shared componentssrc/services/: OpenAI / Storage / Prompt helperssrc/store/: Zustand state slicessrc/styles/: Tailwind + global stylespublic/: static assets
Install dependencies:
npm installDevelopment (Vite + CRXJS):
npm run devTargeted development:
npm run dev:chrome
npm run dev:firefox
npm run dev:safariProduction build (includes type-check):
npm run buildTargeted production build:
npm run build:chrome # dist/chrome
npm run build:firefox # dist/firefox
npm run build:safari # dist/safari (WebExtension folder for Safari converter)Preview production build:
npm run preview- Run
npm run build:chrometo generatedist/chrome - Open
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked" and select
dist/chrome
- Run
npm run build:firefoxto generatedist/firefox - Open
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on…"
- Select
dist/firefox/manifest.json - Click the extension toolbar icon: PolyPost opens in Firefox native sidebar (no new tab)
Note: browser_specific_settings.gecko.id defaults to polypost@local for local builds.
For release builds, set your own ID with POLYPOST_FIREFOX_ID:
POLYPOST_FIREFOX_ID=your-addon-id@example.com npm run build:firefoxSafari needs an Xcode project generated via Apple's converter.
- Run
npm run build:safarito generatedist/safari - Convert to an Xcode project:
xcrun safari-web-extension-converter dist/safari- Open the generated project in Xcode and run the app target once (
⌘R) - In Safari:
- Enable developer menu (
Settings > Advanced) - Enable
Develop > Allow Unsigned Extensions - Enable the extension in
Settings > Extensions
- Enable developer menu (
- Open
x.comortwitter.comand click the toolbar icon:- First click: show floating panel
- Second click: hide floating panel
- Drag the panel's left edge to resize width
- API keys are entered via Settings and stored in Chrome Storage; do not hardcode secrets.
- If you add permissions, update
manifest.jsonand explain the purpose.
PRs and suggestions are welcome. Please follow:
- Conventional Commits:
feat:,fix:,docs:, etc. - Provide screenshots for UI changes
- Call out manifest or permission changes
MIT