25 releases
| new 0.5.8 | Apr 14, 2026 |
|---|---|
| 0.5.7 | Feb 7, 2026 |
| 0.5.5 | Jan 25, 2026 |
| 0.5.2 | Jun 14, 2025 |
| 0.1.3 |
|
#830 in Command line utilities
82KB
1K
SLoC
rslack

Features
- Interactive channel selection with vim-like navigation (h,j,k,l or arrow keys)
- Multi-line message editor with cursor movement
- Read messages from channels (latest N messages, default: 10)
- Command-line options for direct channel and message specification
- Simple configuration via environment variables or config file
Installation
Using Homebrew
brew install kohbis/rslack/rslack
From Source
git clone https://github.com/kohbis/rslack.git
cd rslack
cargo build --release
# The binary will be available at ./target/release/rslack
Setup
1. Create a Slack App
- Go to Slack API: Create an App and create a new app
- Add your app to your workspace
2. Configure OAuth Permissions
- Navigate to OAuth & Permissions in your app settings
- Under Scopes, add the following User Token Scopes:
channels:read- To list available channelschannels:history- To read messages from channelschat:write- To post messages to channels
- Click Install App to Workspace
- Copy the OAuth Access Token from the OAuth Tokens & Redirect URLs section
3. Configure rslack
You can provide your Slack token in one of two ways:
Option 1: Environment Variable
export RSLACK_TOKEN=xoxp-your-token-here
Option 2: Configuration File
Create a .rslack file in your home directory:
echo "RSLACK_TOKEN=xoxp-your-token-here" > ${HOME}/.rslack
Note: If both methods are used, the configuration file takes precedence.
Usage
Basic Usage
Simply run the command to start the interactive interface:
rslack
This will:
- Display a list of available channels
- Allow you to select a channel using navigation keys
- Open a message editor where you can type your message
- Post the message to the selected channel
Navigation Keys
- Channel selection: Arrow keys or vim-style
h,j,k,l - Confirm selection:
Enter - Exit:
qorCtrl+c
Message Editor
- Type your message (supports multi-line messages)
- Move cursor: Up/Down arrow keys
- Post message:
Ctrl+p - Exit without posting:
Ctrl+c
Command-line Options
You can bypass the interactive interface by specifying options:
# Post to a specific channel
rslack -c general
# Post a specific message to a specific channel
rslack -c general -m "Hello, world!"
# Read messages from a channel (default: 10 messages)
rslack -r -c general
# Read a specific number of messages
rslack -r -c general -l 20
Options:
-c, --channel <CHANNEL>: Specify the channel-m, --message <MESSAGE>: Specify the message to post-r, --read: Read messages from channel instead of posting-l, --limit <LIMIT>: Number of messages to fetch (default: 10)
Development
Building and Running Locally
# Build and run in release mode
cargo run --release
# Build only
cargo build --release
Running Tests
cargo test
License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies
~9–17MB
~272K SLoC