A Chrome extension that uses AI to generate contextual replies for X/Twitter and LinkedIn. Select from multiple templates to quickly craft engaging responses for social media interactions.
ChatterBox generating a contextual reply using the Question template
- π€ AI-powered reply generation using OpenAI models (GPT-5, GPT-4, GPT-4o, and more)
- π Multiple reply templates (Question, Funny Remark, Agreement, Add Insight)
- π¨ Clean UI that integrates seamlessly with X's interface
- β‘ Fast response generation
- π Secure API key storage
- βοΈ Customizable system prompt
- ποΈ Advanced AI parameter controls
Available reply templates appear below the reply box
Configure your API key, model selection, and advanced parameters
- Node.js (v16 or higher)
- npm or yarn
- OpenAI API key (Get one here)
- Clone this repository:
git clone https://github.com/yourusername/chatterbox.git
cd chatterbox
- Install dependencies:
npm install
- Build the extension:
npm run build
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" in the top right
- Click "Load unpacked"
- Select the
reply-bot
directory
Loading the unpacked extension in Chrome
- Click the extension icon in your Chrome toolbar
- Enter your OpenAI API key
- (Optional) Select your preferred OpenAI model
- (Optional) Customize the system prompt
- (Optional) Adjust advanced settings:
- Temperature (controls response randomness)
- Max tokens (controls response length)
- Presence penalty (encourages new topics)
- Frequency penalty (reduces repetition)
- Click "Save Settings"
Fine-tune the AI parameters for better responses
- Go to X/Twitter
- Click "Reply" on any tweet
- You'll see AI template buttons below the reply box
- Click a template to generate a contextual reply
- Edit the generated text as needed before posting
reply-bot/
βββ src/
β βββ background.ts # Service worker for API calls
β βββ content.ts # Content script for X/Twitter integration
β βββ content_linkedin.ts # Content script for LinkedIn integration
β βββ popup.ts # Extension popup logic
β βββ types.ts # TypeScript type definitions & templates
β βββ utils/ # Utility functions
β β βββ promptLoader.ts # System prompt file loader
β βββ prompts/ # AI system prompts
β β βββ linkedin-system-prompt.txt
β β βββ x-system-prompt.txt
β βββ styles.css # Extension styles with dark mode
βββ icons/ # Extension icons
βββ dist/ # Built files (generated)
βββ manifest.json # Chrome extension manifest
βββ popup.html # Extension popup HTML
βββ package.json # Node dependencies
βββ tsconfig.json # TypeScript config
βββ webpack.config.js # Webpack bundler config
βββ CLAUDE.md # Architecture documentation
βββ README.md # This file
To run in development mode with auto-reload:
npm run dev
npm run build
The extension includes 10 default X/Twitter templates:
- Question (β) - Generates thoughtful questions to engage with the tweet
- Funny (π) - Creates witty and humorous responses
- Agree (π) - Produces supportive replies that build on the original point
- Sarcastic (π€¨) - Generates clever sarcastic responses
- Insightful (π‘) - Adds valuable insight or technical perspective
- Disagree (π) - Respectful disagreement responses
- Congrats (π) - Congratulatory responses
- Respond (π¬) - General positive responses
- Encourage (πͺ) - Encouraging and supportive messages
Plus LinkedIn connection message templates for personalized outreach.
- API keys are stored locally in Chrome's secure storage
- Settings and preferences are stored locally
- No data is sent to third parties except OpenAI for reply generation
- The extension only activates on X/Twitter domains
- Make sure you've entered a valid OpenRouter API key
- Check that you have credits in your OpenRouter account
- Verify your selected model is available through OpenRouter
- Refresh the X/LinkedIn page after installing the extension
- Check the console for any error messages
- Get your API key from OpenRouter
- Verify your OpenRouter account has available credits
- Check the model availability on your OpenRouter plan
- Make sure you're connected to the internet
- Reply history and analytics
- Multi-language support
- Thread continuation support
- Custom model parameter presets
- Support for additional social platforms
- Team/organization template sharing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
MIT License - see LICENSE file for details
- Add support non-OpenAI large language models
- Add unit/integration tests
- Dark mode support