No description
  • TypeScript 96.3%
  • JavaScript 1.9%
  • Dockerfile 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-09-02 07:18:26 -04:00
src Fix XML/RSS Parsing 2025-09-02 07:18:26 -04:00
.dockerignore init 2025-08-20 11:13:32 -04:00
.gitignore v1.1 - Add Thread Support 2025-08-28 04:01:19 -04:00
bun.lock v1.1 - Add Thread Support 2025-08-28 04:01:19 -04:00
config.example.json v1.1 - Add Thread Support 2025-08-28 04:01:19 -04:00
docker-compose.yml init 2025-08-20 11:13:32 -04:00
Dockerfile Fix XML/RSS Parsing 2025-09-02 07:18:26 -04:00
eslint.config.js init 2025-08-20 11:13:32 -04:00
image.png init 2025-08-20 11:13:32 -04:00
package.json Fix XML/RSS Parsing 2025-09-02 07:18:26 -04:00
README.md v1.2.0 - Check RSS XML alongside JSON 2025-08-31 08:25:14 -04:00
tsconfig.json init 2025-08-20 11:13:32 -04:00

Kagi Kite Discord Bot

Kagi Kite Discord Bot

A Discord bot that scrapes news from Kagi Kite, summarizes articles using the Kagi Summarizer API, and posts them to Discord with flexible organization options.

Features

  • Automatically fetches news from multiple Kagi Kite categories
  • Summarizes articles using Kagi's AI summarization API
  • Persistent storage to prevent duplicate posts
  • Configurable polling intervals (24 hours by default)
  • Category filtering via configuration
  • Discord embeds

Setup

  1. Install dependencies:

    bun install
    
  2. Create configuration file:

    cp config.example.json config.json
    
  3. Edit config.json with your settings:

    {
      "discord": {
        "token": "YOUR_DISCORD_BOT_TOKEN",
        "channelId": "YOUR_DEFAULT_CHANNEL_ID",
        "categoryChannels": {
          "Technology": "TECH_CHANNEL_ID",
          "AI": "AI_CHANNEL_ID",
          "World": "WORLD_NEWS_CHANNEL_ID"
        }
      },
      "kagi": {
        "apiKey": "YOUR_KAGI_API_KEY",
        "summarizeModel": "cecil",
        "enableSummarizer": true
      },
      "categories": [
        "Technology",
        "AI",
        "Cybersecurity"
      ],
      "polling": {
        "intervalHours": 24
      }
    }
    
  4. Run the bot:

    bun run dev    # Development mode
    bun run build  # Build for production
    bun run start  # Run production build
    

Docker Setup

Prerequisites

  • Docker and Docker Compose installed
  • config.json configured (see setup instructions above)

Quick Start

  1. Build and run with Docker Compose:

    mkdir -p data
    touch data/sent-articles.json
    touch data/daily-threads.json
    docker compose up -d
    
  2. View logs:

    docker compose logs -f kagi-kite-bot
    
  3. Stop the bot:

    docker compose down
    

Configuration Options

Discord

  • token: Your Discord bot token
  • channelId: Default Discord channel ID for news posts
  • useThreads: Set to true to organize articles in daily threads, false to post directly to channels (default: true)
  • useCategoryChannels: Set to true to use separate channels per category, false to post all articles to the default channel (default: false)
  • categoryChannels (optional): Map specific categories to different channel IDs

Kagi

  • apiKey: Your Kagi API key (only required if enableSummarizer is true)
  • summarizeModel: Kagi summarization model (e.g., "cecil", "agnes", "daphne", "muriel")
  • enableSummarizer: Set to false to skip summarization and use original Kite summaries

Categories

Choose from available Kagi Kite categories:

  • World, USA, Business, Technology, Science, Sports, Gaming
  • Country-specific feeds (Australia, Canada, UK, etc.)
  • Topic-specific feeds (AI, Apple, Bitcoin, Cybersecurity, etc.)

Polling

  • intervalHours: How often to check for new articles (default: 24)

Available Categories

All Kagi Kite categories are supported:

General News: World, USA, Business, Technology, Science, Sports, Gaming

Countries/Regions: Australia, Austria, Belgium, Brazil, Canada, China, Colombia, Costa Rica, Czech Republic, Estonia, Finland, France, Germany, India, Ireland, Israel, Italy, Japan, Mexico, New Zealand, Pakistan, Palestine, Philippines, Poland, Portugal, Romania, Russia, Serbia, Slovenia, South Korea, Spain, Sweden, Switzerland (DE), Thailand, The Netherlands, UK, Ukraine

Specialized Regions: Bay Area, Europe, China | Taiwan, Germany | Hesse, USA | Vermont, USA | Virginia

Topics: AI, Apple, Bitcoin, Cryptocurrency, Cybersecurity, Economy, Linux & OSS, OnThisDay

Storage

Articles are tracked in sent-articles.json to prevent duplicates. Daily threads are tracked in daily-threads.json to maintain thread continuity across bot restarts. Records older than 30 days are automatically removed from both files.

License

MIT