{"id":15532090,"url":"https://github.com/dexhunter/wechatbot","last_synced_at":"2025-08-19T05:06:08.390Z","repository":{"id":80231396,"uuid":"580734266","full_name":"dexhunter/WechatBot","owner":"dexhunter","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-21T10:07:30.000Z","size":1360,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T18:25:23.029Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dexhunter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-12-21T10:07:27.000Z","updated_at":"2022-12-21T10:07:44.000Z","dependencies_parsed_at":"2023-07-01T16:47:38.604Z","dependency_job_id":null,"html_url":"https://github.com/dexhunter/WechatBot","commit_stats":{"total_commits":88,"total_committers":28,"mean_commits":3.142857142857143,"dds":0.5454545454545454,"last_synced_commit":"69f7367df075f82e566b83fee00a6954a7366102"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dexhunter/WechatBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexhunter%2FWechatBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexhunter%2FWechatBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexhunter%2FWechatBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexhunter%2FWechatBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dexhunter","download_url":"https://codeload.github.com/dexhunter/WechatBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexhunter%2FWechatBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271103202,"owners_count":24699646,"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-08-19T02:00:09.176Z","response_time":63,"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":[],"created_at":"2024-10-02T11:29:05.226Z","updated_at":"2025-08-19T05:06:08.339Z","avatar_url":"https://github.com/dexhunter.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to wechat-chatgpt 👋\u003c/h1\u003e\n\u003cp\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000\" /\u003e\n  \u003ca href=\"#\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: ISC\" src=\"https://img.shields.io/badge/License-ISC-yellow.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/fuergaosi\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Twitter: fuergaosi\" src=\"https://img.shields.io/twitter/follow/fuergaosi.svg?style=social\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Use ChatGPT On Wechat via wechaty  \nEnglish | [中文文档](README_ZH.md)\n\n[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/BHJD6L?referralCode=FaJtD_)  \n\nIf you don't have a server or want to experience rapid deployment, you can use Railway to do so, see [Usage with Railway](#usage-with-railway).\n\n### Update December 20, 2022\n\nThanks @transitive-bullshit, The ChatGPT API automates the work.  \nYou should use password \u0026 username to login, and config [CAPTCHAs](#CAPTCHAS).  \n⚠️ There may be a problem with the Docker image because I don't have an X86 device and Qume doesn't work.\n\n### Update December 13, 2022\n\n~~Yesterday (2022.12.12), OpenAI upgraded the authentication measures.~~\n\n~~It causes `⚠️ No chatgpt item in pool` when you use this project.~~\n\n~~However, please rest assured that we are actively looking for an effective solution,~~\n\n~~If you have a good solution, feel free to contribute!~~\n\n## 🌟 Feature\n\n- [x] Use ChatGPT On Wechat via wechaty\n- [x] Support OpenAI Accounts Pool\n- [x] Support use proxy to login\n- [x] Add conversation Support\n- [x] Add Dockerfile\n- [x] Publish to Docker.hub\n- [x] Add Railway deploy\n- [x] Auto Reload OpenAI Accounts Pool\n- [ ] Add sendmessage retry for 429/503\n\n## Use with docker in Linux(recommended)\n\n```sh\ncp config.yaml.example config.yaml\n# Change Config.yaml\n# run docker command in Linux or WindowsPowerShell\ndocker run -d --name wechat-chatgpt -v $(pwd)/config.yaml:/app/config.yaml holegots/wechat-chatgpt:latest\n# login with qrcode\ndocker logs -f wechat-chatgpt\n```\n\n## Use with docker in Windows\n\n```sh\n# Create and modify config.yaml in the current directory\n# run docker command in WindowsPowerShell\ndocker run -d --name wechat-chatgpt -v $(pwd)/config.yaml:/app/config.yaml holegots/wechat-chatgpt:latest\n# In the Windows command line (cmd) environment, you may mount the current directory like this:\ndocker run -d --name wechat-chatgpt -v %cd%/config.yaml:/app/config.yaml holegots/wechat-chatgpt:latest\n# login with qrcode\ndocker logs -f wechat-chatgpt\n```\n\n## Upgrade docker image version\n\n```sh\ndocker pull holegots/wechat-chatgpt:latest\ndocker stop wechat-chatgpt\ndocker rm wechat-chatgpt\n# run docker command in Linux or WindowsPowerShell\ndocker run -d --name wechat-chatgpt -v $(pwd)/config.yaml:/app/config.yaml holegots/wechat-chatgpt:latest\n# In the Windows command line (cmd) environment, you may mount the current directory like this:\ndocker run -d --name wechat-chatgpt -v %cd%/config.yaml:/app/config.yaml holegots/wechat-chatgpt:latest\n# login with qrcode\ndocker logs -f wechat-chatgpt\n```\n\n## Install\n\n```sh\nnpm install \u0026\u0026 poetry install\n```\n\n## Config\n\n### Copy config\n\nYou need copy config file for setting up your project.\n\n```sh\ncp config.yaml.example config.yaml\n```\n\n### Get and config Openai account\n\n\u003e If you don't have this OpenAI account and you live in China, you can get it [here](https://mirror.xyz/boxchen.eth/9O9CSqyKDj4BKUIil7NC1Sa1LJM-3hsPqaeW_QjfFBc).\n\n#### Use account and password\n\nYou need get OpenAI account and password.\nYour config.yaml should be like this:\n\n```yaml\nchatGPTAccountPool:\n  - email: \u003cyour email\u003e\n    password: \u003cyour password\u003e\n# if you hope only some keywords can trigger chatgpt on private chat, you can set it like this:\nchatPrivateTiggerKeyword: \"\"\n```\n\n⚠️ Trigger keywords must appear in the first position of the received message.\n⚠️ Pls make sure your network can log in to OpenAI, and if you fail to login in try setting up a proxy or using SessionToken.\n\n**Setup proxy:**\n\nYou can configure in `config.yaml`:\n\n```yaml\nopenAIProxy: \u003cYour Proxy\u003e\n```\n\n### CAPTCHAS\n\n\u003e The browser portions of this package use Puppeteer to automate as much as possible, including solving all CAPTCHAs. 🔥\n\n\u003e Basic Cloudflare CAPTCHAs are handled by default, but if you want to automate the email + password Recaptchas, you'll need to sign up for one of these paid providers:\n\n\u003e - [nopecha](https://nopecha.com/) - Uses AI to solve CAPTCHAS\n\u003e   - Faster and cheaper\n\u003e   - Set the `NOPECHA_KEY` env var to your nopecha API key\n\u003e   - [Demo video](https://user-images.githubusercontent.com/552829/208235991-de4890f2-e7ba-4b42-bf55-4fcd792d4b19.mp4) of nopecha solving the login Recaptcha (41 seconds)\n\u003e - [2captcha](https://2captcha.com) - Uses real people to solve CAPTCHAS\n\u003e   - More well-known solution that's been around longer\n\u003e   - Set the `CAPTCHA_TOKEN` env var to your 2captcha API token\n\nSo you should config `NOPECHA_KEY` or `CAPTCHA_TOKEN` in your Environment Variables.\n\n## Start Project\n\n```sh\nnpm run dev\n```\n\nIf you are logging in for the first time, then you need to scan the qrcode.\n\n## Usage with Railway\n\n[Railway](https://railway.app/) is a deployment platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.This section describes how to quickly deploy a wechat-chatgpt project using Railway.\n\nFirstly, you'll need to sign up for a Railway account and sign in using GitHub verification.\n\nThen click the one-click deployment button below to deploy.\n\n[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/BHJD6L?referralCode=FaJtD_)\n\nAfter some validation is complete, you can begin the deployment.You will see the following interface:\n\n![railway-deployment](docs/images/railway-deployment.png)\n\nSome environment variables need to be configured:\n\n- **CHAT_GPT_EMAIL** : Your OpenAI Account email, if you have session_token, It's optional.\n\n- **CHAT_GPT_PASSWORD** : Your OpenAI Account password, *if you have session_token, It's optional*.\n\n- **CHAT_GPT_RETRY_TIMES** : The number of times to retry when the OpenAI API returns 429 or 503.\n\n- **CHAT_PRIVATE_TRIGGER_KEYWORD** : If you hope only some keywords can trigger chatgpt on private chat, you can set it.\n\nClick the Deploy button and your service will start deploying shortly.The following interface appears to indicate that the deployment has begun:\n\n![railway-deploying](docs/images/railway-deploying.png)\n\nWhen the deployment is displayed successfully, click to view the logs and find the WeChat login link in Deploy Logs.\n\n![railway-deployed](docs/images/railway-deployed.png)\n\nClick to enter and use your prepared WeChat to scan the code to log in.\n\nLog in successfully and start sending and receiving messages(This process can take several minutes):\n\n![railway-success](docs/images/railway-succeed.png)\n\nBesides, in deployment, you may encounter the following issues:\n\n- **Error: ⚠️ No chatgpt item in pool** : This error means that you have not configured the OpenAI account information correctly. You can solve this problem from the following aspects:1. Check whether the token or openAI account and password are filled in correctly. 2. The token may have expired (experience shows that the expiration time of the token is **24** hours), you can go to the chatGPT official website to re-obtain the token. 3. Redeploy Current Services.Note that the above should be modified on the Variables page in Railway Dashboard.\n- **After the deployment is complete, the QR code is not generated**.Try **refreshing** the page to see again if the Deploy Logs panel generated a link and QR code.\n- **The generated QR code cannot be scanned**.On the generated QR code, there is a link that can be clicked to scan the QR code.\n- **Message feedback is very slow**.Because Railway's servers are deployed overseas, there is an increase in message feedback latency, but it is still within the acceptance range. If you are time sensitive, you can use your own server deployment.\n\n## Author\n\n👤 **holegots**\n\n- Twitter: [@fuergaosi](https://twitter.com/fuergaosi)\n- GitHub: [@fuergaosi233](https://github.com/fuergaosi233)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/fuergaosi233/wechat-chatgpt/issues).\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdexhunter%2Fwechatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdexhunter%2Fwechatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdexhunter%2Fwechatbot/lists"}