rslack

Features
- Interactive channel selection with vim-like navigation (h,j,k,l or arrow keys)
- Multi-line message editor with cursor movement
- Command-line options for direct channel and message specification
- Simple configuration via environment variables or config file
Installation
Using Homebrew
From Source
# 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 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
Option 2: Configuration File
Create a .rslack file in your home directory:
Note: If both methods are used, the configuration file takes precedence.
Usage
Basic Usage
Simply run the command to start the interactive interface:
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
# Post a specific message to a specific channel
Options:
-c, --channel <CHANNEL>: Specify the channel to post to-m, --message <MESSAGE>: Specify the message to post
Development
Building and Running Locally
# Build and run in release mode
# Build only
Running Tests
License
This project is licensed under the MIT License - see the LICENSE file for details.