fling is a lightweight CLI tool to send messages to Slack by name (#channel, @user) without needing to manually look up IDs.
# Clone the repository
git clone https://github.com/your-username/slack-beam.git
cd slack-beam
# Install dependencies
bun installRun the following command to log in:
bun src/cli.ts loginThis will open your browser to Slack for authentication. Once you approve, Fling will automatically capture and store your token using the official Fling authentication service (https://your-auth-service.com/exchange).
If you want to use your own Slack App credentials or host your own authentication service, see the Self-Hosting Guide.
Security Note: It is strongly recommended to use environment variables for secrets to avoid leaking them in your shell history.
# Using your own Client ID and Secret (Local Exchange) - Recommended
export FLING_CLIENT_ID="XXX"
export FLING_CLIENT_SECRET="YYY"
bun src/cli.ts login
# OR via CLI flags (NOT Recommended for secrets)
bun src/cli.ts login --client-id XXX --client-secret YYY
# Using a custom exchange service
bun src/cli.ts login --oauth-url https://your-service.com/exchange
# Manual token entry (Fallback)
bun src/cli.ts login --manual# Send a simple message
bun src/cli.ts #general "Hello world!"
# Send to a user
bun src/cli.ts @alice "Checking in..."
# Pipe from stdin
echo "Build failed!" | bun src/cli.ts #alerts
# Force refresh the name cache
bun src/cli.ts cache refresh
# Verbose mode
bun src/cli.ts #general "Message" -v# Run tests
bun test
# Run with Bun
bun src/cli.ts