Github Trending + AI summary = Your Daily Tech News
A smart trend push bot based on Discord.js and AI.
Trend-Taste is a Discord bot that delivers daily GitHub Trending repositories directly to your server. It leverages AI to provide personalized, explainable recommendations, helping you stay ahead of the curve in the tech world.
- Daily Trending Repos: Automatically fetches and pushes the hottest repositories from GitHub.
- AI-Powered Insights: Uses AI to analyze and summarize why a repository is trending and how it might be useful to you.
- Multi-Language Support: Configurable response language (e.g.,
en-US,zh-CN). - Customizable Schedule: Set your preferred schedule to fit your timezone and preferred delivery time.
- Interactive: Simple slash commands to manage subscriptions and settings.
The bot sends a rich embed scheduled at the time you set, containing:
- Repository Name & Description
- Star/Fork counts
- AI Recommendation: A concise explanation of the project's value.
why?
- Only one task for one Channel.
- Task is applied to channels instead of users.
- Different channels mean different subscribers.
/set-language [lang]
Set the language for AI responses (e.g.,en-US,zh-CN)./set-type [type]
Set the content type to subscribe to (currently supportsGitHub Trending)./set-schedule [timezone] [hour] [minute]
Set when you want to receive updates (e.g.,Asia/Shanghai 9 0for 9:00 AM CST).
/enable
Activate the daily push service for the current channel./disableStop the automatic service./runTrigger an immediate fetch and push (useful for testing).
/check: View and check current configuration and status./help: Show the help menu.
If you want to host your own instance of Trend-Taste:
DockerandDocker Compose- A Discord Bot Token (from above)
- A Discord Application ID (from above)
- A Discord Public Key (from above)
- A Google Gemini API Key (for AI features)
- A Github API TOKEN (for higher API rate limits)
-
Fetch the config file
mkdir trend-taste cd trend-taste curl -o docker-compose.yml https://raw.githubusercontent.com/yyxff/trend-taste/main/docker-compose.prod.yml -
Configure Environment Create a
.envfile in the root directory (or updatedocker-compose.ymlenvironment variables). You can copy the example below:# Discord DISCORD_APPLICATION_ID=your_app_id DISCORD_PUBLIC_KEY=your_public_key DISCORD_TOKEN=your_bot_token # GITHUB API TOKEN GITHUB_API_TOKEN=your_github_token # GEMINI API KEY GEMINI_API_KEY=your_gemini_key # Database (Optional overrides, defaults provided in docker-compose) # POSTGRES_USER=postgres # POSTGRES_PASSWORD=password # POSTGRES_DB=trendtaste
-
Run with Docker Compose
docker-compose up -d --build
This will start the following services:
- app: The bot logic.
- db: PostgreSQL database.
- loki & grafana: Logging and monitoring stack (accessible at
http://localhost:3000, default user/pass:admin/admin).
For developers who want to contribute or customize the bot.
-
Install Dependencies
npm install
-
Database Migration
Initialize the database schema:
docker compose up -d db npx prisma migrate dev
-
Configure Environment
Create a
.envfile in the root directory (or updatedocker-compose.ymlenvironment variables). You can copy the example below:# Discord DISCORD_APPLICATION_ID=your_app_id DISCORD_PUBLIC_KEY=your_public_key DISCORD_TOKEN=your_bot_token # GITHUB API TOKEN GITHUB_API_TOKEN=your_github_token # GEMINI API KEY GEMINI_API_KEY=your_gemini_key # Database (Optional overrides, defaults provided in docker-compose) # POSTGRES_USER=postgres # POSTGRES_PASSWORD=password # POSTGRES_DB=trendtaste
-
Run in Dev Mode
Prepare a
docker-compose.override.ymlfile under root directory:services: app: build: context: . target: development volumes: - .:/app - /app/node_modules # Use `tsx watch` to auto-restart on file changes. command: npx tsx watch src/bot.ts environment: NODE_ENV: development # Uncomment the following lines if you want to connect to db from your machine # db: # ports: # - "5432:5432"
src/bot.ts: Entry point.src/commands/: Slash command definitions.src/scheduler/: Scheduler logic.src/tasks/: Background tasks logic.src/services/: Service logic.src/repositories/: Database access logic.src/parser/: Logic for parsing GitHub data.src/utils/: Helper functions (GitHub API, Logger).prisma/: Database schema.
MIT