CLI tool to write news in Markdown and publish automatically across RSS, Twitter, WeChat (API pending), with multi-platform fallback and preview.
Multi-platform news publishing automation from Markdown
OpenClaw News Publisher is a CLI-based tool that automates news article distribution across multiple platforms. Write once in Markdown, publish everywhere with a single command.
# Clone repository
git clone https://github.com/ZhenRobotics/openclaw-news-publisher.git
cd openclaw-news-publisher
# Install dependencies
npm install
# Configure platforms
cp .env.example .env
# Edit .env with your credentials
# Verify installation
./agents/news-cli.sh help
# Create from template
openclaw-news create "AI Breakthrough in 2026"
# Or use script directly
./scripts/create-news.sh "My News Title" --template tech-news
This generates: news/drafts/ai-breakthrough-TIMESTAMP.md
---
title: "AI Breakthrough in 2026"
author: "Your Name"
category: "Technology"
tags: ["AI", "Innovation"]
platforms: ["rss", "twitter"]
---
# AI Breakthrough in 2026
Your article content here...
openclaw-news preview news/drafts/ai-breakthrough-*.md
Shows: title, author, word count, content preview
# Publish to all configured platforms
openclaw-news publish news/drafts/ai-breakthrough-*.md
# Publish to specific platforms
openclaw-news publish news/drafts/my-news.md --platforms rss,twitter
# Dry run (preview only, no actual publishing)
openclaw-news publish news/drafts/my-news.md --dry-run
openclaw-news list
| Command | Description | Example |
|---|---|---|
create | Create news draft | openclaw-news create "Title" |
preview | Preview article | openclaw-news preview <file> |
publish | Publish to platforms | openclaw-news publish <file> |
list | List published articles | openclaw-news list |
help | Show help | openclaw-news help |
# Platform priority (comma-separated)
PUBLISH_PLATFORMS="rss,wechat,twitter"
# RSS Configuration
RSS_SITE_URL="https://your-site.com"
RSS_FEED_URL="https://your-site.com/feed.xml"
# WeChat
WECHAT_APP_ID="wx..."
WECHAT_APP_SECRET="..."
# Twitter
TWITTER_API_KEY="..."
TWITTER_API_SECRET="..."
TWITTER_ACCESS_TOKEN="..."
# (See .env.example for full configuration)
| Field | Required | Description | Example |
|---|---|---|---|
title | ✅ | Article title | "AI News" |
author | ⬜ | Author name | "John Doe" |
category | ⬜ | Category | "Technology" |
tags | ⬜ | Tag array | ["AI", "Tech"] |
platforms | ⬜ | Target platforms | ["rss", "twitter"] |
coverImage | ⬜ | Cover image path | "img/cover.jpg" |
draft | ⬜ | Draft status | true or false |
---
title: "Breaking: New AI Model Released"
author: "Tech Reporter"
category: "Technology"
tags: ["AI", "Machine Learning"]
platforms: ["rss", "twitter", "wechat"]
coverImage: "images/ai-model.jpg"
draft: false
---
# Breaking: New AI Model Released
## Summary
A revolutionary AI model has been announced...
## Details
The new model demonstrates...
### Key Features
- **Performance**: 50% improvement
- **Efficiency**: Reduced compute costs
- **Applications**: Healthcare, finance
## Conclusion
This breakthrough marks...
public/feed.xml# Daily news workflow
openclaw-news create "Today's Tech News"
# Edit article...
openclaw-news publish news/drafts/todays-tech-news-*.md --platforms rss
# Write once, publish everywhere
openclaw-news publish article.md --platforms rss,wechat,twitter,toutiao
# Preview and test
openclaw-news preview article.md
openclaw-news publish article.md --dry-run
openclaw-news publish article.md # Actual publish
openclaw-news-publisher/
├── news/
│ ├── templates/ # Article templates
│ ├── drafts/ # Work in progress
│ └── published/ # Published archive
├── scripts/
│ ├── platforms/ # Platform publishers
│ ├── publish-news.sh # Main publish script
│ └── create-news.sh # Create drafts
├── agents/
│ └── news-cli.sh # CLI entry point
└── public/
└── feed.xml # Generated RSS feed
Each publish creates a JSON record:
{
"article_id": "my-news",
"platform": "rss",
"status": "success",
"published_at": "2026-03-10T12:00:00Z",
"platform_url": "https://example.com/feed.xml",
"error": null
}
Stored in: news/published/YYYY-MM-DD/article-id.platform.json
If a platform fails, publishing continues to next platform:
Publishing to: rss ✅ Success
Publishing to: wechat ❌ Failed (not configured)
Publishing to: twitter ✅ Success
Summary: 2 success, 1 failed
Built-in templates:
default.md - General purposetech-news.md - Technology newsCreate custom templates in news/templates/
docs/PLATFORMS.mdMIT License - Free for commercial and personal use
Version: 1.0.0 Author: justin Status: Production Ready (RSS), Beta (WeChat, Twitter)
ZIP package — ready to use