Skip to content

echohello-dev/yap-on-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

yap-on-slack

πŸ—£οΈ Simulate realistic Slack conversations for testing and demos

Post realistic support conversations to Slack with proper formatting, threading, and reactions. Perfect for testing chat interfaces, training support teams, or populating demo workspaces.

Features

  • πŸ“ Rich text formatting - Bold, italic, code, links, and emoji support
  • 🧡 Threaded conversations - Replies automatically grouped in threads
  • πŸ‘ Smart reactions - Auto-add reactions based on message content
  • πŸ€– AI message generation - Use Gemini 3 Flash to create realistic conversations
  • πŸ™ GitHub context - Generate messages from real commits, PRs, and issues
  • 🎨 Beautiful terminal UI - Progress tracking with rich output
  • 🐳 Docker ready - Easy deployment with container support
  • βš™οΈ Flexible configuration - CLI arguments and JSON message definitions
  • βœ… Message validation - Schema validation with Pydantic
  • πŸ”’ Multiple auth methods - Session tokens, User OAuth, or Bot tokens

Quick Start

Prerequisites

Authentication

You'll need Slack credentials to post messages. We support multiple authentication methods:

  • Session Tokens (xoxc/xoxd) - Quick setup, browser-based (expires frequently)
  • User OAuth Token (xoxp) - Recommended for production use
  • Bot Token (xoxb) - For bot-based workflows

πŸ“– See docs/usage.md for detailed setup instructions for each method.

⚠️ Security: Read SECURITY.md for important security considerations, especially for session tokens.

Installation

Option 1: Install via pipx (recommended)

# Install globally with pipx
pipx install yap-on-slack

# Or install directly from GitHub
pipx install git+https://github.com/echohello-dev/yap-on-slack.git

# Initialize config files in current directory
yos init

# Edit .env with your credentials
# See docs/usage.md for how to obtain each value
nano .env

# Run with default messages
yos run

Option 2: Install via pip

pip install yap-on-slack

# Or from GitHub
pip install git+https://github.com/echohello-dev/yap-on-slack.git

yos init && yos run

Option 3: From source (development)

# Clone the repository
git clone https://github.com/echohello-dev/yap-on-slack.git
cd yap-on-slack

# Install dependencies
mise run install

# Run with mise
mise run run

CLI Aliases: yos, yaponslack, yap-on-slack

Usage

Basic Commands

# Initialize config files (.env, users.yaml, messages.json)
yos init

# Post default messages
yos run

# Use custom messages file
yos run --messages custom.json

# Generate messages with AI (requires OPENROUTER_API_KEY)
yos run --use-ai

# Dry run (validate without posting)
yos run --dry-run

# Limit messages and add delays
yos run --limit 5 --delay 3

# Verbose output for debugging
yos run --verbose

# Show version
yos --version

CLI Commands

yos init - Initialize configuration files

  • --force, -f - Overwrite existing files

yos run - Post messages to Slack

  • --messages PATH - Custom messages JSON file
  • --users PATH - Custom users YAML config
  • --user NAME - Force specific user for all messages
  • --use-ai - Generate messages using OpenRouter Gemini 3 Flash
  • --dry-run - Validate without posting to Slack
  • --limit N - Post only first N messages
  • --delay SECONDS - Delay between messages (default: 2.0)
  • --reply-delay SECONDS - Delay between replies (default: 1.0)
  • --reaction-delay SECONDS - Delay before reactions (default: 0.5)
  • --verbose, -v - Enable debug logging
  • --debug-auth - Print safe diagnostics on auth failures

yos version - Show version information

Run yos --help or yos run --help for full options.

AI Message Generation

Generate realistic conversations using OpenRouter's Gemini 3 Flash model with optional GitHub context:

  1. Get an OpenRouter API key: https://openrouter.ai
  2. Add to .env:
    OPENROUTER_API_KEY=sk-or-v1-your-key-here
  3. Optional: Add GitHub token for context:
    GITHUB_TOKEN=ghp_your-token-here
    # Or use: gh auth token (if GitHub CLI installed)
  4. Run with AI:
    yos run --use-ai

When --use-ai is used:

  • Fetches recent commits, PRs, and issues from your GitHub repositories
  • Generates 20 realistic engineering team conversations
  • Messages reference actual project context (repos, issues, PRs)
  • Falls back to default messages if AI generation fails

Custom Messages

Create messages.json with your conversation threads:

[
  {
    "text": "*Deploy complete* :rocket: New API version is live!",
    "replies": [
      "Nice! Performance looks good",
      "All tests passing :white_check_mark:"
    ]
  },
  {
    "text": "Quick question - what's our policy on log retention?"
  }
]

Supported formatting: bold, italic, strikethrough, code, links, emoji, and bullet points.

πŸ“– See docs/usage.md for complete formatting syntax and examples.

Docker

# Build and run locally
docker build -t yap-on-slack .
docker run --rm --env-file .env yap-on-slack

# Or use pre-built image from GitHub Container Registry
docker pull ghcr.io/echohello-dev/yap-on-slack:latest
docker run --rm --env-file .env ghcr.io/echohello-dev/yap-on-slack:latest

Development

Setup

# Install dependencies (including dev tools)
mise run install

# Install pre-commit hooks
uv run pre-commit install

Available Commands

mise run lint       # Run ruff linter
mise run format     # Format code with ruff
mise run typecheck  # Run mypy type checking
mise run test       # Run pytest
mise run check      # Run all checks (lint + typecheck + test)

See all available tasks: mise tasks

Contributing

We welcome contributions! Please see CONTRIBUTING.md for:

  • Development setup
  • Code style guidelines
  • Testing procedures
  • Pull request process

Documentation

CI/CD

  • Build Workflow - Automated linting, type checking, testing, and Docker image publishing
  • Release Please - Semantic versioning and automated changelog generation

Docker images: ghcr.io/echohello-dev/yap-on-slack

License

MIT - See LICENSE for details

About

πŸ—£οΈπŸ—£οΈπŸ—£οΈ Simulate messages in Slack channels for testing purposes

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages