- 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
brew install kohbis/rslack/rslackgit clone https://github.com/kohbis/rslack.git
cd rslack
cargo build --release
# The binary will be available at ./target/release/rslack- Go to Slack API: Create an App and create a new app
- Add your app to your workspace
- 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
You can provide your Slack token in one of two ways:
export RSLACK_TOKEN=xoxp-your-token-hereCreate a .rslack file in your home directory:
echo "RSLACK_TOKEN=xoxp-your-token-here" > ${HOME}/.rslackNote: If both methods are used, the configuration file takes precedence.
Simply run the command to start the interactive interface:
rslackThis 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
- Channel selection: Arrow keys or vim-style
h,j,k,l - Confirm selection:
Enter - Exit:
qorCtrl+c
- Type your message (supports multi-line messages)
- Move cursor: Up/Down arrow keys
- Post message:
Ctrl+p - Exit without posting:
Ctrl+c
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!"Options:
-c, --channel <CHANNEL>: Specify the channel to post to-m, --message <MESSAGE>: Specify the message to post
# Build and run in release mode
cargo run --release
# Build only
cargo build --releasecargo testThis project is licensed under the MIT License - see the LICENSE file for details.
