From: [email protected]
Date: 2016-10-21
Subject: Using irssi with Slack

Lately,  I'm  on a command-line kick. I'm missing the old BBS days.
Pine[1]) was my primary email client for about a decade. The  tech-
nology  may  have moved on, but we can still have some of that old-
school feel. In this how-to, I'll walk you through the  process  of
connecting to Slack with a terminal-based IRC client, irssi.

*Note:*  The  administrator  of your Slack team will need to enable
the IRC gateway before you will be able  to  use  external  clients
like irssi to connect to Slack.

For OSX:

Install Homebrew

Check to see if Homebrew is installed. Open Terminal and type

`which brew`

If  Homebrew is installed, which will return the path to brew, oth-
erwise, which will return nothing.

If brew is not already installed, visit brew.sh[2] to  install  it.
It's crazy easy.

Install irssi

Check to see if irssi is already installed. Open Terminal and type

`irssi -v`

If  irssi  is  installed, it will output the version, otherwise you
will get a command not found error.

If irssi is not installed, you can install it using brew.

`brew install irssi`

Brew will kick out a bunch of output and irssi should be installed,
eventually.

Get your configuration information from Slack

Log  into  Slack  and then visit this URL: https://iworkontheinter-
net.slack.com/account/gateways[3]. Look for  your  host,  username,
and password.

Now we will configure irssi to use these settings.

Open Terminal and type

`irssi -n your_slack_username`

This  starts  irssi and tells it to use your_slack_username as your
default username (or nick as it's called in IRC). This is  required
for IRC clients that connect to Slack.

In irssi, type the following:

`/server  add  -auto -ssl your_slack_host 6667 your_slack_password`
`/quit`

This adds the connection information  to  the  irssi  configuration
file  and sets irssi to automatically connect on startup. Now, when
you type irssi at the command line, it will  automatically  connect
to  Slack. From there, you can use the usual set of IRC client com-
mands to join channels and whatnot. Here are some tutorials on  us-
ing irssi.

Set Terminal to use Option as Meta

You  need to set Terminal to use Option as Meta so that you can use
command sequences within Terminal. You really, really  need  to  do
this.

 1. Open Terminal.
 2. In the Terminal menu, choose Preferences.
 3. Go to the Profiles tab.
 4. Within Profiles, go to the Keyboard tab.
 5. Check the box labeled Use Option as Meta key
 6. Repeat steps 5 & 6 for each profile you might want to use. Now
you can use command sequences like Opt-n to switch between  windows
in irssi.

For Linux

In  Linux, you won't use brew, you will use the appropriate package
manager for your platform. You  could  also  download  and  compile
irssi  from  source  if that's your jam. The install for irssi will
vary by distro but, you're a Linux  user,  so  you  were  expecting
this. The setup should be the same as above once you have irssi in-
stalled.

For Windows

There is a Windows installer for irssi. The  setup  should  be  the
same as above once you have irssi installed.

[1]: https://en.wikipedia.org/wiki/Pine_(email_client)
[2]: http://brew.sh/
[3]: https://iworkontheinternet.slack.com/account/gateways