Skip to content
ekollof edited this page Jun 10, 2026 · 12 revisions

Usage

Quick start

/account add work user@example.com mypassword
/account connect work

Accounts

/account list                         # list configured accounts
/account add <name> <jid> <password>  # add an account
/account connect <name>               # connect
/account disconnect <name>            # disconnect
/account reconnect <name>             # reconnect (e.g. after network change)
/account delete <name>                # permanently remove
/account register <name> <jid> <password>  # register a new account on the server (XEP-0077)
/account unregister <name>            # cancel account registration on the server (XEP-0077)
/account password <name> <new-password>    # change account password in-band (XEP-0077)

Messaging

Private messages (PM)

/open user@example.com       # open a direct chat buffer
/query user@example.com      # alias for /open
/query user@example.com Hi!  # open and send an opening message

Close a PM buffer with /close. The buffer will not be recreated automatically on the next connect.

Sending messages

Type your message and press Enter in any chat buffer. Or:

/msg <text>    # send text in the current buffer

Multi-User Chat (MUC)

Joining rooms

/join room@conference.example.com
/enter room@conference.example.com   # alias

Leaving rooms

/close        # leave the room and close the buffer
/part         # leave without closing (buffer stays)

Nicklist prefixes

Each occupant's nick is prefixed to show their role/affiliation (XEP-0045):

Prefix Role / Affiliation Meaning
~ affiliation: owner Room owner — full control
& affiliation: admin Administrator
@ role: moderator Can kick and mute
% affiliation: member Registered member
+ role: participant Standard occupant with voice
? role: visitor Read-only in moderated rooms
! affiliation: outcast Banned
. (none) No role/affiliation set

MUC management commands

/topic <text>             # set room topic
/topic                    # clear room topic
/nick <newnick>           # change your nick in the current room
/kick <nick> [reason]     # kick an occupant (requires moderator role)
/ban <jid> [reason]       # ban by JID (requires admin/owner role)
/invite <jid> [reason]    # invite someone to the current room (XEP-0249)
/selfping                 # verify you are still in the room (XEP-0410)

Message features

Message Correction — /edit and /edit-to (XEP-0308)

Opens an interactive picker showing your last 20 non-retracted sent messages. Select one and press Enter; the input bar is pre-filled with the original text ready for editing.

/edit                        # open picker — choose message to correct
/edit-to <id> <new text>     # correct a specific message by ID (used internally by picker)

After selecting a message in the picker, edit the pre-filled text in the input bar and press Enter to send the correction. The corrected line appears with an [edit] prefix in the buffer.

Message Retraction — /retract (XEP-0424)

Deletes one of your own sent messages via an interactive picker:

/retract

Navigate with /, press Enter to confirm, q/Esc to cancel. Supporting clients show a tombstone where the message was.

Message Moderation — /moderate (XEP-0425)

Remove any message from a MUC (requires moderator role):

/moderate [reason]

Opens an interactive picker for the last 20 messages in the room.

Message Reactions — /react (XEP-0444)

React to the last received message:

/react 👍
/react ❤️

The emoji argument (everything after /react) is sent as a single reaction targeting the most recent non-own message in the buffer.

Message Replies — /reply (XEP-0461)

/reply                   # interactive picker — choose which message to reply to
/reply <text>            # reply immediately to the last received message

When using the picker, after selecting a message the input bar is pre-filled with /reply-to <id> ; type your reply and press Enter.

Received replies are shown with a prefix quoting the original message:

  • If the original is short (≤ 5 newlines and no line longer than 200 characters) the full quoted text is shown: ↪ the original message
  • Longer originals are truncated to 40 characters: ↪ the first forty chars…
  • If the original is not in the scroll-back buffer: ↪ [reply]

Spoiler Messages — /spoiler (XEP-0382)

/spoiler <text>
/spoiler hint: <hint text> :: <message text>

Supporting clients hide the content behind a spoiler warning with the optional hint text displayed.

/me actions (XEP-0245)

/me <action text>

Displays as: * nick action text

Ephemeral Messages — /ephemeral (XEP-0466)

/ephemeral <seconds> <text>

Sends a message with an expiry timer. The message is shown with a [⏱ Ns] prefix on receive and automatically tombstoned (replaced with a deletion notice) after the given number of seconds on both the sender's and receiver's side (when the receiving client supports XEP-0466). A no-permanent-store hint is included so the message is not archived in MAM.

Notification Settings — /notify (XEP-0492)

/notify                             # show current preference for this buffer
/notify <jid>                       # show preference for a specific JID
/notify [<jid>] always              # notify on every message
/notify [<jid>] on-mention          # notify only when mentioned (default)
/notify [<jid>] never               # suppress all notifications

Per-chat notification preference stored in the XEP-0402 bookmark for that JID. Changes are published immediately; other clients supporting XEP-0492 will pick up the new preference.


File sharing — /upload (XEP-0363)

/upload                  # interactive file picker
/upload /path/to/file    # upload directly

The file is uploaded via HTTP File Upload and the download URL is sent to the current buffer. Shared images can be displayed inline when xmpp.look.icat is enabled (see Configuration → Inline image display).

Supported inline image sources:

  • XEP-0447 / XEP-0385 — SFS and SIMS file-sharing payloads
  • XEP-0448 — encrypted file sharing (decrypted local path)
  • XEP-0449 — sticker element with sibling SFS image
  • XEP-0514 — custom emoji spans in message markup, resolved via file hashes
  • XEP-0231 — Movim stickers using XHTML-IM <img src='cid:…@bob.xmpp.org'/> (fetched from the sender via IQ-get, cached under ~/.local/share/weechat/xmpp/bob_cache/<account>/)

Message Archive Management — /mam

Fetch historical messages from the server archive:

/mam        # fetch last 7 days (default)
/mam 14     # fetch last 14 days

MAM history is cached locally in LMDB and loaded instantly on subsequent connects. Only messages newer than the last cached timestamp are fetched.

MAM Preferences (XEP-0441)

/mam prefs                            # show current server archiving preferences
/mam prefs default always             # archive everything by default
/mam prefs default never              # archive nothing by default
/mam prefs default roster             # archive only roster contacts
/mam prefs always <jid>               # always archive messages with this JID
/mam prefs never <jid>                # never archive messages with this JID

Encryption

OMEMO (XEP-0384)

/omemo                         # enable OMEMO for current buffer (PM or non-anonymous MUC)
/plain                         # disable encryption (plaintext)
/omemo check                   # verify bundle is published on server
/omemo republish                # republish legacy OMEMO bundle nodes (axolotl namespace only)
/omemo status                  # show device ID and status
/omemo reset-keys              # reset key database (forces full renegotiation)
/omemo fetch [jid] [device-id] # force devicelist/bundle refresh
/omemo kex [jid] [device-id]   # force key transport to a specific device

MUC OMEMO support (multi-recipient encryption in non-anonymous rooms) is implemented but experimental and untested. Use with caution. See the main repo's docs/planning-muc-omemo.md for status (marked complete-but-untested).

The encryption status bar item shows OMEMO (or OMEMO (pending) in MUCs) when active (see Configuration).

PGP

/pgp <keyid>    # activate PGP with the given key ID
/pgp status     # show current PGP key
/pgp reset      # clear PGP key

Plaintext

/plain          # disable all encryption for the current buffer

Message status glyphs

Sent messages display an inline glyph that updates automatically:

Glyph Meaning
Pending — sent, no receipt yet
Delivered — recipient's client acknowledged receipt (XEP-0184)
✓✓ Read — recipient marked it displayed (XEP-0333)

Message Styling (XEP-0393)

Incoming messages that use XEP-0393 spans are rendered with WeeChat color/attribute codes:

Markup Rendered as
*bold* Bold
_italic_ Italic
`code` Monospace gray
~strikethrough~ Darkgray
> quote Green prefix

Message Markup (XEP-0394)

When an incoming message carries a <markup xmlns='urn:xmpp:markup:0'> element it takes precedence over XEP-0393 ad-hoc styling. Supported spans:

Element Rendered as
<span emphasis> Italic
<span strong> Bold
<span code> Cyan monospace
<span deleted> Dark grey
<bcode> Grey monospace block
<bquote> Green > prefix per line
<list>/<li> Bullet markers

Receive-only — send side not implemented.


XHTML-IM rendering (XEP-0071)

When an incoming message carries an <html> body, it is rendered with WeeChat formatting. No configuration needed.

HTML element Rendered as
<b>, <strong> Bold
<i>, <em> Italic
<u> Underline
<del>, <s> Darkgray
<code>, <tt> Gray
<pre> Gray preformatted block
<a href="..."> text (blue URL)
<img alt="..."> [alt] placeholder
<br> Newline
<blockquote> Green > prefix per line
<span style="color:..."> Terminal color

Link previews (XEP-0511)

Incoming: OpenGraph metadata arriving in <rdf:Description> stanzas is rendered as a compact single-line preview in darkgray below the message.

To disable incoming previews:

/set xmpp.look.incoming_link_preview off
/save

Outgoing: URLs you send trigger a background fetch; metadata is sent as a follow-up stanza so supporting clients show a preview.

To disable outgoing previews:

/set xmpp.look.outgoing_link_preview off
/save

Roster management

/roster                      # display contact list
/roster add <jid> [name]     # add a contact
/roster del <jid>            # remove a contact

Bookmarks (XEP-0402)

/bookmark                              # list bookmarks
/bookmark add [jid] [name]             # add a bookmark (defaults to current room)
/bookmark del <jid>                    # remove a bookmark
/bookmark autojoin <jid> <on|off>      # toggle autojoin for a bookmarked room

Privacy / blocking (XEP-0191)

/block <jid> [jid ...]     # block one or more JIDs
/unblock [jid ...]         # unblock; no arguments unblocks all
/blocklist                  # list all blocked JIDs

Service discovery

/disco [jid]     # list services and features (XEP-0030)
/list [keywords] # search public MUC rooms (XEP-0433)
/ping [jid]      # send XMPP ping (XEP-0199); defaults to server

Ad-hoc commands (XEP-0050)

/adhoc example.com                              # list available commands
/adhoc example.com announce                     # execute a command (form rendered inline)
/adhoc example.com announce <id> field=value    # submit a data form field

Required form fields are marked with *. Multi-step sessions are supported.


PubSub feed reader (XEP-0060)

/feed                                # fetch subscriptions from all auto-discovered services
/feed discover                       # list auto-discovered PubSub services
/feed discover --all                 # fetch every node from every discovered service
/feed <service-jid>                  # fetch all subscribed nodes on a specific service
/feed <service-jid> --all            # discover and fetch all nodes via disco#items
/feed <service-jid> <node>           # fetch a specific node into a dedicated buffer
/feed ... --limit N                  # override item limit (default 20)
/feed ... --before <id>              # page to items older than <id> (XEP-0059 RSM)
/feed ... --latest                   # clear saved RSM cursor; go back to newest page
/feed subscribe <service> <node>     # subscribe to a node (XEP-0060)
/feed unsubscribe <service> <node>   # unsubscribe from a node
/feed subscriptions <service>        # list subscribed nodes on a service

Each node is displayed in its own dedicated WeeChat buffer. The RSM cursor is persisted in LMDB so the next /feed invocation continues from where you left off. Use --latest to reset the cursor and return to the newest page. Items already shown in a previous fetch are not re-displayed (LMDB deduplication).


Microblogging (XEP-0277 / XEP-0472)

Publish posts, threaded replies, boosts, and retractions to XMPP PubSub microblog nodes (Movim, Libervia, ejabberd with PubSub).

Short aliases (#N)

When you fetch a feed, each displayed item gets a green #N label. Use #N in place of the full item-id in any write command while in a feed buffer:

/feed reply #3 That's a great point!
/feed repeat #3 Great content
/feed comments #3
/feed retract #3

Posting

# Long form (explicit service and node)
/feed post <service-jid> <node> [--open] [--title <title>] <text>

# Short form from a feed buffer (service/node inferred)
/feed post <text>
/feed post --open <text>
/feed post --title "My headline" <text>
/feed post -- <text>         # use '--' when body starts with a JID-like word or URL

--open sets pubsub#access_model=open so the post is publicly readable. Use -- when the body starts with a word containing . or @ to prevent the parser treating it as a service JID.

# Publish to your PEP microblog
/feed post movim.eu urn:xmpp:microblog:0 Hello from WeeChat!

# Public post
/feed post movim.eu urn:xmpp:microblog:0 --open This is a public post

# Short form from a feed buffer
/feed post Hello everyone!

# Short form with body starting with a URL
/feed post -- https://example.com check this out

Replying (threaded)

# Long form
/feed reply <service-jid> <node> <item-id|#N> <text>

# Short form
/feed reply #N <text>
/feed reply movim.eu urn:xmpp:microblog:0 abc-1234 That's a great point!
/feed reply #3 Nice observation!

Boosting / repeating (XEP-0472 §4.5)

# Long form
/feed repeat <service-jid> <node> <item-id> [comment]

# Short form
/feed repeat #N [comment]
/feed repeat movim.eu urn:xmpp:microblog:0 abc-1234
/feed repeat #3 Great content — everyone should read this

Retracting (deleting)

/feed retract <service-jid> <node> <item-id>
/feed retract #N

Server errors (forbidden, item-not-found) are reported in the buffer.

Fetching comments

/feed comments <service-jid> <node> <item-id|#N>
/feed comments #N

If the post has a <link rel='replies'> element (XEP-0277 §3), this opens a dedicated buffer for the comments node. Run /feed <service> <node> first to populate the cache if the hint is missing.

When comments are available the feed buffer shows:

  Comments: /feed comments #3

Incoming posts from contacts' microblog PEP nodes are rendered automatically when a push event is received. See Microblogging for full details.


Presence / status

/mood [mood [text]]                         # publish mood (XEP-0107)
/activity [category[/specific] [text]]      # publish activity (XEP-0108)
/whois [jid]                                # fetch vCard (XEP-0054)
/setvcard <field> <value>                   # publish a vCard field
/setavatar <filepath>                       # publish avatar (XEP-0084)
/buzz                                       # send attention request (XEP-0224)

Interactive picker

Several commands open an in-buffer picker when given no arguments:

Key Action
/ Move selection
Enter Confirm
q / Esc Cancel

Commands that use the picker: /edit, /retract, /moderate, /reply, /upload.


Raw XML (advanced)

/xml <stanza>    # send raw XML to the XMPP stream

Useful for testing server features or debugging. Be careful — sending malformed XML will disconnect you.

Clone this wiki locally