{"id":27048558,"url":"https://github.com/cyberscoper/genkit-telegram","last_synced_at":"2026-05-18T10:31:54.777Z","repository":{"id":286199419,"uuid":"960693300","full_name":"CyberScoper/genkit-telegram","owner":"CyberScoper","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-05T00:29:22.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T07:41:54.206Z","etag":null,"topics":["firebase","gemini-api","genkit","google","googlegemini","javascript","pm2","telegram","telethon"],"latest_commit_sha":null,"homepage":"https://cyberscope360.com/","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/CyberScoper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-04T22:09:21.000Z","updated_at":"2025-04-05T00:29:26.000Z","dependencies_parsed_at":"2025-04-09T18:43:42.885Z","dependency_job_id":null,"html_url":"https://github.com/CyberScoper/genkit-telegram","commit_stats":null,"previous_names":["cyberscoper/genkit-telegram"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CyberScoper/genkit-telegram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberScoper%2Fgenkit-telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberScoper%2Fgenkit-telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberScoper%2Fgenkit-telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberScoper%2Fgenkit-telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyberScoper","download_url":"https://codeload.github.com/CyberScoper/genkit-telegram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberScoper%2Fgenkit-telegram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279152390,"owners_count":26115058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"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":["firebase","gemini-api","genkit","google","googlegemini","javascript","pm2","telegram","telethon"],"created_at":"2025-04-05T07:15:11.890Z","updated_at":"2025-10-16T04:18:17.784Z","avatar_url":"https://github.com/CyberScoper.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genkit Telegram Assistant\n\nA fully autonomous Telegram userbot that behaves like a human in group chats.\nBuilt with [gramjs](https://github.com/gram-js/gramjs) for user-mode Telegram access, and [Genkit](https://github.com/firebase/genkit) for AI-powered reply generation via Google Gemini models.\n\n![logo](https://github.com/user-attachments/assets/eda603b5-961e-46f2-a5f4-dc92af2309aa)\n\n---\n\n## 🧠 What it does\n- Joins as a real Telegram user\n- Replies only when:\n  - You reply to **its messages**\n  - You **mention** it by @username\n- Occasionally jumps in with a random opinion, like a tired sarcastic cyclist\n- Typing style looks human: lowercase, slang, short phrases, some \"hmm\" or \"xз\"\n- Respects context of message threads (last 2 messages)\n- Custom prompt for both replies and self-comments\n\n---\n\n## ⚙️ Requirements\n- Node.js v18+\n- Google Gemini API key\n- Telegram API ID and Hash from https://my.telegram.org\n\n---\n\n## 🚀 Setup\n\n1. **Clone this repo**:\n```bash\ngit clone https://github.com/CyberScoper/genkit-telegram.git\ncd genkit-telegram\n```\n\n2. **Install dependencies**:\n```bash\nnpm install\n```\n\n3. **Create `.env` file**:\n```dotenv\nAPI_ID=your_telegram_api_id\nAPI_HASH=your_telegram_api_hash\nGOOGLE_API_KEY=your_google_gemini_api_key\nRESPONSE_DELAY_MULTIPLIER=50\nMIN_MESSAGE_LENGTH=5\nRANDOM_COMMENT_CHANCE=0.01\n```\n\n4. **Run the assistant**:\n```bash\nnpm start\n```\n\n📝 On first run, you'll be asked to enter your phone, confirmation code, and 2FA password if enabled.\n\n---\n\n## 🛠 Environment variables\n| Variable                  | Description                                          |\n|--------------------------|------------------------------------------------------|\n| `API_ID`                 | Telegram API ID                                      |\n| `API_HASH`               | Telegram API Hash                                    |\n| `GOOGLE_API_KEY`         | Your Gemini Pro API Key                              |\n| `RESPONSE_DELAY_MULTIPLIER` | Milliseconds per character in delay simulation     |\n| `MIN_MESSAGE_LENGTH`     | Ignore messages shorter than this                   |\n| `RANDOM_COMMENT_CHANCE`  | Probability of spontaneous message (0.0 - 1.0)       |\n\n---\n\n## 🧑‍💻 Run with PM2\n```bash\nnpm install -g pm2\npm2 start user-ai-assistant.js --name telegram-ai\npm2 save\npm2 startup\n```\n\nLogs:\n```bash\npm2 logs telegram-ai\n```\n\n---\n\n## 🤖 Prompt Logic\n- `reply` mode: mimics your human tone, keeps it casual\n- `comment` mode: serious yet informal, makes occasional unsolicited remarks\n- Will **never mention location**, **never act like an assistant**, and keeps all responses short\n\n---\n\n## ❓ Example use case\nCreate a Telegram group of cyclists, invite your AI-powered human-looking friend.\nLet it observe. When pinged, it responds casually. Occasionally it drops a thoughtful remark. Nobody suspects.\n\n---\n\nMade with 💻, 🤖, and 😈 by @cyberscope\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberscoper%2Fgenkit-telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberscoper%2Fgenkit-telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberscoper%2Fgenkit-telegram/lists"}