Skip to content

jnd0/slack-beam

Repository files navigation

Fling — Fast Slack CLI

fling is a lightweight CLI tool to send messages to Slack by name (#channel, @user) without needing to manually look up IDs.

Installation

# Clone the repository
git clone https://github.com/your-username/slack-beam.git
cd slack-beam

# Install dependencies
bun install

Authentication

Quick Start (One-Click)

Run the following command to log in:

bun src/cli.ts login

This 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).

Self-Hosting & Advanced Options

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

Usage

# 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

Development

# Run tests
bun test

# Run with Bun
bun src/cli.ts

About

A tool to automate your slack messages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors