Skip to content

Afefegeb/cli-qq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli-qq

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.

Quick start

  1. Start NapCatQQ and enable its OneBot WebSocket server.
  2. Run cli-qq:
cargo run

On 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 = 200

NapCat'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.db

Controls

  • j/k or arrow keys: move through conversations
  • gg/G: jump to the first/last conversation
  • Ctrl+u/Ctrl+d: move by a larger step
  • n: jump to the next unread conversation
  • Tab: switch focus between the conversation list, message pane, and input box
  • In the message pane, j/k or arrow keys select a message.
  • Press Enter on a selected message to open a centered action menu, then use j/k or arrow keys and Enter to choose an action.
  • In the message pane, G jumps to the latest message.
  • In the message pane, PageUp/PageDown or Ctrl+u/Ctrl+d move by a larger step.
  • The bottom status bar shows cli-qq version, connection state, account info, NapCat version, and the :help hint.
  • : from the conversation list: enter command input
  • Enter: open input from the list, or send from the input box
  • Ctrl+Enter: insert a newline while editing a message
  • r: reconnect to NapCat
  • q from the conversation list, or Ctrl+C anywhere: 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.

License

GNU Affero General Public License v3.0

About

A fast terminal QQ client powered by NapCatQQ, with real-time TUI messaging and local history.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages