{"id":50104406,"url":"https://github.com/froggychips/tweai","last_synced_at":"2026-05-24T10:00:39.460Z","repository":{"id":358460258,"uuid":"1241433122","full_name":"froggychips/tweai","owner":"froggychips","description":"AI reply assistant for X (Twitter) — OpenAI, Grok \u0026 Gemini, 8 personas, tweet translator, smart thread context. BYOK, no subscription, open-source Chrome extension.","archived":false,"fork":false,"pushed_at":"2026-05-19T08:27:21.000Z","size":328,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T09:34:21.348Z","etag":null,"topics":["ai-assistant","ai-reply","browser-extension","byok","chrome-extension","claude-code","gemini","google-gemini","grok","javascript","llm","manifest-v3","mcp-server","model-context-protocol","multilingual","openai","personas","tweet-translator","twitter","x-twitter"],"latest_commit_sha":null,"homepage":"https://froggychips.xyz","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/froggychips.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T11:38:51.000Z","updated_at":"2026-05-19T08:27:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/froggychips/tweai","commit_stats":null,"previous_names":["froggychips/tweai"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/froggychips/tweai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froggychips%2Ftweai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froggychips%2Ftweai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froggychips%2Ftweai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froggychips%2Ftweai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/froggychips","download_url":"https://codeload.github.com/froggychips/tweai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froggychips%2Ftweai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33429192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assistant","ai-reply","browser-extension","byok","chrome-extension","claude-code","gemini","google-gemini","grok","javascript","llm","manifest-v3","mcp-server","model-context-protocol","multilingual","openai","personas","tweet-translator","twitter","x-twitter"],"created_at":"2026-05-23T09:06:06.801Z","updated_at":"2026-05-24T10:00:39.444Z","avatar_url":"https://github.com/froggychips.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TweAI — AI Reply Assistant for X (Twitter)\n\n\u003e Open-source Chrome extension that drafts AI replies on X / Twitter in your own voice, with personas, multilingual support, and your own OpenAI key. **No subscription. No backend. Your key, your data.**\n\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)\n[![Manifest V3](https://img.shields.io/badge/Chrome-Manifest_V3-yellow.svg)](https://developer.chrome.com/docs/extensions/mv3/intro/)\n[![BYOK](https://img.shields.io/badge/auth-BYOK-success.svg)](#privacy)\n\n![TweAI demo](docs/demo.gif)\n\n---\n\n## Why I built this\n\n2025. I was in Bangkok, my Thai was bad, and X's auto-translate would either\nbreak the page or render slang as nonsense. I wanted to read the timeline and\nreply like a human, not like Google Translate having a stroke. So TweAI started\nas a personal translator with persona-aware replies — long before X shipped\nthe neural one.\n\nPersonas, flirt mode, deep author context, the careful work on prompt-injection\ndefence — all of that is here because the original use case was actual human\nconversation across a language gap, not \"scaling thought leadership.\" The\nextension was always for one person; it's just open-source now in case you have\nthe same problem.\n\n---\n\n## Features\n\n- ✍️ **AI Reply with personas** — 5 built-in tech-creator personas (Founder, Engineer, Researcher, Casual, Flirt) plus your own custom personas with arbitrary system prompts.\n- 🪪 **Per-account memory** — different default persona depending on which X account is active in the tab.\n- 🤖 **Explain any tweet** — 2–3 bullet summary: gist, tone, context.\n- 🌐 **Auto-translate the timeline** — lazy via IntersectionObserver, cached locally so you never re-translate the same tweet.\n- 🎯 **Deep context** — optionally include the author's last 5 tweets so the reply matches their thread.\n- 💬 **DM composer** — same prompt + Tweet flow for direct messages.\n- 💸 **Token budget** — daily soft-limit on input + output tokens; blocks API calls when exceeded.\n- 🩺 **Diagnostics** — one-click health check verifies key, provider connectivity, and that X DOM selectors still match.\n- 🔑 **BYOK** — your OpenAI (or Google Translate) key, stored locally. Nothing transits a server we control.\n- 🌍 **Multilingual** — UI labels in English/Russian; replies in any of 12 languages or matching the source tweet.\n\n## Install\n\n### From source (recommended while in beta)\n\n```bash\ngit clone https://github.com/froggychips/tweai.git\n```\n\n1. Open `chrome://extensions`\n2. Enable **Developer mode** (top-right)\n3. Click **Load unpacked** and select the `TweAI` directory\n\n### From the Chrome Web Store\n\n_Coming soon. The extension is currently in beta — install from source above._\n\n## Configure\n\n1. After loading the extension, click its icon → **Options**.\n2. Paste your **OpenAI API key** (`sk-...`). [Get one at platform.openai.com](https://platform.openai.com/api-keys).\n3. Optionally:\n   - Set a **default persona** (Tech Founder, Engineer, AI Researcher, Casual Tech, Flirt).\n   - Pick a **default reply language** (or `auto` to match your browser).\n   - Switch translation **provider** to Google Translate API if you have a key (cheaper for high-volume timeline translation).\n4. Click **Test API Key** to verify, then **Save**.\n\n## Usage\n\n| Trigger | What it does |\n|---|---|\n| Open `x.com` or `twitter.com` | Auto-translates each tweet as it scrolls into view (toggleable in options) |\n| Click **🤖 Explain** under any tweet | Renders a 2–3 bullet AI analysis |\n| Click **AI Reply** with style + persona | Generates a draft reply matching the chosen voice |\n| Toggle **Deep** before AI Reply | Includes the author's recent tweets as context |\n| Click **✍️**, type a prompt, press Enter | Sends a custom prompt to the AI for a tailored draft |\n| Click **Tweet** | Translates the draft into the source tweet's language, opens the native reply box, inserts the text |\n\n## Permissions, in plain words\n\n| Permission | What it's actually for |\n|---|---|\n| `storage` | Save your API key, preferences, custom personas, per-account rules. |\n| `scripting`, `activeTab` | Inject the in-page UI (buttons, submenu, composer). |\n| `webNavigation` | Detect SPA navigation on x.com so the UI survives client-side routing. |\n| `clipboardWrite` | The Tweet button's clipboard fallback when the native composer isn't available. |\n| `host_permissions` | `api.openai.com`, `x.com`, `twitter.com`. |\n\n## Privacy\n\nTweAI is **bring-your-own-key**. There is no backend. Your API key, your prompts, and the AI responses never pass through any server we control. See [`PRIVACY.md`](PRIVACY.md) for the full breakdown.\n\n## Security\n\nThe extension wraps tweet text in delimiters and explicitly instructs the model to treat it as data, not instructions, defending against the most common prompt-injection attacks. To report a vulnerability, open a [private security advisory](https://github.com/froggychips/tweai/security/advisories/new). See [`SECURITY.md`](SECURITY.md).\n\n## Roadmap\n\n- [x] Personas (Tech creator preset)\n- [x] BYOK + privacy-first\n- [x] Prompt-injection hardening\n- [x] Custom persona editor (write your own system prompt)\n- [x] Per-account persona memory (different voice on different X accounts)\n- [x] Token-budget and daily limits in Options\n- [x] Health-check (verify selectors and provider connectivity)\n- [ ] Chrome Web Store publication\n- [ ] Cloud-tier (24/7 monitoring, lead-gen pipeline) — for B2B; explicitly opt-in\n\n## Releasing\n\n```bash\nnpm install\nnpm run lint\nnpm run format\nnpm run package          # → dist/ + tweai-v\u003cversion\u003e.zip\n```\n\n`tools/build.mjs` builds the CWS-ready zip with the right inclusions (no `tweai-mcp-server/`, no `docs/`). The same script runs in [`.github/workflows/release.yml`](.github/workflows/release.yml) — pushing a `v*` tag uploads a GitHub release with the zip attached automatically.\n\nCWS submission checklist: [`docs/CWS_REVIEW.md`](docs/CWS_REVIEW.md). Launch-day copy: [`docs/LAUNCH.md`](docs/LAUNCH.md). Demo GIF: [`docs/RECORDING.md`](docs/RECORDING.md).\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for project layout, local dev, and PR conventions. Architecture overview lives in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md). If something on x.com stops working, start with [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md).\n\nThe project has zero runtime dependencies. Source is plain MV3 JavaScript; only `eslint` and `prettier` ship as dev-deps.\n\n## Contact\n\n- GitHub Issues: https://github.com/froggychips/tweai/issues\n- Telegram: [@froggychips](https://t.me/froggychips)\n\n## License\n\nApache 2.0 — see [`LICENSE`](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroggychips%2Ftweai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffroggychips%2Ftweai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroggychips%2Ftweai/lists"}