{"id":50979990,"url":"https://github.com/shiquda/weread-cli","last_synced_at":"2026-06-19T13:01:59.752Z","repository":{"id":358267654,"uuid":"1240724913","full_name":"shiquda/weread-cli","owner":"shiquda","description":"微信读书 CLI / WeRead CLI: 基于官方支持 API，面向人类与 AI Agent 的书架、笔记、划线、书评、阅读统计和推荐工具。Official API-based WeRead command-line tool with Agent Skill support.","archived":false,"fork":false,"pushed_at":"2026-05-16T15:15:51.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-16T15:53:50.661Z","etag":null,"topics":["agent","agent-skill","books","claude-code","cli","codex","highlights","notes","openclaw","reading","skill","typescript","weread"],"latest_commit_sha":null,"homepage":"","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/shiquda.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-16T13:44:48.000Z","updated_at":"2026-05-16T15:15:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shiquda/weread-cli","commit_stats":null,"previous_names":["shiquda/weread-cli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/shiquda/weread-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiquda%2Fweread-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiquda%2Fweread-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiquda%2Fweread-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiquda%2Fweread-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shiquda","download_url":"https://codeload.github.com/shiquda/weread-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiquda%2Fweread-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34532260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"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":["agent","agent-skill","books","claude-code","cli","codex","highlights","notes","openclaw","reading","skill","typescript","weread"],"created_at":"2026-06-19T13:01:58.830Z","updated_at":"2026-06-19T13:01:59.747Z","avatar_url":"https://github.com/shiquda.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# weread\n\n面向人类和 Agent 的微信读书命令行工具。它基于微信读书官方支持的 API 封装成稳定的本地命令，日常使用不需要手写 `curl` 或记忆接口参数。\n\nCLI 命令名是 `weread`。项目内同时提供了一个配套 Skill，指导 Agent 优先调用这个 CLI。\n\n## 安装\n\n安装 CLI：\n\n```bash\nnpm install -g weread-agent-cli\n```\n\n安装 Skill：\n\n```bash\nnpx skills add shiquda/weread-cli --yes\n```\n\n确认命令可用：\n\n```bash\nweread --version\nweread doctor\n```\n\n也可以把下面这段发给 Agent，让它阅读本项目并完成安装和配置引导：\n\n```text\n请阅读 https://github.com/shiquda/weread-cli ，帮我安装 WeRead CLI 和配套 Skill：\n1. 使用 npm 安装已发布的 CLI 包 weread-agent-cli，确认 weread 命令可用。\n2. 使用 npx skills add shiquda/weread-cli --yes 安装配套 Skill。\n3. 运行 weread doctor 检查本机配置。\n4. 如果还没有 API Key，请指导我打开 https://weread.qq.com/r/weread-skills 获取 key，并用 weread config set-key \"wrk-...\" 完成登录配置。\n```\n\n本地开发：\n\n```bash\nnpm install\nnpm run build\nnpm link\n```\n\n## 配置凭据\n\n首次使用需要先获取微信读书 API Key：\n\n1. 打开官方页面：https://weread.qq.com/r/weread-skills\n2. 登录要连接的微信读书账号。\n3. 在页面中获取 API Key，格式通常是 `wrk-...`。\n4. 用 CLI 保存到本机：\n\n```powershell\nweread config set-key \"wrk-...\"\n```\n\n凭据会保存到：\n\n```text\n~/.weread-cli/config.json\n```\n\n也可以临时使用环境变量，环境变量优先级更高：\n\n```bash\nexport WEREAD_API_KEY=\"wrk-...\"\n```\n\n常用配置命令：\n\n```powershell\nweread config path\nweread config list\nweread config set-timeout 30000\n```\n\n配置后检查：\n\n```bash\nweread doctor\n```\n\n## 常用命令\n\n```powershell\nweread doctor\nweread search \"三体\" --scope book\nweread book resolve \"三体\"\nweread shelf list\nweread shelf recent --limit 10\nweread book info 3300045871\nweread book chapters 3300045871\nweread book progress 3300045871\nweread notes notebooks --count 100\nweread notes top --limit 20\nweread notes export 3300045871 --format markdown --output notes.md\nweread readdata detail --mode annually\nweread readdata summary --mode monthly\nweread discover recommend --count 12\n```\n\nAgent 默认建议使用 `--json`，脚本或精确结构化解析也应使用 `--json`。大输出可先写入文件再摘要回复：\n\n```bash\nweread --json --compact search \"三体\" --count 5\nweread --json notes bookmarks 3300045871 --compact \u003e highlights.json\nweread notes export 3300045871 --format markdown --output notes.md\n```\n\nAgent 或脚本做数据解析时应依赖 `--json` 的字段；普通终端查看可以直接使用 human-readable 输出。human 输出会在截断时提示 `Showing first ...`，可用 `--limit` 或 `--all` 控制显示量。\n\n低层逃生口：\n\n```powershell\nweread --json api call /store/search --param keyword=三体 --param scope=10\n```\n\n## Skill 安装\n\nSkill 需要配合已发布的 CLI 包使用：\n\n```bash\nnpm install -g weread-agent-cli\nnpx skills add shiquda/weread-cli --yes\n```\n\nOpenClaw 等需要显式工作目录的环境可用：\n\n```bash\nnpx skills add shiquda/weread-cli --yes --workdir ~/.openclaw/workspace\n```\n\n项目内 Skill 位于：\n\n```text\nskills/weread/SKILL.md\nskills/weread/references/\n```\n\n也可以手动复制到 Agent 的用户 Skill 目录。\n\nSkill 的职责是指导 Agent 调用本地 `weread` CLI、处理分页和错误，并解释微信读书字段口径；具体 API 调用细节由 CLI 封装。首次配置说明在 `skills/weread/references/first-use.md`，领域口径说明在 `skills/weread/references/domain-rules.md`。\n\n## 测试\n\n```powershell\nnpm run check\nnpm test\nnpm run build\n```\n\n`npm test` 默认使用本地模拟服务，不依赖真实微信读书接口。真实连通性可以用：\n\n```powershell\nweread --json search \"三体\" --count 1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiquda%2Fweread-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiquda%2Fweread-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiquda%2Fweread-cli/lists"}