CATGIRL(1) | General Commands Manual | CATGIRL(1) |
NAME
catgirl
— IRC
client
SYNOPSIS
catgirl |
[-Relqv ] [-C
copy] [-H
hash] [-I
highlight] [-N
notify] [-O
open] [-S
bind]
[-T [timestamp]]
[-a plain]
[-c cert]
[-h host]
[-i ignore]
[-j join]
[-k priv]
[-m mode]
[-n nick]
[-p port]
[-r real]
[-s save]
[-t trust]
[-u user]
[-w pass]
[config ...] |
catgirl |
-o [-S
bind] [-h
host] [-p
port] [config ...] |
catgirl |
-g cert |
TABLE OF CONTENTS
- DESCRIPTION
- INTERFACE
- COMMANDS
- KEY BINDINGS
- ENVIRONMENT
- FILES
- EXIT STATUS
- EXAMPLES
- STANDARDS
- AUTHORS
- BUGS
DESCRIPTION
The catgirl
IRC client provides a curses
interface for Internet Relay Chat over TLS. 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 in this manual.
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
‘../
’. For example, a configuration
file at ~/.config/catgirl/tilde can be loaded by
running ‘catgirl tilde
’.
Each option is placed on a line, and lines beginning with
‘#
’ are ignored. An optional
‘=
’ may appear between an option and
its value. The options are listed below following their corresponding flags.
Flags and options in files are processed in the order they appear on the
command line, so later values override earlier values.
-C
util |copy
util- Set the utility used by the
/copy
command. Subsequentcopy
options add arguments to the utility. The URL to copy is provided to the utility on standard input. The default is the first available of pbcopy(1), wl-copy(1), xclip(1) or xsel(1). -H
seed,bound |hash
seed,bound- Set the seed for choosing nick and channel colours and the maximum IRC
colour value that will be chosen. Changing the seed will randomize the
chosen colours, in case you don't like the ones chosen for yourself or
your crush.
The default is 0,75, which uses colours in the 256-colour terminal set. To use only colours from the 16-colour terminal set, use 0,15. To disable nick and channel colours, use 0,0.
-I
pattern |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.
For example, to highlight whenever your crush joins your favourite channel:
highlight crush!*@* join #channel
-N
util |notify
util- Send notifications using a utility. Subsequent
notify
options add arguments to the utility. The window name and message are provided to the utility as two additional arguments, appropriate for notify-send(1). -O
util |open
util- Set the utility used by the
/open
command. Subsequentopen
options add arguments to the utility. The URL to open is provided to the utility as an additional argument. The default is the first available of open(1) or xdg-open(1). -R
|restrict
- Disable the
/copy
,/exec
and/open
commands, thenotify
option, and viewing this manual with/help
. -S
host |bind
host- Bind to source address host when connecting to the server. To connect from any IPv4 address, use 0.0.0.0. To connect from any IPv6 address, use ::.
-T
[format] |timestamp
[format]- Show timestamps by default. The optional format string is interpreted by strftime(3). The string may contain raw IRC formatting codes, if you can figure out how to enter them.
-a
user:pass |sasl-plain
user:pass- Authenticate with NickServ during connection using SASL PLAIN.
catgirl
will disconnect if authentication fails. Leave pass blank to prompt for the password whencatgirl
starts. -c
path |cert
path- Connect using a TLS client certificate loaded from
path, which is searched for in the same manner as
configuration files. If the private key is in a separate file,
additionally specify it with the
priv
option.To use this certificate to authenticate to NickServ using CertFP, use the
sasl-external
option. See Configuring CertFP.Client certificates can be generated with the
-g
flag. -e
|sasl-external
- Authenticate to NickServ during connection using CertFP via SASL EXTERNAL.
catgirl
will disconnect if authentication fails. The client certificate must be specified with thecert
option. See Configuring CertFP. -g
path- Generate a TLS client certificate using openssl(1) and write it to path.
-h
host |host
host- Connect to the IRC server host.
-i
pattern |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.
Visibility of ignored messages can be toggled using
M--
andM-+
. -j
channels [keys] |join
channels [keys]- Join the comma-separated list of channels with the optional comma-separated list of channel keys. No spaces may appear in either list.
-k
path |priv
path- Load the TLS client private key for a certificate loaded with the
cert
option from path, which is search for in the same manner as configuration files. -l
|log
- Log messages to files in $XDG_DATA_HOME/catgirl/log (usually ~/.local/share/catgirl/log). Directories are created for each network and channel, and files are created for each date in the format YYYY-MM-DD.log.
-m
modes |mode
modes- Set user modes as soon as possible after connecting.
-n
nick [...] |nick
nick [...]- Set the nickname with optional fallbacks, should one nick be unavailable.
Each nick is treated as a highlight word. The default nickname is the
value of
USER
. -o
- Connect to the server only to obtain its certificate chain and write it to standard output in PEM format.
-p
port |port
port- Connect to the IRC server on port. The default port is 6697.
-q
|quiet
- Raise the default message visibility threshold for new windows, hiding
general events (joins, quits, etc.). The threshold can be lowered with
M--
. -r
real |real
real- Set the “realname” which appears in
/whois
. The default is the same as the nickname. This is a good place to add your pronouns. -s
name |save
name- Persist windows and their scrollback in a file called
name in
$XDG_DATA_DIRS/catgirl (usually
~/.local/share/catgirl), or an absolute or
relative path if name starts with
‘
/
’, ‘./
’, or ‘../
’. -t
path |trust
path- Trust the self-signed certificate in path, which is searched for in the same manner as configuration files. Server name verification is also disabled. See Connecting to Servers with Self-signed Certificates.
-u
user |user
user- Set the username. This is almost entirely irrelevant, except that it's
more likely to remain stable, and
catgirl
uses it to choose nick colours. The default is the same as the nickname. -v
|debug
- Log raw IRC protocol to the <debug> window, as well as standard error if it is not a terminal.
-w
pass |pass
pass- Connect using a server password. Leave pass blank
(using an ‘
=
’) to prompt for the password whencatgirl
starts.
Configuring CertFP
CertFP allows you to authenticate with NickServ during connection using a TLS client certificate rather than your account password.
- Generate a new TLS client certificate:
$ catgirl -g ~/.config/catgirl/example.pem
- Connect to the server using the certificate by adding the following
configuration:
cert example.pem
- Identify with NickServ, then add the certificate fingerprint to your
account:
/ns CERT ADD
- Enable SASL EXTERNAL in your configuration to require successful
authentication when connecting (not possible on all networks):
cert example.pem sasl-external
Connecting to Servers with Self-signed Certificates
If connecting to a server fails with a certificate verification error due to a self-signed certificate, it needs to be trusted manually.
- Connect to the server and write its certificate to a file:
$ catgirl -o -h irc.example.org > ~/.config/catgirl/example.pem
- Configure
catgirl
to trust the certificate:trust example.pem
INTERFACE
The catgirl
interface is split into three
main areas.
Status Line
The top line of the terminal shows window statuses. Only the currently active window and windows with activity are shown. 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 ‘-
’,
‘+
’ or
‘++
’, 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 current scroll position. An
‘@
’ indicates that there is unsent
input waiting 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.
Chat Area
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 whenever there are messages in a window that is not active or the terminal is not focused (in some terminal emulators).
While scrolling, the most recent 5 lines of chat are kept visible below a marker line.
Input Line
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.
COMMANDS
Commands can be abbreviated if no other command shares the same
prefix. For example, /join
can be typed
/j
, and /window
can be typed
/wi
.
Chat Commands
/away
[message]- Set or clear your away status. This is sent in reply to private messages
and shown in
/whois
. /cs
command- Send a command to ChanServ, the service for managing registered channels.
/invite
nick- Invite someone to the channel.
/join
[channel [key]]- Join the named channel, the current channel (if you've left), or the channel you've been invited to.
/list
[search]- List channels, their user counts and their topics. The search can usually contain glob-style wildcards.
/me
[action]- Send an action message. These are used to write messages in third person.
/msg
nick message- Send a private message to someone.
/names
- List the users in the channel.
/nick
nick- Change your nickname.
/notice
message- Send a notice. It's best not to do this.
/ns
command- Send a command to NickServ, the service for managing your account.
/ops
- List channel operators. They can kick or ban someone from the channel.
/part
[message]- Leave the channel. Use
/close
if you want to close the window afterwards. /query
nick- Start a private conversation with someone.
/quit
[message]- Disconnect from IRC and close
catgirl
. You can do this even quicker withC-c
. /quote
command- Send a raw IRC command. Often
catgirl
will not know how to interpret the results. You can useM--
to show unknown server responses in the <network> or channel windows. /say
message- Send a regular message. This is useful if the message you want to send begins with a slash.
/setname
name- Update your “realname” if the server supports it. This may be broadcast to other users with clients that support it.
/topic
[topic]- Show or set the topic of the channel. Press
Tab
twice immediately after/topic
to copy the current topic. /whois
[nick]- Query information about a user or yourself.
/whowas
nick- Query past information about a user.
Interface Commands
/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.
/exec
command- 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 tocatgirl
. /help
topic- List the server help for a topic. Try
/help index
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.
/open
nick | substring- Open the most recent URL from nick or matching substring.
/unhighlight
pattern- Temporarily remove a message highlight pattern.
/unignore
pattern- Temporarily remove a message ignore pattern.
/window
- List all windows.
/window
name | substring- Switch to window by name or matching substring.
/window
num |/
num- Switch to window by number.
Operator Commands
/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.
/kick
nick [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.
/unban
mask ...- Unban masks from the channel.
/unexcept
mask ...- Remove masks from the channel ban exception list.
/uninvex
mask ...- Remove masks from the channel invite list.
/voice
[nick ...]- Grant users or yourself voice in the channel.
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.
Line Editing
C-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.
Window Keys
C-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 tocatgirl
. 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.
IRC Formatting
C-z C-v
- Insert the next input character literally.
C-z b
- Toggle bold.
C-z c
- Set or reset color.
C-z i
- Toggle italics.
C-z o
- Reset formatting.
C-z p
- Manually toggle paste mode.
C-z r
- Toggle reverse color.
C-z s
- Set spoiler text (black on black).
C-z u
- Toggle underline.
Some color codes can be inserted with the following:
C-z
A |
gray | C-z
N |
brown (dark red) |
C-z
B |
blue | C-z
O |
orange (dark yellow) |
C-z
C |
cyan | C-z
P |
pink (light magenta) |
C-z
G |
green | C-z
R |
red |
C-z
K |
black | C-z
W |
white |
C-z
M |
magenta | C-z
Y |
yellow |
To set other colors, follow C-z c
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-z c
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 |
ENVIRONMENT
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.
EXIT STATUS
The catgirl
client exits 0 if requested by
the user, 69 if the connection is lost, and >0 if any other error
occurs.
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
STANDARDS
- Adam and Attila Molnar, invite-notify Extension, IRCv3 Working Group, https://ircv3.net/specs/extensions/invite-notify.
- Jack Allnutt, Val Lorentz, and Daniel Oaks, Modern IRC Client Protocol, ircdocs, https://modern.ircdocs.horse/index.html.
- Kiyoshi Aman, Kyle Fuller, Stéphan Kochen, Alexey Sokolov, and James Wheare, Message Tags, IRCv3 Working Group, https://ircv3.net/specs/extensions/message-tags.
- Kiyoshi Aman, extended-join Extension, IRCv3 Working Group, https://ircv3.net/specs/extensions/extended-join.
- Waldo Bastian, Ryan Lortie, and Lennart Poettering, XDG Base Directory Specification, https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html, November 24, 2010.
- Christine Dodrill, Ryan, and James Wheare, chghost Extension, IRCv3 Working Group, https://ircv3.net/specs/extensions/chghost.
- Kyle Fuller, Stéphan Kochen, Alexey Sokolov, and James Wheare, server-time Extension, IRCv3 Working Group, https://ircv3.net/specs/extensions/server-time.
- Lee Hardy, Perry Lorier, Kevin L. Mitchell, Attila Molnar, Daniel Oakley, William Pitcock, and James Wheare, Client Capability Negotiation, IRCv3 Working Group, https://ircv3.net/specs/core/capability-negotiation.
- S. Josefsson, The Base16, Base32, and Base64 Data Encodings, IETF, RFC 4648, https://tools.ietf.org/html/rfc4648, October 2006.
- C. Kalt, Internet Relay Chat: Client Protocol, IETF, RFC 2812, https://tools.ietf.org/html/rfc2812, April 2000.
- Janne Mareike Koschinski, setname Extension, IRCv3 Working Group, https://ircv3.net/specs/extensions/setname.
- Mantas Mikulėnas, userhost-in-names Extension, IRCv3 Working Group, https://ircv3.net/specs/extensions/userhost-in-names.
- Daniel Oaks, IRC Formatting, ircdocs, https://modern.ircdocs.horse/formatting.html.
- Daniel Oaks, Standard Replies Extension, IRCv3 Working Group, https://ircv3.net/specs/extensions/standard-replies.
- J. Oikarinen and D. Reed, Internet Relay Chat Protocol, IETF, RFC 1459, https://tools.ietf.org/html/rfc1459, May 1993.
- William Pitcock and Jilles Tjoelker, IRCv3.1 SASL Authentication, IRCv3 Working Group, https://ircv3.net/specs/extensions/sasl-3.1.
- William Pitcock, multi-prefix Extension, IRCv3 Working Group, https://ircv3.net/specs/extensions/multi-prefix.
- James Wheare, Message IDs, IRCv3 Working Group, https://ircv3.net/specs/extensions/message-ids.
- James Wheare, reply Client Tag, IRCv3 Working Group, https://ircv3.net/specs/client-tags/reply.
- K. Zeilenga, Ed., The PLAIN Simple Authentication and Security Layer (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.
AUTHORS
June McEnroe <june@causal.agency>
BUGS
Send mail to
<list+catgirl@causal.agency>
or join #ascii.town
on
irc.tilde.chat
.
May 24, 2024 | OpenBSD 7.6 |