openclaw-github-trending
v1.4.7
Published
OpenClaw plugin for fetching GitHub trending repositories and pushing to Feishu or Email with AI summaries
Maintainers
Readme
OpenClaw GitHub Trending Plugin
English | 简体中文
OpenClaw plugin for fetching GitHub trending repositories and pushing to Feishu or Email with AI-powered summaries.
Features
- 🔥 GitHub Trending — Fetch trending repositories for today, this week, or this month
- 🤖 AI Summaries — Generate intelligent summaries using OpenAI or Anthropic
- 📢 Multi-Channel Push — Support Feishu, Email, and WeChat notifications
- 🔄 Smart Deduplication — Track repository history and re-push on significant star growth
- ⏰ Scheduled Tasks — Integrate with OpenClaw's task scheduler for automated updates
Installation
openclaw plugins install openclaw-github-trending⚠️ Security Notice - Allow Non-Bundled Plugin
Since this is a non-official bundled plugin, you need to explicitly allow it in OpenClaw's configuration file after installation, otherwise a security warning will appear at the gateway.
Open OpenClaw configuration file (usually located at
~/.openclaw/openclaw.json).Add this plugin's ID to the
plugins.allowlist:
{
"plugins": {
"allow": [
"openclaw-github-trending"
]
}
}This configuration tells OpenClaw to trust and allow loading this plugin. After completing the configuration, the security warning will disappear.
Quick Start
⚡ Minimal Configuration
Minimum requirement: Only configure a Feishu Webhook URL to run, the plugin will automatically inherit AI settings from OpenClaw's global configuration:
{
"plugins": {
"openclaw-github-trending": {
"channels": {
"feishu": {
"webhook_url": "https://open.feishu.cn/open-apis/bot/v2/hook/xxx"
}
}
}
}
}Complete Configuration Example:
{
"plugins": {
"enabled": true,
"allow": [
// Configure to allow loading this plugin, otherwise the gateway will show warnings when viewing status or restarting.
"openclaw-github-trending"
],
"entries": {
"openclaw-github-trending": {
"enabled": true,
"config": {
// Optional: AI provider, if not configured, will automatically use OpenClaw's global AI configuration.
"ai": {
"provider": "openai",
"api_key": "sk-sp-xxx",
"base_url": "https://coding.dashscope.aliyuncs.com/v1",
"model": "kimi-k2.5"
},
// Optional: Maximum concurrency, default 5. Adjust according to your AI model to accelerate summary generation.
"max_workers": 5,
// Optional: GitHub personal access token. Frequent calls may trigger rate limits, configuring this can avoid GitHub rate limits. Not recommended as this plugin is not called frequently.
"github_token": "xxx",
// Required: Configure at least one channel (Feishu, Email, or WeChat), otherwise you won't receive notifications.
"channels": {
"feishu": {
"webhook_url": "https://open.feishu.cn/open-apis/bot/v2/hook/xxx"
},
"email": {
"smtp_host": "smtp.qq.com",
"smtp_port": 587,
"sender": "[email protected]",
"password": "xxx",
"recipient": "[email protected]"
},
"wechat": {
"enabled": true
}
},
// Optional: Enable history tracking for smart deduplication
"history": {
"enabled": true,
"star_threshold": 100
},
// Optional: If your network can directly access GitHub, you don't need to configure a proxy.
"proxy": {
"enabled": true,
"url": "http://127.0.0.1:7897"
}
}
}
}
}
}How to Get Feishu Webhook URL:
Create a Feishu Bot:
- Create a group chat
- Click Group Settings → Bot Management
- Click Group Bot → "Add Bot"
- Select Custom Bot
Configure the Bot:
- Name your bot (e.g., "GitHub Trending")
- Upload an avatar (optional)
- Add description
- Click "Add"
Get the Webhook URL:
- After creation, you'll see a webhook URL in this format:
https://open.feishu.cn/open-apis/bot/v2/hook/YOUR_WEBHOOK_ID - Copy this URL and paste it into your
webhook_urlconfig - ⚠️ Security Note: Keep this URL private! Anyone with the URL can send messages to your bot.
- After creation, you'll see a webhook URL in this format:
Test the Bot:
- Send a test message using curl:
curl -X POST https://open.feishu.cn/open-apis/bot/v2/hook/YOUR_WEBHOOK_ID \ -H "Content-Type: application/json" \ -d '{"msg_type":"text","content":{"text":"Test message"}}' - You should see the message in your Feishu chat.
- Send a test message using curl:
Setup Scheduled Tasks or Run Immediately
Use the registered gen-cron CLI command to quickly set up scheduled tasks or run immediately. Execute the following commands in the command line where you can use the openclaw command:
# Run immediately: Fetch today's trending and push to Feishu and Email
openclaw gen-cron now daily email,feishu
# Create scheduled task: Fetch weekly trending every Wednesday at 10:00 AM and push to Feishu
openclaw gen-cron "0 10 * * 3" weekly feishu
# Create scheduled task: Fetch monthly trending on the 1st day of each month at 9:00 AM and push to Email and Feishu
openclaw gen-cron "0 9 1 * *" monthly email,feishu
# Create scheduled task: Fetch daily trending every day at 8:00 AM and push to Email
openclaw gen-cron "0 8 * * *" daily emailCommand Parameter Explanation:
openclaw gen-cron <mode> <since> <channels>| Parameter | Description | Example |
|-----------|-------------|---------|
| mode | Execution mode: now for immediate execution, or Cron expression (format: minute hour day month weekday) | now"0 10 * * 3" |
| since | Trending period: daily (today), weekly (this week), monthly (this month) | daily |
| channels | Push channels: email, feishu, wechat, or email,feishu,wechat (multiple channels separated by comma) | feishuemail,feishu,wechat |
Cron Expression Format:
- Format:
minute(0-59) hour(0-23) day(1-31) month(1-12) weekday(0-7, 0 and 7 are Sunday) - Timezone: Uses server local time (usually system time)
Common Cron Examples:
"0 8 * * *"- Every day at 8:00 AM"0 10 * * 3"- Every Wednesday at 10:00 AM"0 9 1 * *"- 1st day of each month at 9:00 AM
⚠️ Note: The
gen-croncommand must be executed in the command line, not in OpenClaw chat interface.
- Command line: Run directly in terminal
openclaw gen-cron ...- OpenClaw chat: To use in chat, you need the full
openclaw cron addcommand (see below)
Setting Up Tasks in OpenClaw Chat
If you want to set up tasks in OpenClaw chat interface, use the full cron add command:
# Paste the following command in OpenClaw chat (need to escape quotes first)
# Every Wednesday at 10:00 AM, fetch weekly trending and push to Feishu and Email
openclaw cron add --name "GitHub Trending Weekly Feishu+Email" \
--cron "0 10 * * 3" \
--system-event '{"tool":"openclaw-github-trending","params":{"since":"weekly","channels":["feishu","email"]}}'🗣️ Natural Language Task Creation
Create scheduled tasks through natural conversation with OpenClaw, without memorizing complex command formats. The plugin supports intelligent parsing of natural language instructions to automatically generate and execute scheduled tasks.
Usage:
Simply describe your needs in natural language in the OpenClaw chat interface:
Use the openclaw-github-trending tool to help me create a scheduled task that pushes GitHub monthly trending to my email every day at 18:45Supported Natural Language Examples:
// Daily Push
- "Use the openclaw-github-trending tool to help me create a task to push GitHub daily trending to my email every morning at 8:00"
- "I want to use the openclaw-github-trending tool to receive GitHub daily trending in my email every day at 18:45"
- "Use the openclaw-github-trending tool to create a scheduled task: fetch daily trending every day at 9:00 AM and push to Feishu"
// Weekly Push
- "Use the openclaw-github-trending tool to help me create a task to push GitHub weekly trending to Feishu every Monday at 10:00"
- "I want to use the openclaw-github-trending tool to receive weekly trending in Feishu and email every Friday at 18:00"
- "Use the openclaw-github-trending tool to fetch weekly trending every Wednesday morning at 9:00 AM and push to Feishu"
// Monthly Push
- "Use the openclaw-github-trending tool to help me create a task to push GitHub monthly trending to my email on the 1st of every month at 9:00"
- "I want to use the openclaw-github-trending tool to receive GitHub monthly trending in my email on the 15th of every month at 18:45"
- "Use the openclaw-github-trending tool to help me create a scheduled task that runs every day at 18:45, pushes monthly GitHub trending, and sends the content to my email"
// Multi-Channel Push
- "Use the openclaw-github-trending tool to help me create a task to push daily trending to both Feishu and email every day at 8:00"
- "I want to use the openclaw-github-trending tool to receive trending every day at 10:00, sent to both Feishu and my email"
// WeChat Push
- "Use the openclaw-github-trending tool to help me create a task to push GitHub daily trending to my WeChat every morning at 8:00"
- "I want to use the openclaw-github-trending tool to receive weekly trending in my WeChat every Friday at 18:00"
- "Use the openclaw-github-trending tool to create a scheduled task: fetch monthly trending every 1st day at 9:00 AM and push to WeChat"
- "Use the openclaw-github-trending tool to help me create a task to push trending to Feishu, email, and WeChat every day at 10:00"Intelligent Parsing Capabilities:
✅ Time Recognition: Automatically parses time expressions like "every day at 8:00", "every Monday at 10:00", "1st of every month at 9:00"
✅ Period Recognition: Automatically identifies "today/daily"→daily, "this week/weekly"→weekly, "monthly"→monthly
✅ Channel Recognition: Automatically identifies "email"→email, "feishu"→feishu, "wechat"→wechat, "feishu and email"→["feishu","email"], "feishu, email, and wechat"→["feishu","email","wechat"]
✅ Task Creation: Automatically generates appropriate Cron expressions and creates scheduled tasks
Execution Flow:
- User inputs natural language instruction in OpenClaw chat (must include
openclaw-github-trendingtool name) - OpenClaw parses the instruction and identifies the tool (
openclaw-github-trending) - Automatically extracts time, period, push channels, and other parameters
- Generates the corresponding
cron addcommand and creates the task - Returns task creation success information, including task ID and execution time
Advantages:
✨ Easy to Use: No need to memorize command formats, create tasks like chatting ✨ Flexible Expression: Supports multiple natural language expression styles ✨ Intelligent Recognition: Automatically parses time, period, and push channels ✨ Quick Configuration: Complete complex scheduled task configuration with one sentence
View Command Help
When you run the command without parameters or with wrong parameters, detailed help information will be displayed automatically:
openclaw gen-cron -hThe output will include:
- Command usage
- Parameter explanation
- Usage examples
- Cron expression format explanation
Manage Scheduled Tasks
After setting up scheduled tasks, you can manage them with OpenClaw's cron commands:
# List all scheduled tasks
openclaw cron list
# View run history
openclaw cron runs
# Manually trigger a task
openclaw cron run <job-id>
# Delete a task
openclaw cron rm <job-id>AI Configuration Details
The plugin supports OpenAI-compatible API providers. If not configured in the plugin, it will fall back to OpenClaw's AI configuration.
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| provider | string | No | "openai" | AI provider, supports custom providers |
| api_key | string | No* | - | AI provider API key |
| base_url | string | No | "https://api.openai.com/v1" | API base URL for OpenAI-compatible providers |
| model | string | No | "gpt-4o-mini" | Model name for summarization |
If not provided, will use OpenClaw's default AI configuration
Supported AI Providers
- OpenAI:
provider: "openai", use default base URL - Anthropic:
provider: "anthropic" - Custom Providers: Any service compatible with OpenAI API (e.g., DashScope, Moonshot, DeepSeek, etc.)
Custom Provider Example:
{
"ai": {
"provider": "openai",
"api_key": "sk-xxx",
"base_url": "https://coding.dashscope.aliyuncs.com/v1",
"model": "kimi-k2.5"
}
}GitHub Configuration
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| github_token | string | No | - | GitHub personal access token (increases rate limit) |
Why configure GitHub Token?
- Without Token: 60 requests/hour limit
- With Token: 5000 requests/hour limit
- Get Token: https://github.com/settings/tokens
Concurrency Configuration
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| max_workers | number | No | 5 | Concurrent workers for AI summarization (recommended: 3-10) |
Channel Configuration
Feishu
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| webhook_url | string | Yes* | Feishu bot webhook URL |
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| smtp_host | string | No | "smtp.gmail.com" | SMTP server host |
| smtp_port | number | No | 587 | SMTP server port (465 for SSL, 587 for STARTTLS) |
| sender | string | Yes* | - | Sender email address |
| password | string | Yes* | - | Email password or app-specific password |
| recipient | string | No | Same as sender | Recipient email address (if not configured, defaults to sender address) |
| from_name | string | No | "GitHub Trending" | Display name for sender |
| timeout | number | No | 30 | SMTP connection timeout in seconds |
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| enabled | boolean | No | true | Enable WeChat notifications via @tencent-weixin/openclaw-weixin plugin |
| receiver_id | string | No | Auto-detect | WeChat receiver ID (format: [email protected]) |
receiver_id Auto-Detection:
The plugin will automatically detect receiver_id using the following priority (no manual configuration needed in most cases):
- Plugin Config:
plugins.openclaw-github-trending.config.channels.wechat.receiver_id - Environment Variable:
OPENCLAW_WECHAT_RECEIVER_ID - Message Context: If current session is from WeChat, auto-reply to sender
- Session History: Extract from
~/.openclaw/agents/main/sessions/sessions.json - OpenClaw Config: Search WeChat plugin configuration and sessions
⚠️ Important:
- WeChat ID is case-sensitive, e.g.,
[email protected] - If auto-detection fails, detailed configuration guide will be shown
WeChat Requirements:
Install WeChat Plugin:
openclaw plugins install @tencent-weixin/openclaw-weixinConfigure in OpenClaw (
~/.openclaw/openclaw.json):{ "plugins": { "entries": { "openclaw-weixin": { "enabled": true } } } }Optional: Configure receiver_id (only if you need to push to a specific user):
{ "plugins": { "entries": { "openclaw-github-trending": { "config": { "channels": { "wechat": { "enabled": true, "receiver_id": "[email protected]" } } } } } } }💡 Tip: If
receiver_idis not configured, the plugin will auto-detect it from session history.
🔍 How to Get Your WeChat ID:
# Method 1: Check OpenClaw session history
cat ~/.openclaw/agents/main/sessions/sessions.json | jq 'to_entries[] | select(.key | contains("wechat")) | {key, lastTo}'
# Method 2: Check message send records
cat ~/.openclaw/agents/main/sessions/sessions.json | grep -i "o9cq.*@im.wechat"
# Method 3: Send a test message and check logs
openclaw message send --channel openclaw-weixin --target "your-wechat-id" "test"⚠️ Notes:
- WeChat ID format:
[email protected](case-sensitive!) - If auto-detection fails, error message includes detailed configuration guide
*Required when using this channel
History Configuration
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| enabled | boolean | No | true | Enable history tracking and deduplication |
| star_threshold | number | No | 100 | Re-push if stars increased by this amount |
Proxy Configuration
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| enabled | boolean | No | false | Enable proxy for GitHub requests |
| url | string | No | - | Proxy URL (supports http://user:pass@host:port or https://host:port format) |
Example:
{
"plugins": {
"openclaw-github-trending": {
"proxy": {
"enabled": true,
"url": "http://127.0.0.1:7890"
}
}
}
}Proxy with authentication:
{
"plugins": {
"openclaw-github-trending": {
"proxy": {
"enabled": true,
"url": "http://username:[email protected]:8080"
}
}
}
}Smart Deduplication
The plugin tracks repository history and intelligently decides when to re-push:
- First Discovery: Always push new repositories
- Star Growth: Re-push if stars increased by
star_threshold(default: 100) - History Tracking: Records repository details, AI summaries, and push history
Security Best Practices
API Keys
- Store API keys in
.openclaw/openclaw.json(not in environment variables) - Use app-specific passwords for email (e.g., Gmail App Passwords)
- Restrict API key permissions to minimum required
Email Configuration
For Gmail:
- Enable 2-Factor Authentication
- Generate an App Password: https://myaccount.google.com/apppasswords
- Use the app password in the
passwordfield
Feishu Webhook
- Keep webhook URLs private
- Rotate webhook URLs periodically
- Use IP whitelisting if available
Development
Build
npm run buildTest
npm test
npm run test:coverageLocal Development
# Link to local OpenClaw
npm link
# In OpenClaw project
openclaw plugins install openclaw-github-trendingContributing
Contributions are welcome! Please read our Contributing Guide for details.
License
MIT © 王允
Support
- 📧 Email: [email protected]
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
Changelog
See CHANGELOG.md for release history.
