catgirl — IRC client
Contents
Bugs
Send mail to ⟨list+catgirl@causal.agency⟩ or join #ascii.town on irc.tilde.chat.
Debian October 11, 2023 CATGIRL(1)
Commands
Any unique prefix can be used to abbreviate a command. For example, /join can be typed /j.
ChatCommands/away [message]
Set or clear your away status.
/cscommand
Send a command to ChanServ.
/invitenick
Invite a user to the channel.
/join [channel [key]]
Join the named channel, the current channel, or the channel you've been invited to.
/list [channel]
List channels.
/me [action]
Send an action message.
/msgnickmessage
Send a private message.
/names List users in the channel.
/nicknick
Change nicknames.
/noticemessage
Send a notice.
/nscommand
Send a command to NickServ.
/ops List channel operators.
/part [message]
Leave the channel.
/querynick
Start a private conversation.
/quit [message]
Quit IRC.
/quotecommand
Send a raw IRC command. Use M-- to show unknown replies.
/saymessage
Send a regular message.
/setnamename
Update realname if supported by the server.
/topic [topic]
Show or set the topic of the channel. Press Tab twice to copy the current topic.
/whois [nick]
Query information about a user or yourself.
/whowasnick
Query past information about a user.
UICommands/close [name | num]
Close the named, numbered or current window.
/copy [nick | substring]
Copy the most recent URL from nick or matching substring.
/debug Toggle logging in the <debug> window.
/execcommand
Run command with SHELL and interpret its output as input to the current window, including as
commands.
/help View this manual. Type q to return to catgirl.
/helptopic
List the server help for a topic. Try /helpindex for a list of topics.
/highlight [pattern]
List message highlight patterns or temporarily add a pattern. To permanently add a pattern, use
the highlight option.
/ignore [pattern]
List message ignore patterns or temporarily add a pattern. To permanently add a pattern, use the
ignore option.
/move [name] num
Move the named or current window to number.
/o... Alias of /open.
/open [count]
Open each of count most recent URLs.
/opennick | substring
Open the most recent URL from nick or matching substring.
/unhighlightpattern
Temporarily remove a message highlight pattern.
/unignorepattern
Temporarily remove a message ignore pattern.
/window
List all windows.
/windowname | substring
Switch to window by name or matching substring.
/windownum | /num
Switch to window by number.
OperatorCommands/ban [mask...]
List or ban masks from the channel.
/deop [nick...]
Revoke channel operator status from users or yourself.
/devoice [nick...]
Revoke voice from users or yourself in the channel.
/except [mask...]
List or add masks to the channel ban exception list.
/invex [mask...]
List or add masks to the channel invite list.
/kicknick [message]
Kick a user from the channel.
/mode [modes] [param...]
Show or set channel modes. In the <network> window, show or set user modes.
/op [nick...]
Grant users or yourself channel operator status.
/unbanmask...
Unban masks from the channel.
/unexceptmask...
Remove masks from the channel ban exception list.
/uninvexmask...
Remove masks from the channel invite list.
/voice [nick...]
Grant users or yourself voice in the channel.
Description
The catgirl IRC client provides a curses interface for TLS-only Internet Relay Chat. The only required
option is -h, the host name to connect to. See “EXAMPLES” for managing further configuration. Type
/help in catgirl to view the list of “COMMANDS” and “KEY BINDINGS”.
Options can be loaded from files listed on the command line. Files are searched for in
$XDG_CONFIG_DIRS/catgirl (usually ~/.config/catgirl) unless the path starts with ‘/’, ‘./’ or ‘../’.
Files and flags listed later on the command line take precedence over those listed earlier.
Each option is placed on a line, and lines beginning with ‘#’ are ignored. The options are listed below
following their corresponding flags.
-Cutil | copy = util
Set the utility used by /copy. Subsequent copy options append arguments to util. The URL to
copy is provided to util on standard input. The default is the first available of pbcopy(1),
wl-copy(1), xclip(1), xsel(1).
-Hseed,bound | hash = seed,bound
Set the initial seed of the nick and channel color hash function and the maximum IRC color value
produced by the function. The default is 0,75. To use only colors from the 16-color terminal
set, use 0,15. To disable nick and channel colors, use 0,0.
-Ipattern | highlight = pattern
Add a case-insensitive message highlight pattern, which may contain ‘*’, ‘?’ and ‘[]’ wildcards
as in glob(7). The format of the pattern is as follows:
nick[!user@host [command [channel [message]]]]
The commands which can be matched are: INVITE, JOIN, NICK, NOTICE, PART, PRIVMSG, QUIT, SETNAME.
-Nutil | notify = util
Send notifications using a utility. Subsequent notify options append arguments to util. The
window name and message are provided to util as two additional arguments, appropriate for
notify-send(1).
-Outil | open = util
Set the utility used by /open. Subsequent open options append arguments to util. The URL to
open is provided to util as an argument. The default is the first available of open(1),
xdg-open(1).
-R | restrict
Disable the /copy, /exec and /open commands, the notify option, and viewing this manual with
/help.
-Shost | bind = host
Bind to source address host when connecting to the server. To connect from any address over IPv4
only, use 0.0.0.0. To connect from any address over IPv6 only, use ::.
-T[format] | timestamp [= format]
Show timestamps by default, in the specified strftime(3) format. The format string may contain
raw IRC formatting codes. The default format is "%X".
-auser:pass | sasl-plain = user:pass
Authenticate as user with pass using SASL PLAIN. Leave pass blank to prompt for the password.
-cpath | cert = path
Load the TLS client certificate from path. The path is searched for in the same manner as
configuration files. If the private key is in a separate file, it is loaded with priv. With
sasl-external, authenticate using SASL EXTERNAL. Certificates can be generated with -g.
-e | sasl-external
Authenticate using SASL EXTERNAL, also known as CertFP. The TLS client certificate is loaded
with cert. See “Configuring CertFP”.
-gpath
Generate a TLS client certificate using openssl(1) and write it to path.
-hhost | host = host
Connect to host.
-ipattern | ignore = pattern
Add a case-insensitive message ignore pattern, which may contain ‘*’, ‘?’ and ‘[]’ wildcards as
in glob(7). The format of the pattern is as follows:
nick[!user@host [command [channel [message]]]]
The commands which can be matched are: INVITE, JOIN, NICK, NOTICE, PART, PRIVMSG, QUIT, SETNAME.
-jchannels [keys] | join = channels [keys]
Join the comma-separated list of channels with the optional comma-separated list of channel keys.
-kpath | priv = priv
Load the TLS client private key from path. The path is searched for in the same manner as
configuration files.
-l | log
Log chat events to files in paths $XDG_DATA_HOME/catgirl/log/network/channel/YYYY-MM-DD.log.
-mmode | mode = mode
Set the user mode.
-nnick [...] | nick = nick [...]
Set nickname to nick. The default nickname is the value of the environment variable USER.
Additional space-separated nicks will be tried in order if the first is not available, and all
nicks are treated as highlight words.
-o Print the server certificate chain to standard output in PEM format and exit.
-pport | port = port
Connect to port. The default port is 6697.
-q | quiet
Raise the default message visibility threshold for new windows, hiding general events (joins,
quits, etc.).
-rreal | real = real
Set realname to real. The default realname is the same as the nickname.
-sname | save = name
Save and load the contents of windows from name in $XDG_DATA_DIRS/catgirl, or an absolute or
relative path if name starts with ‘/’, ‘./’, or ‘../’.
-tpath | trust = path
Trust the self-signed certificate loaded from path and disable server name verification. The
path is searched for in the same manner as configuration files. See “Connecting to Servers with
Self-signed Certificates”.
-uuser | user = user
Set username to user. The default username is the same as the nickname.
-v | debug
Log raw IRC messages to the <debug> window as well as standard error if it is not a terminal.
-wpass | pass = pass
Log in with the server password pass. Leave pass blank to prompt for the password.
ConfiguringCertFP
1. Generate a new TLS client certificate:
$ catgirl -g ~/.config/catgirl/example.pem
2. Connect to the server using the certificate:
cert = example.pem
# or: $ catgirl -c example.pem
3. Identify with services or use sasl-plain, then add the certificate fingerprint to your account:
/ns CERT ADD
4. Enable SASL EXTERNAL to require successful authentication when connecting (not possible on all
networks):
cert = example.pem
sasl-external
# or: $ catgirl -e -c example.pem
ConnectingtoServerswithSelf-signedCertificates
1. Connect to the server and write its certificate to a file:
$ catgirl -o -h irc.example.org > ~/.config/catgirl/example.pem
2. Configure catgirl to trust the certificate:
trust = example.pem
# or: $ catgirl -t example.pem
Environment
SHELL The shell used by /exec. The default is /bin/sh.
USER The default nickname.
Examples
Join #ascii.town from the command line:
$ catgirl -h irc.tilde.chat -j '#ascii.town'
Create a configuration file in ~/.config/catgirl/tilde:
host = irc.tilde.chat
join = #ascii.town
Load the configuration file:
$ catgirl tilde
Exit Status
The catgirl client exits 0 if requested by the user, EX_UNAVAILABLE (69) if the connection is lost, and
>0 if any other error occurs.
Files
$XDG_CONFIG_DIRS/catgirl
Configuration files are searched for first in $XDG_CONFIG_HOME, usually ~/.config, followed by
the colon-separated list of paths $XDG_CONFIG_DIRS, usually /etc/xdg.
~/.config/catgirl
The most likely location of configuration files.
$XDG_DATA_DIRS/catgirl
Save files are searched for first in $XDG_DATA_HOME, usually ~/.local/share, followed by the
colon-separated list of paths $XDG_DATA_DIRS, usually /usr/local/share:/usr/share.
~/.local/share/catgirl
The most likely location of save files.
Interface
The catgirl interface is split into three areas.
StatusLine
The top line of the terminal shows window statuses. Only the currently active window and windows with
activity are listed. The status line for a window might look like this:
1+ #ascii.town +3 ~7 @
The number on the left is the window number. Following it may be one of ‘-’, ‘+’, ‘++’, as well as ‘=’.
These indicate the message visibility threshold and mute status of the window.
On the right side, the number following ‘+’ indicates the number of unread messages. The number
following ‘~’ indicates how many lines are below the scroll position. An ‘@’ indicates that there is
unsent input in the window's “Input Line”.
catgirl will also set the terminal title, if possible, to the name of the network and active window,
followed by the unread count for that window, and the unread count for all other windows in parentheses.
ChatArea
The chat area shows messages and events. Regular messages are shown with the nick between ‘<>’ angle
brackets. Actions are shown with the nick preceded by ‘*’. Notices are shown with the nick between ‘-’
hyphens.
Blank lines are inserted into the chat as unread markers.
While scrolling, the most recent 5 lines of chat are kept visible below a marker line.
InputLine
The bottom line of the terminal is where messages and commands are entered. When entering a message,
action or notice, your nick appears on the left, as it would in the “Chat Area”. When entering a
command, no nick is shown.
Formatting codes are shown in the input line as reverse-video uppercase letters. These will not appear
in the sent message.
Input that is too long to send as a single message will have a red background starting at the point where
it will be split into a second message.
Key Bindings
The catgirl interface provides emacs(1)-like line editing as well as keys for IRC formatting. The
prefixes C- and M- represent the control and meta (alt) modifiers, respectively.
LineEditingC-a Move to beginning of line.
C-b Move left.
C-d Delete next character.
C-e Move to end of line.
C-f Move right.
C-k Delete to end of line.
C-t Transpose characters.
C-u Delete to beginning of line.
C-w Delete previous word.
C-x Expand a text macro beginning with ‘\’.
C-y Paste previously deleted text.
M-Enter
Insert a newline without sending a command.
M-b Move to previous word.
M-d Delete next word.
M-f Move to next word.
M-q Collapse all whitespace.
Tab Complete nick, channel, command or macro.
Arrow and navigation keys also work as expected.
WindowKeysC-l Redraw the UI.
C-n Switch to next window.
C-p Switch to previous window.
C-r Scroll to previous line matching input.
C-s Scroll to next line matching input.
C-v Scroll down a page.
M-+ Raise message visibility threshold, hiding ignored messages, general events (joins, quits, etc.),
or non-highlighted messages.
M-- Lower message visibility threshold, showing ignored messages and unknown replies.
M-= Toggle mute. Muted windows do not appear in the status line unless you are mentioned.
M-/ Switch to previously selected window.
M-< Scroll to top.
M-> Scroll to bottom.
M-n Switch to window by number 0–9.
M-a Cycle through unread windows.
M-l List the contents of the window without word-wrapping and with timestamps. Press Enter to return
to catgirl.
M-m Insert a blank line in the window.
M-n Scroll to next highlight.
M-p Scroll to previous highlight.
M-s Reveal spoiler text.
M-t Toggle timestamps.
M-u Scroll to first unread line.
M-v Scroll up a page.
IRCFormattingC-zC-v Insert the next input character literally.
C-zb Toggle bold.
C-zc Set or reset color.
C-zi Toggle italics.
C-zo Reset formatting.
C-zp Manually toggle paste mode.
C-zr Toggle reverse color.
C-zs Set spoiler text (black on black).
C-zu Toggle underline.
Some color codes can be inserted with the following:
C-zA gray C-zN brown (dark red)
C-zB blue C-zO orange (dark yellow)
C-zC cyan C-zP pink (light magenta)
C-zG green C-zR red
C-zK black C-zW white
C-zM magenta C-zY yellow
To set other colors, follow C-zc by one or two digits for the foreground color, optionally followed by a
comma and one or two digits for the background color. To reset color, follow C-zc by a non-digit.
The color numbers are as follows:
0 white 8 yellow
1 black 9 light green
2 blue 10 cyan
3 green 11 light cyan
4 red 12 light blue
5 brown (dark red) 13 pink (light magenta)
6 magenta 14 gray
7 orange (dark yellow) 15 light gray
99 default
Name
catgirl — IRC client
Standards
Adam and Attila Molnar, invite-notifyExtension, IRCv3WorkingGroup,
https://ircv3.net/specs/extensions/invite-notify.
Jack Allnutt, Val Lorentz, and Daniel Oaks, ModernIRCClientProtocol, ircdocs,
https://modern.ircdocs.horse/index.html.
Kiyoshi Aman, Kyle Fuller, Stéphan Kochen, Alexey Sokolov, and James Wheare, MessageTags, IRCv3WorkingGroup, https://ircv3.net/specs/extensions/message-tags.
Kiyoshi Aman, extended-joinExtension, IRCv3WorkingGroup, https://ircv3.net/specs/extensions/extended-
join.
Waldo Bastian, Ryan Lortie, and Lennart Poettering, XDGBaseDirectorySpecification,
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html, November 24, 2010.
Christine Dodrill, Ryan, and James Wheare, chghostExtension, IRCv3WorkingGroup,
https://ircv3.net/specs/extensions/chghost.
Kyle Fuller, Stéphan Kochen, Alexey Sokolov, and James Wheare, server-timeExtension, IRCv3WorkingGroup, https://ircv3.net/specs/extensions/server-time.
Lee Hardy, Perry Lorier, Kevin L. Mitchell, Attila Molnar, Daniel Oakley, William Pitcock, and James
Wheare, ClientCapabilityNegotiation, IRCv3WorkingGroup, https://ircv3.net/specs/core/capability-
negotiation.
S. Josefsson, TheBase16,Base32,andBase64DataEncodings, IETF, RFC 4648,
https://tools.ietf.org/html/rfc4648, October 2006.
C. Kalt, InternetRelayChat:ClientProtocol, IETF, RFC 2812, https://tools.ietf.org/html/rfc2812, April
2000.
Janne Mareike Koschinski, setnameExtension, IRCv3WorkingGroup,
https://ircv3.net/specs/extensions/setname.
Mantas Mikulėnas, userhost-in-namesExtension, IRCv3WorkingGroup,
https://ircv3.net/specs/extensions/userhost-in-names.
Daniel Oaks, IRCFormatting, ircdocs, https://modern.ircdocs.horse/formatting.html.
Daniel Oaks, StandardRepliesExtension, IRCv3WorkingGroup,
https://ircv3.net/specs/extensions/standard-replies.
J. Oikarinen and D. Reed, InternetRelayChatProtocol, IETF, RFC 1459,
https://tools.ietf.org/html/rfc1459, May 1993.
William Pitcock and Jilles Tjoelker, IRCv3.1SASLAuthentication, IRCv3WorkingGroup,
https://ircv3.net/specs/extensions/sasl-3.1.
William Pitcock, multi-prefixExtension, IRCv3WorkingGroup, https://ircv3.net/specs/extensions/multi-
prefix.
James Wheare, MessageIDs, IRCv3WorkingGroup, https://ircv3.net/specs/extensions/message-ids.
James Wheare, replyClientTag, IRCv3WorkingGroup, https://ircv3.net/specs/client-tags/reply.
K. Zeilenga, Ed., ThePLAINSimpleAuthenticationandSecurityLayer(SASL)Mechanism, IETF, RFC 4616,
https://tools.ietf.org/html/rfc4616, August 2006.
Extensions
The catgirl client implements the causal.agency/consumer vendor-specific IRCv3 capability offered by
pounce(1). The consumer position is stored in the save file.
Synopsis
catgirl [-Relqv] [-Ccopy] [-Hhash] [-Ihighlight] [-Nnotify] [-Oopen] [-Sbind] [-T[timestamp]]
[-aplain] [-ccert] [-hhost] [-iignore] [-jjoin] [-kpriv] [-mmode] [-nnick] [-pport]
[-rreal] [-ssave] [-ttrust] [-uuser] [-wpass] [config...]
catgirl-o [-Sbind] [-hhost] [-pport] [config...]
catgirl-gcert