Skip to content

hytale-tools/tweet-tracker

Repository files navigation

Post Tracker

Track new posts from Bluesky and Reddit accounts, with notifications sent to Discord/Slack webhooks.

Setup

  1. Copy .env.example to .env and add your webhook URL
  2. Edit config.json with accounts to watch
  3. Run bun start

Environment Variables

Variable Description
WEBHOOK_URL Discord or Slack webhook URL (required)
LOG_LEVEL Logging level: debug, info, warn, error (default: info)

Configuration

{
  "pollIntervalMinutes": 5,
  "lookbackMinutes": 10080,
  "watch": [
    { "platform": "bluesky", "handle": "jay.bsky.team" },
    { "platform": "reddit-profile", "username": "spez" },
    { 
      "platform": "reddit-subreddit",
      "subreddit": "programming",
      "watchUsers": ["user1", "user2"]
    }
  ]
}
Option Description Default
pollIntervalMinutes How often to check for new posts -
lookbackMinutes Only track posts from the past N minutes 10080 (7 days)

Watch Target Types

Platform Description
bluesky Track posts/replies from a Bluesky user
reddit-profile Track posts/comments from a Reddit user's public history
reddit-subreddit Scan a subreddit for posts/comments from specific users (works even if they have history disabled)

Running

Local

# Start the tracker (runs continuously)
bun start

# Test your webhook with sample posts
bun test-webhook              # all platforms
bun test-webhook bluesky      # bluesky only
bun test-webhook reddit       # reddit only

Docker

docker run -d \
  -e WEBHOOK_URL="https://discord.com/api/webhooks/..." \
  -v $(pwd)/config.json:/app/config.json:ro \
  -v post-tracker-data:/app/data \
  ghcr.io/OWNER/tweet-tracker:main

Replace OWNER with your GitHub username.

The tracker stores seen posts in seen_posts.db (SQLite) to avoid duplicate notifications.

Logs are written to logs/tracker.log and logs/error.log.

Adding New Platforms

Implement the PlatformProvider interface in src/providers/:

interface PlatformProvider {
  name: string;
  fetchPosts(target: WatchTarget): Promise<Post[]>;
}

Then register it in src/providers/index.ts.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published