Skip to content

Setup Guide

Mundo edited this page Apr 8, 2026 · 2 revisions

Setup Guide

Prerequisites

  • Node.js 22+
  • pnpm
  • A PostgreSQL database (recommended: Neon free tier)

1. Install Dependencies

git clone https://github.com/DamengRandom/oh-my-workers.git
cd oh-my-workers
pnpm install

2. Configure Environment Variables

cp .env.example .env

Fill in your .env:

# AI
ANTHROPIC_API_KEY=              # from console.anthropic.com

# GitHub
GITHUB_TOKEN=                   # github.com/settings/tokens (read:user, repo scopes)
TARGET_GITHUB_USERNAME=         # your GitHub username

# Database
DATABASE_URL=postgresql://...   # Neon connection string
COMPANY_DB_URL=postgresql://... # Company DB for cleanup

# Telegram
TELEGRAM_BOT_TOKEN=             # @BotFather on Telegram → /newbot
TELEGRAM_CHAT_ID=               # message @userinfobot to get your chat ID

Getting API Keys

Key Where to get it
ANTHROPIC_API_KEY console.anthropic.com
GITHUB_TOKEN github.com/settings/tokens — select read:user and repo scopes
TELEGRAM_BOT_TOKEN Message @BotFather on Telegram → /newbot
TELEGRAM_CHAT_ID Message @userinfobot on Telegram — then start your bot first

Neon Database Tips

  • Remove &channel_binding=require from Neon connection URLs — the pg library doesn't support it
  • Make sure the URL includes ?sslmode=require

3. Initialize Database

pnpm run setup

This creates all tables (kpi, diary, cleanup_log, github_trending) if they don't exist.

4. Test

pnpm news     # test GitHub trending pipeline → check Telegram
pnpm start    # test KPI pipeline (interactive)

5. Deploy via GitHub Actions

See GitHub Actions for automated deployment setup.

Clone this wiki locally