x-article-publisher
Publish Markdown articles to X (Twitter) Articles with persistent login, automated formatting, and intelligent image management.
Introduction
The X Article Publisher is a robust automation tool designed to bridge the gap between local Markdown-based writing workflows and the X (Twitter) Articles platform. It addresses the common friction points of the web editor, such as manual formatting, repetitive login procedures, and tedious image handling, by providing a script-based publishing experience that respects your local file structure and Git history.
Targeted at power users, content creators, and developers who leverage Markdown for documentation or long-form thought leadership, this skill allows you to maintain your draft repository locally while seamlessly pushing updates to the X platform. By leveraging browser automation with persistent session management, it effectively handles 2FA and login sessions for up to seven days, ensuring your publishing workflow remains uninterrupted.
-
Automatically converts Markdown syntax including headers, blockquotes, bold text, lists, and hyperlinks into X Articles' rich text format.
-
Features a secure, persistent authentication system that minimizes the need for frequent browser-based re-login.
-
Simplifies image management by automatically detecting cover images and handling the upload of content-embedded images.
-
Operates in a 'draft-only' mode to ensure safety, allowing you to review content in the browser before final publication.
-
Supports advanced metadata parsing, extracting structured data like titles and cover images directly from Markdown frontmatter or document structure.
-
Prerequisites include a valid X Premium Plus subscription and Python 3.9+ environments on macOS.
-
The tool expects standard Markdown files as input and uses
publish_article.pyas the primary interface for triggering the workflow. -
Users should manage authentication state via
auth_manager.py, which helps check, validate, or clear browser states stored in local data directories. -
While the tool performs automated conversion, it is designed for manual final review, as it saves articles directly to your X drafts.
-
It is strictly compatible with macOS systems due to its reliance on specific system-level clipboard and UI frameworks (AppKit/PyObjC).
Repository Stats
- Stars
- 72
- Forks
- 12
- Open Issues
- 2
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 1, 2026, 09:59 AM