Skip to content

All projects

WeChat history / CLI + TUI · macOS

chatvault

WeChat keeps your history on one device, and a new phone, a cleanup or a recalled message each take a piece of it. chatvault copies and decrypts the WeChat 4 for Mac databases, merges them into one SQLite vault in ~/Documents/ChatVault, and writes each chat’s month as a Markdown and a JSON Lines file you can search, back up or feed to other tools.

chatvault 0.3.0 is a free Apache-2.0 command-line tool for Apple silicon and Intel Macs. No account needed.

Why chatvault

WeChat’s own backup moves a whole device and gives you nothing you can read. Most export tools dump everything once, and next month you start over. chatvault works the other way round. The vault only grows, and the exports follow it. The first sync of 480,000 messages takes about 25 seconds; after that a sync usually takes about a second and rewrites only the months that gained messages.

Project snapshot

Before the first sync, import the databases’ keys with chatvault keys import keys.json. chatvault check says what is still missing. WeChat 4.x for Mac only. The decrypted copies stay in the vault folder on your Mac, so keep that folder out of cloud drives and repositories.

~1 s

A sync with nothing new


0

Originals lost to a recall; the recall is kept beside them


4

Export formats: Markdown, text, JSON Lines and JSON


0.3.0

Current release · Apache-2.0

Recalls, renames and cleanups lose nothing

1/3


A message keeps the form it first entered the vault in. If WeChat later shows it recalled or changed, the new form is stored as a revision, and the export still shows the original, marked as recalled. Renamed contacts and groups keep their history, and old databases WeChat cleans up stay in the vault.

Organise once, the exports follow

2/3


chatvault chat set 家人群 --folder family --alias Family names a chat and files it in a folder; --hide keeps official accounts and the like out. On the next sync the exported files move into the folder and the old ones are removed; each chat’s directory is its WeChat ID, so a renamed group stays where it is. A second export, say group chats only in another folder, is one chatvault export add.

Read your history in the terminal

3/3


Run chatvault on its own for the interactive screen: every chat by recent activity, / to filter, enter to read (scrolling on from one month into the next), o to show the exported file in Finder, a for an alias, f for a folder, h to hide, s to sync in the background. For scripts, sync, chats, show and export each work on their own.