I Built a Multi-Platform Publishing CLI for AI Agents
Source: Dev.to
I Built a Multi-Platform Publishing CLI for AI Agents
I contribute to open-source repos regularly. Every time, I’d manually copy-paste the same article to Dev.to, GitHub, LinkedIn — each with different formatting, different APIs, different auth flows. So I built a CLI that does it all from one command. When you contribute to an open-source project, you often want to: Write a blog post about it Push the code to GitHub Share on Dev.to for visibility Cross-post to LinkedIn Each platform has its own API, auth method, and markdown handling. Doing this manually is tedious and error-prone. A single CLI script that publishes content across multiple platforms:
Publish to one platform
python3 platform_picker.py publish —file article.md —platform devto
Publish to multiple platforms at once
python3 platform_picker.py publish —file article.md —platform devto —platform linkedin
Check which platforms are configured
python3 platform_picker.py status
Platform Auth What it publishes
Dev.to API key Articles with full markdown
GitHub PAT Gists, repo files
LinkedIn OAuth token Text posts (3000 char limit)
HermesHub GitHub OAuth Skills (via web)
python3 platform_picker.py setup devto —api-key YOUR_KEY python3 platform_picker.py setup github —token YOUR_PAT
Credentials are stored in ~/.hermes/config.yaml — never hardcoded in scripts. A single markdown file with YAML frontmatter:
title: “Your Article Title” tags: [ai, automation]
Your content here
Works across all platforms.
The CLI handles the differences: Dev.to gets full markdown with tags GitHub creates a public gist LinkedIn gets plain text (truncated to 3000 chars) HermesHub gets the skill directory submitted via GitHub OAuth I tested this by publishing an article to Dev.to: $ python3 platform_picker.py publish —file /tmp/test.md —platform devto --- Publishing to devto --- Published! ID: 3868710 URL: https://dev.to/saintchris_21/test-platform-picker-cli-186o
The article went live with correct title, body, and tags — all from one command. The CLI handles common failures gracefully: $ python3 platform_picker.py publish —file article.md —platform github Platform not configured: github. Run ‘setup github’ first.
$ python3 platform_picker.py publish —file missing.md —platform devto File not found: missing.md
The script is ~200 lines of Python using httpx for API calls and PyYAML for config. It: Reads credentials from ~/.hermes/config.yaml
Parses frontmatter from the markdown file Adapts the content for each platform’s API Publishes and returns the URL The hardest part was handling the different auth methods — Dev.to uses a simple API key header, GitHub uses a Bearer token, and LinkedIn needs OAuth 2.0 with a person URN lookup. I’m working on adding: Twitter/X — thread publishing Medium — story publishing Substack — newsletter integration Scheduled publishing — publish at a specific time The goal: write once, publish everywhere, from your terminal. The platform picker is part of the hermes-skills repo. Both skills (open-source-contribution and platform-picker) are submitted to HermesHub for community use. If you’re building AI agent workflows, I’d love to hear what platforms you’d add.