Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

ai-trends-monitor

Surface early AI/ML trend signals for product managers. A small Python script that queries the GitHub Search API for recently-created AI repositories, adds lightweight "PM-perspective" commentary, formats a report, and pushes it to a Feishu (Lark) webhook on a twice-daily schedule via GitHub Actions.

Features

  • Queries the GitHub Search API for recently-created repos under AI topics (artificial-intelligence, machine-learning, etc.), sorted by stars.
  • Generates keyword-based product-manager commentary per repo (agent/LLM/UI signals, traction tier, experimental warnings).
  • Formats a readable report and sends it to a Feishu (Lark) webhook as a post message.
  • Runs automatically twice a day via GitHub Actions cron, and can be triggered manually.

How it works

  1. fetch_github_trending() calls the GitHub Search API for a couple of AI topics.
  2. analyze_for_pm() attaches simple keyword-driven commentary to each repo.
  3. generate_report() assembles the report; main() writes it to reports/ and sends it to Feishu.

Note: the module docstring mentions Reddit and Xiaohongshu, but only GitHub fetching is currently implemented.

Setup

Requires Python 3.11+.

git clone https://github.com/wuyuyang001-oss/ai-trends-monitor.git
cd ai-trends-monitor
pip install requests

Configuration

The script reads two environment variables:

Variable Required Purpose
FEISHU_WEBHOOK Yes (to send) Feishu/Lark custom-bot webhook URL. If unset, the report is printed but not sent.
AI_TREND_MONITOR Optional GitHub personal access token used to raise the Search API rate limit.

For GitHub Actions, add these as repository Secrets (Settings → Secrets and variables → Actions).

Usage

Create the output directory first, then run:

mkdir -p reports
export FEISHU_WEBHOOK="https://open.feishu.cn/open-apis/bot/v2/hook/xxxx"
export AI_TREND_MONITOR="ghp_xxx"   # optional
python monitor.py

The report is printed to stdout, saved to reports/report_YYYYMMDD_HHMM.md, and (if FEISHU_WEBHOOK is set) posted to Feishu.

Automation

.github/workflows runs the script on a cron schedule (01:00 and 13:00 UTC) and on manual workflow_dispatch. It also currently runs on every push to main.

Tech stack

  • Python 3.11
  • requests for HTTP
  • GitHub Search API
  • Feishu (Lark) incoming webhook
  • GitHub Actions for scheduling

Known limitations

  • main() writes to reports/ which is not created automatically — run mkdir -p reports (or add it to the workflow) to avoid a FileNotFoundError.
  • The date filter created:>2026-01-01 is hardcoded and will go stale over time.
  • The workflow installs beautifulsoup4 and feedparser, which the script does not use.
  • The GitHub token env var is named AI_TREND_MONITOR rather than something clearer like GITHUB_TOKEN.
  • Reddit and Xiaohongshu sources mentioned in the docstring are not implemented.

License

Released under the MIT License. See LICENSE.

About

Python script that fetches newly-created AI/ML GitHub repos, adds PM-style commentary, and posts a report to a Feishu webhook on a cron.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages