[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-95050":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":17,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":27,"discoverSource":28},95050,"wcctl","XIAZY\u002Fwcctl","XIAZY","wcctl is a command line tool to bridge the gap between WeChat and other tools","",null,"C",103,48,101,0,2,1,46.27,"Other",false,"main",true,[],"2026-08-24 04:01:23","# wcctl\n\nUse your local WeChat data with AI agents, scripts, search tools, and other\nsoftware.\n\n`wcctl` gives you a simple command-line interface for reading contacts,\nchatrooms, recent conversations, and messages from WeChat 4.x on macOS. Results\ncan be printed as a table for people or as JSON for other programs.\n\n```bash\n# See your recent conversations.\nwcctl sessions\n\n# Get message history as structured data.\nwcctl messages -chat wxid_example -limit 100 -json\n```\n\nYour data stays on your Mac. Once setup is complete, all contact, chatroom,\nsession, and message commands are read-only and can run while WeChat is open.\n\n> **License notice:** [Schedule A](LICENSE) permits licensed use only for\n> interoperability solely for computational data analysis, only with lawfully\n> accessed data, and only while physically outside the United States, Mainland\n> China, and Hong Kong, and it also restricts distribution and secondary\n> licensing.\n\n## What can I do with it?\n\n- Give a local AI agent relevant WeChat context for a task.\n- Search, summarize, or analyze your own conversations.\n- Export structured data to Python, `jq`, spreadsheets, or indexing tools.\n- Build personal automations without uploading your WeChat database to a new\n  service.\n- Work with more than one WeChat account from the same installation.\n\nFor example, an agent can first list your recent sessions, choose the relevant\ncontact or group, and then request a limited window of messages. Because every\ncommand supports JSON, the agent does not need to understand WeChat's database\nformat.\n\n## Quick start\n\n### 1. Install `wcctl`\n\nYou need:\n\n- macOS 12 or newer\n- WeChat 4.x\n\n#### Easiest option: ask an AI agent to install it\n\nIf you use [Codex](https:\u002F\u002Flearn.chatgpt.com\u002Fdocs\u002Fquickstart) or another trusted\nAI agent that can access the Terminal on your Mac, it can install and verify\n`wcctl` for you. Start a new task and paste this message:\n\n> Install the latest release of wcctl from\n> https:\u002F\u002Fgithub.com\u002FXIAZY\u002Fwcctl. Use the project's official installation\n> script and its default user-local installation directory. Update my PATH only\n> if necessary, then run `wcctl version` to verify the installation. Explain\n> any permission request before asking me to approve it. Do not accept the\n> wcctl license on my behalf.\n\nThe agent should report an installation path ending in\n`.local\u002Fbin\u002Fwcctl` and a version line beginning with `wcctl v`. It may\nask for permission to download the installer or update your shell\nconfiguration. Those are expected; unrelated system changes are not.\n\nInstallation does not accept the `wcctl` license. The first time you use a\ndata command, read the conditions and answer the confirmation questions\nyourself.\n\n#### Install it yourself in Terminal\n\nInstall the latest release:\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FXIAZY\u002Fwcctl\u002Fmain\u002Finstall.sh | sh\n```\n\nThe installer detects Apple Silicon or Intel automatically, verifies the\ndownloaded release checksum, and installs `wcctl` to `~\u002F.local\u002Fbin` without\nrequiring administrator access. If needed, it adds that directory to `PATH` in\nyour `.zshrc` or `.bashrc`; open a new terminal afterward. To install somewhere\nelse:\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FXIAZY\u002Fwcctl\u002Fmain\u002Finstall.sh \\\n  | sh -s -- --dir \"\u002Fpath\u002Fto\u002Fbin\"\n```\n\nWhen using a custom directory, make sure it is included in your `PATH`.\n\nThe first time you run `wcctl`, it will show the license conditions and ask\nyou to confirm that they apply to your use. The complete license is embedded in\nthe executable and can be printed at any time:\n\n```bash\nwcctl license\n```\n\nTo see which release is installed:\n\n```bash\nwcctl version\n```\n\n### 2. Set up database access\n\nWeChat encrypts its local databases. `wcctl` needs to acquire and verify\ntheir keys before it can read them.\n\nThis setup requires System Integrity Protection (SIP) to be disabled\ntemporarily. Follow\n[Apple's SIP instructions](https:\u002F\u002Fdeveloper.apple.com\u002Fdocumentation\u002Fsecurity\u002Fdisabling-and-enabling-system-integrity-protection),\nthen confirm after restarting:\n\n```bash\ncsrutil status\n```\n\nOpen WeChat, sign in, and wait for your conversations to load. Then run the\nfollowing command from your normal macOS account:\n\n```bash\nwcctl key acquire\n```\n\nDo not add `sudo`. `wcctl` will request administrator permission for the\npart that needs it.\n\nThe command guides you through account selection and tells you exactly what it\nis about to do. WeChat will be closed during acquisition, so save anything\nunfinished first. When acquisition succeeds, the verified keys are saved in\n`~\u002F.wcctl\u002Fkeys.json` and the temporary capture is deleted.\n\nAfter saving the keys, `wcctl` prominently reminds you to re-enable SIP.\n\nRestart WeChat when you are ready. Re-enable SIP from macOS Recovery with\n`csrutil enable`, restart the Mac, and confirm with `csrutil status`. Normal\n`wcctl` queries continue to work with SIP enabled.\n\n### 3. Explore your data\n\nList people in your contacts:\n\n```bash\nwcctl contacts\n```\n\nList group chats:\n\n```bash\nwcctl chatrooms\n```\n\nSee conversations ordered by recent activity:\n\n```bash\nwcctl sessions\n```\n\nCopy a username from one of those commands and use it to read messages:\n\n```bash\nwcctl messages -chat wxid_example\nwcctl messages -chat 123456789@chatroom -limit 100\n```\n\nThat is everything needed for normal use.\n\n## Use it with an AI agent or another tool\n\nAdd `-json` to any listing command:\n\n```bash\nwcctl contacts -json\nwcctl chatrooms -json\nwcctl sessions -limit 100 -json\nwcctl messages -chat wxid_example -limit 200 -json\n```\n\nAny local tool that can run a command and parse JSON can use `wcctl`. A\ntypical workflow is:\n\n1. Run `sessions -json` to discover recent conversations.\n2. Select a session by its `username`.\n3. Run `messages -chat USERNAME -json` to retrieve the relevant history.\n4. Pass only that result to the agent or analysis step that needs it.\n\nIt also works in ordinary shell pipelines:\n\n```bash\nwcctl sessions -limit 5 -json | jq -r '.[].username'\nwcctl messages -chat wxid_example -json > messages.json\n```\n\n`wcctl` does not upload this data. The tool you connect it to decides what\nhappens to the JSON afterward.\n\n## Commands\n\n### Contacts\n\n```bash\nwcctl contacts [-user USER] [-json]\n```\n\nLists regular contacts and their available profile metadata. Chatrooms,\nofficial accounts, deleted contacts, and WeChat's built-in identities are not\nincluded.\n\n### Chatrooms\n\n```bash\nwcctl chatrooms [-user USER] [-json]\n```\n\nLists group chats with available details such as their names, owners, member\ncounts, and announcements.\n\n### Sessions\n\n```bash\nwcctl sessions [-limit N] [-user USER] [-json]\n```\n\nLists recent conversations, including their usernames, display names, unread\nstate, last activity, and summaries when available. The default limit is 50.\n\n### Messages\n\n```bash\nwcctl messages -chat USERNAME \\\n  [-limit N] [-before TIME] [-user USER] [-json]\n```\n\nLists messages with a contact or chatroom. `wcctl` automatically searches\nall of the local message databases and combines the results in time order. The\ndefault limit is 50.\n\nTo retrieve older messages, pass the time of the oldest result back through\n`-before`. It accepts a Unix timestamp or RFC3339 time:\n\n```bash\nwcctl messages -chat wxid_example -limit 100 \\\n  -before 2026-08-01T00:00:00Z -json\n```\n\nText messages are decoded when possible. Image, video, voice, emoticon, and\nother attachment metadata may be shown, but exporting the media files\nthemselves is not yet supported.\n\n## Multiple accounts\n\nIf keys have been acquired for more than one WeChat account, list them and\nchoose a default:\n\n```bash\nwcctl user ls\nwcctl user use ACCOUNT\nwcctl user current\n```\n\nUse `-user ACCOUNT` when you want to switch for just one command:\n\n```bash\nwcctl messages -user ACCOUNT -chat wxid_example -json\n```\n\nWith only one account, no selection is necessary.\n\n## Key setup options\n\nMost people only need:\n\n```bash\nwcctl key acquire\n```\n\nIf auto-detection finds multiple accounts or WeChat processes, choose from the\nprompt. You can also specify them directly:\n\n```bash\nwcctl key acquire -account ACCOUNT\nwcctl key acquire -pid PID\n```\n\nIf acquisition fails after creating a capture, retry key extraction without\nclosing WeChat again:\n\n```bash\nwcctl key extract -capture \u002Fpath\u002Fto\u002Fcapture\n```\n\nAdvanced options are available for custom database locations, key-store paths,\ncapture locations, and automated confirmation:\n\n```bash\nwcctl key acquire -data-dir \u002Fpath\u002Fto\u002Fxwechat_files\nwcctl key acquire -keys \u002Fpath\u002Fto\u002Fkeys.json\nwcctl key acquire -out .\u002Fcapture\nwcctl key acquire -keep-dump\nwcctl key acquire -yes\n```\n\nRun `wcctl key acquire -h` or `wcctl key extract -h` for the full\noption list.\n\n## Privacy and safety\n\n- Use `wcctl` only with accounts and data you are authorized to access and\n  only as permitted by the [license](LICENSE).\n- Contact, chatroom, session, and message queries never open WeChat's live\n  SQLite databases. Each query uses private, disposable APFS copy-on-write\n  clones of the database and WAL, and rebuilds SHM only beside those clones.\n  A regular private copy is used when APFS cloning is unavailable.\n- The database and WAL are cloned individually. A query made while WeChat is\n  actively committing or checkpointing may therefore be slightly stale or,\n  rarely, fail because the two files came from different instants. Retrying\n  the command obtains a fresh copy.\n- `~\u002F.wcctl\u002Fkeys.json` contains sensitive database keys. Do not share it.\n- A retained memory capture may contain messages, credentials, and other\n  private data. Delete it when it is no longer needed.\n- JSON output can contain private contact and message data. Be deliberate about\n  which agents, services, or files receive it.\n\n## Troubleshooting\n\n### `System Integrity Protection is enabled`\n\nSIP only needs to be disabled for `key acquire`. Follow Apple's Recovery\ninstructions, restart, and check `csrutil status` before trying again.\n\n### WeChat is not found\n\nOpen the main WeChat application, sign in, and retry. `wcctl` intentionally\nignores helper and renderer processes.\n\n### More than one account or process is found\n\nChoose from the prompt, or pass `-account ACCOUNT` or `-pid PID`.\n\n### No database key could be verified\n\nMake sure WeChat was signed in and fully loaded, and that the selected local\naccount matches it. If a capture was retained, retry with\n`wcctl key extract -capture PATH` before acquiring again.\n\n### Acquisition stopped and retained a partial capture\n\n`wcctl` stops immediately if it cannot safely pause WeChat or complete the\ncapture. The retained capture can help diagnose or retry the operation, but it\nshould be treated as sensitive data.\n\n## License\n\n`wcctl` is distributed under the\n[Data Interoperability Source License 1.0](LICENSE). The license includes\npurpose, lawful-access, and territory conditions. Read it before using or\ndistributing the software.\n\nThird-party component information is available in\n[THIRD_PARTY_NOTICES](THIRD_PARTY_NOTICES).\n","wcctl 是一个运行在 macOS 上的命令行工具，用于安全、只读地访问本地 WeChat 4.x 客户端的联系人、群组、会话和消息数据。它提供结构化输出（表格或 JSON），支持与 AI 代理、脚本、搜索工具及数据分析软件集成；所有操作均在本地完成，无需上传数据，且可在 WeChat 运行时使用。适用于个人知识管理、本地化对话分析、自动化工作流构建及多账号数据协同处理等场景。","2026-08-20 02:30:12","CREATED_QUERY"]