wechat-copilot
自动解析微信窗口的聊天内容,结合 AI 大模型,生成回复建议。
快速安装
pip install wechat-copilot
配置
- 创建配置文件:
mkdir -p ~/.wechat-copilot
touch ~/.wechat-copilot/config.env
- 编辑配置文件
~/.wechat-copilot/config.env:
# 必填:OpenAI API密钥
OPENAI_API_KEY=your_key_here
# 可选:OpenAI API地址(默认为 https://api.openai.com/v1)
OPENAI_BASE_URL=https://api.openai.com/v1
# 可选:快捷键设置(默认为 cmd+shift+space)
SHORTCUT=cmd+shift+space
使用方法
- 运行助手:
wechat-copilot
- 打开微信聊天窗口
- 快捷键:
cmd+shift+space触发 - GPT 会根据聊天内容生成回复建议,以系统通知的方式展示,自动复制到剪贴板
- 粘贴文本到聊天框,自行决定二次编辑
开发者指南
如果你想参与开发:
git clone https://github.com/yourusername/wechat-copilot.git
cd wechat-copilot
pip install -e ".[dev]"
核心思路
- 使用
pyobjc获取微信窗口的聊天内容 - 使用
openai的 API 生成回复建议 - 使用
osascript生成系统通知 - 使用
pyperclip自动复制到剪贴板
喜欢的话,可以点个 ��star🌟 支持一下。感谢感谢。
Release files for wechat-copilot 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wechat_copilot-0.0.1.tar.gz | 8.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wechat_copilot-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.1 MB
Release files / wechat_copilot-0.0.1.tar.gz
| Download URL | wechat_copilot-0.0.1.tar.gz |
|---|---|
| Size | 8.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba2fa48a581d36c49dc23b2802569a53cbeb4a1981d4b10d4645f0e852a00cd9
|
|
BLAKE2b-256 checksum How to use checksums |
911c6ab75fe5500c837a43e3ff1839753b1a64d8e836492fe1cd874eb8dda79f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.9
|
Release files / wechat_copilot-0.0.1-py3-none-any.whl
| Download URL | wechat_copilot-0.0.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d69f89a173d92daa5b79d715fdd58e71f4b0d441e9157a55247e3f7410e8ec22
|
|
BLAKE2b-256 checksum How to use checksums |
2ab518ce73e07a7af3f755c8da697e9ed793e80d5bd0f320383527f60be34039
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.9
|