~ober/jerboa-slack

Imported from ~/mine/jerboa-slack

download snapshot

about

# jerboa-slack

Mux-friendly Slack chat client written in Jerboa.

This repository also keeps a shallow checkout of Slack's official CLI at
`vendor/slack-cli`. That upstream CLI is for Slack app development; this client
uses Slack Web API methods for day-to-day chat.

## Run

```sh
export SLACK_BOT_TOKEN='xoxb-...'
JERBOA_HOME=/Users/user/mine/jerboa /Users/user/mine/jerboa/bin/jerboa run jerboa-slack.ss auth-test
JERBOA_HOME=/Users/user/mine/jerboa /Users/user/mine/jerboa/bin/jerboa run jerboa-slack.ss channels
JERBOA_HOME=/Users/user/mine/jerboa /Users/user/mine/jerboa/bin/jerboa run jerboa-slack.ss tui general
```

Useful commands:

```sh
make run
JERBOA_HOME=/Users/user/mine/jerboa /Users/user/mine/jerboa/bin/jerboa run jerboa-slack.ss history general 20
JERBOA_HOME=/Users/user/mine/jerboa /Users/user/mine/jerboa/bin/jerboa run jerboa-slack.ss send general "hello from jerboa"
JERBOA_HOME=/Users/user/mine/jerboa /Users/user/mine/jerboa/bin/jerboa run jerboa-slack.ss replies general 1712345678.000100
JERBOA_HOME=/Users/user/mine/jerboa /Users/user/mine/jerboa/bin/jerboa run jerboa-slack.ss reply general 1712345678.000100 "thread reply"
JERBOA_HOME=/Users/user/mine/jerboa /Users/user/mine/jerboa/bin/jerboa run jerboa-slack.ss react general 1712345678.000100 thumbsup
```

The TUI is intentionally line-oriented instead of raw-mode curses. Inside the
TUI, use `/help`, `/channels`, `/use <channel>`, `/history [limit]`, `/thread
<ts>`, `/reply <ts> <text>`, `/react <ts> <emoji>`, `/send <text>`, and
`/quit`. A normal non-empty line sends a message to the current channel.

## Slack Scopes

The token needs the Slack scopes that match what you want to do, commonly:

- `channels:read`, `groups:read`, `im:read`, `mpim:read`
- `channels:history`, `groups:history`, `im:history`, `mpim:history`
- `chat:write`
- `reactions:write`
- `users:read` for display names instead of raw Slack user IDs

recent commits