- TypeScript 96.3%
- JavaScript 1.9%
- Dockerfile 1.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .dockerignore | ||
| .gitignore | ||
| bun.lock | ||
| config.example.json | ||
| docker-compose.yml | ||
| Dockerfile | ||
| eslint.config.js | ||
| image.png | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
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
-
Install dependencies:
bun install -
Create configuration file:
cp config.example.json config.json -
Edit
config.jsonwith 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 } } -
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.jsonconfigured (see setup instructions above)
Quick Start
-
Build and run with Docker Compose:
mkdir -p data touch data/sent-articles.json touch data/daily-threads.json docker compose up -d -
View logs:
docker compose logs -f kagi-kite-bot -
Stop the bot:
docker compose down
Configuration Options
Discord
token: Your Discord bot tokenchannelId: Default Discord channel ID for news postsuseThreads: Set totrueto organize articles in daily threads,falseto post directly to channels (default: true)useCategoryChannels: Set totrueto use separate channels per category,falseto 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 tofalseto 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
