Three years of frustration. Three times searching for something I knew I'd sent before.
2019 │ Looking for an address a friend sent me once
│ Open QQ → scroll → scroll → scroll → forget which year → give up
│
2020 │ Looking for a file shared in a group chat
│ Open QQ → scroll → scroll → scroll → don't remember filename → give up
│
2021 │ Looking for a work message
│ Open QQ → scroll → scroll → scroll → wrong group → give up
The third time, I wrote a tool.
Now:
qq search "keyword" # 0.3 seconds. No QQ. No scrolling.| Command | Description |
|---|---|
qq sessions |
List recent chat sessions |
qq history <id> |
View chat history with timestamps |
qq history <id> --since 2024-01-01 |
Filter by date range |
qq index |
Build full-text search index |
qq search "keyword" |
Search across all messages |
qq export <id> -o chat.md |
Export as Markdown |
qq export <id> --format jsonl |
Export as JSONL |
qq bundle <id> -o images.zip |
Download all images |
qq plugin send <id> "message" |
Send message via NapCat |
| Platform | Download |
|---|---|
| Windows | Download qq.exe from Releases |
| Linux/macOS | Download qqcli binary |
# View recent sessions
qq sessions
# Search everything
qq index && qq search "meeting"
# Export a chat
qq export 123456789 -o chat.md┌─────────────────────────────────────────────────────────────┐
│ qqcli │
├─────────────────────────────────────────────────────────────┤
│ Rust · rusqlite · DuckDB · tokio · clap │
├─────────────────────────────────────────────────────────────┤
│ QQ NT local database: Documents\Tencent Files\{QQ}\ │
│ nt_qq\nt_db\nt_msg.db │
└─────────────────────────────────────────────────────────────┘
Q: Database not found?
Make sure QQ NT has been run at least once.
Q: Database encrypted?
Use qq-nt-decrypt to decrypt.
Q: Search is slow?
Run
qq indexfirst to build the search index.
Q: Where is the database?
Default location:
Documents\Tencent Files\{QQ}\nt_qq\nt_db\nt_msg.dbCustom path:
export QQCLI_DB_PATH=/path/to/nt_msg.db
Contributions welcome! See CONTRIBUTING.md for setup instructions.
MIT
Time saved from scrolling can be used for something else.
