cli-qq is a terminal QQ client powered by NapCatQQ. The first version focuses on a small but usable TUI: connect to NapCat over OneBot WebSocket, receive private/group messages, send text messages, and persist message history locally in SQLite.
- Start NapCatQQ and enable its OneBot WebSocket server.
- Run cli-qq:
cargo runOn first launch, cli-qq creates cli-qq.toml:
[napcat]
ws_url = "ws://127.0.0.1:3001/"
access_token = ""
[storage]
database_url = "sqlite://cli-qq.db"
[ui]
history_limit = 200NapCat's default 6099 port is usually the WebUI port, not the OneBot
WebSocket port. In NapCat WebUI, open network configuration, create and enable a
WebSocket Server, then put that ws://host:port/ address in ws_url.
Use the token from that OneBot network configuration, not the WebUI login token.
You can also override common settings from the command line:
cargo run -- --ws-url ws://127.0.0.1:3001/ --database-url sqlite://cli-qq.dbj/kor arrow keys: move through conversationsgg/G: jump to the first/last conversationCtrl+u/Ctrl+d: move by a larger stepn: jump to the next unread conversationTab: switch focus between the conversation list, message pane, and input box- In the message pane,
j/kor arrow keys select a message. - Press
Enteron a selected message to open a centered action menu, then usej/kor arrow keys andEnterto choose an action. - In the message pane,
Gjumps to the latest message. - In the message pane,
PageUp/PageDownorCtrl+u/Ctrl+dmove by a larger step. - The bottom status bar shows
cli-qqversion, connection state, account info, NapCat version, and the:helphint. :from the conversation list: enter command inputEnter: open input from the list, or send from the input boxCtrl+Enter: insert a newline while editing a messager: reconnect to NapCatqfrom the conversation list, orCtrl+Canywhere: quit
Plain text is always sent as message content, including QQ expression-style text such
as /bx. Commands use a : prefix:
:pm <user_id> <message>
:group <group_id> <message>
:img <file-or-url>
:face <face_id>
:at <user_id> <message>
:reply <message>
:replyid <message_id> <message>
:react <emoji_id>
:recall
:forward pm|group <target_id> [message_id]
:download [url-or-file-id]
:file <path> [name]
:refresh
:history [count]
:friends
:friendcats
:groups
:recent [count]
:me
:status
:version
:caps
:read
:readall
:like <user_id> [times]
:poke [user_id]
:sign [group_id]
:online <status> [ext_status] [battery_status]
:faces [count]
:help
:help opens an in-app help popup with focus rules, message actions, and command details.