https://github.com/theognis1002/chatterbox
AI-powered contextual reply generator for X/LinkedIn/Reddit
https://github.com/theognis1002/chatterbox
auto-responder chatgpt chrome-extension llm marketing-automation marketing-tools npm openai typescript
Last synced: about 1 month ago
JSON representation
AI-powered contextual reply generator for X/LinkedIn/Reddit
- Host: GitHub
- URL: https://github.com/theognis1002/chatterbox
- Owner: theognis1002
- License: mit
- Created: 2025-06-05T15:46:36.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-09-08T15:31:54.000Z (about 2 months ago)
- Last Synced: 2025-09-08T17:29:36.136Z (about 2 months ago)
- Topics: auto-responder, chatgpt, chrome-extension, llm, marketing-automation, marketing-tools, npm, openai, typescript
- Language: TypeScript
- Homepage: https://coming-soon.com
- Size: 731 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ChatterBox Chrome Extension
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*
## Features
- ๐ค 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
### Reply Templates

*Available reply templates appear below the reply box*
### Settings Interface

*Configure your API key, model selection, and advanced parameters*
## Setup
### Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- OpenAI API key ([Get one here](https://platform.openai.com/api-keys))
### Installation
1. Clone this repository:
```bash
git clone https://github.com/yourusername/chatterbox.git
cd chatterbox
```
2. Install dependencies:
```bash
npm install
```
3. Build the extension:
```bash
npm run build
```
### Loading the Extension
1. Open Chrome and navigate to `chrome://extensions/`
2. Enable "Developer mode" in the top right
3. Click "Load unpacked"
4. Select the `reply-bot` directory

*Loading the unpacked extension in Chrome*
### Configuration
1. Click the extension icon in your Chrome toolbar
2. Enter your OpenAI API key
3. (Optional) Select your preferred OpenAI model
4. (Optional) Customize the system prompt
5. (Optional) Adjust advanced settings:
- Temperature (controls response randomness)
- Max tokens (controls response length)
- Presence penalty (encourages new topics)
- Frequency penalty (reduces repetition)
6. Click "Save Settings"

*Fine-tune the AI parameters for better responses*
## Usage
1. Go to X/Twitter
2. Click "Reply" on any tweet
3. You'll see AI template buttons below the reply box
4. Click a template to generate a contextual reply
5. Edit the generated text as needed before posting
## Development
### Project Structure
```
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
```
### Development Mode
To run in development mode with auto-reload:
```bash
npm run dev
```
### Building for Production
```bash
npm run build
```
## Templates
The extension includes 10 default X/Twitter templates:
1. **Question** (โ) - Generates thoughtful questions to engage with the tweet
2. **Funny** (๐) - Creates witty and humorous responses
3. **Agree** (๐) - Produces supportive replies that build on the original point
4. **Sarcastic** (๐คจ) - Generates clever sarcastic responses
5. **Insightful** (๐ก) - Adds valuable insight or technical perspective
6. **Disagree** (๐) - Respectful disagreement responses
7. **Congrats** (๐) - Congratulatory responses
8. **Respond** (๐ฌ) - General positive responses
9. **Encourage** (๐ช) - Encouraging and supportive messages
Plus LinkedIn connection message templates for personalized outreach.
## Privacy & Security
- 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
## Troubleshooting
### Extension not working?
1. Make sure you've entered a valid OpenRouter API key
2. Check that you have credits in your OpenRouter account
3. Verify your selected model is available through OpenRouter
4. Refresh the X/LinkedIn page after installing the extension
5. Check the console for any error messages
### API Key Issues
- Get your API key from [OpenRouter](https://openrouter.ai/keys)
- Verify your OpenRouter account has available credits
- Check the model availability on your OpenRouter plan
- Make sure you're connected to the internet
## Future Enhancements
- [ ] Reply history and analytics
- [ ] Multi-language support
- [ ] Thread continuation support
- [ ] Custom model parameter presets
- [ ] Support for additional social platforms
- [ ] Team/organization template sharing
## Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
## License
MIT License - see LICENSE file for details
## TODOS
- [ ] Add support non-OpenAI large language models
- [ ] Add unit/integration tests
- [ ] Dark mode support