baoyu-danger-x-to-markdown
Converts X (Twitter) tweets and articles to markdown with YAML front matter. Supports threads, media downloads, and extraction using a reverse-engineered API.
Introduction
This tool streamlines the process of archiving content from X (formerly Twitter) by converting individual tweets, full threads, and X Articles into structured Markdown files with YAML front matter. Designed for researchers, content curators, and knowledge managers, it automates the extraction of metadata, including author details, URLs, and image cover assets, ensuring your local notes reflect the original context of the social media content.
-
Automatically identifies tweet or article URLs and parses them into clean, human-readable Markdown.
-
Supports full thread reconstruction, merging individual responses into a cohesive document with YAML headers.
-
Offers robust media handling, including optional downloading of images and videos to local directories with relative path rewrites in your output file.
-
Integrates with the local filesystem to maintain organized archives by username and tweet ID.
-
Implements a mandatory consent flow for the use of its reverse-engineered X API, ensuring users are aware of potential API stability or account-related risks.
-
Utilizes a flexible configuration system via EXTEND.md, allowing users to define custom output paths and preferred media download behavior for specific projects or system-wide settings.
-
Input: Provide x.com or twitter.com URLs for statuses or articles. The tool resolves these via the internal engine, requesting user consent upon first execution.
-
Output: Generates .md files with YAML front matter capturing the URL, author, and tweet count. Media assets are optionally saved to local /imgs and /videos folders.
-
Usage: Execute via CLI with options like --download-media for local assets or --json for structured data. Always ensure the consent file exists in the designated path to avoid operational blocks.
-
Note: This tool relies on reverse-engineered API endpoints, which may change. It is intended for personal knowledge management and is not an official X integration.
Repository Stats
- Stars
- 16,787
- Forks
- 1,958
- Open Issues
- 1
- Language
- TypeScript
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 29, 2026, 12:59 PM