article-clip
v0.1.0
Published
Local content archiver for Twitter/X, Zhihu, and WeChat Official Accounts
Maintainers
Readme
Article Clip
Local content archiver for Twitter/X, Zhihu, and WeChat Official Accounts. Save web articles as Markdown with images.
Features
- Multi-platform support: Twitter/X, Zhihu, WeChat Official Accounts
- Smart deduplication: Skip already archived content automatically
- Batch processing: Process multiple URLs at once
- Asset downloading: Automatically download images
- Persistent sessions: Save login state across runs
- Browser flexibility: Support for Chrome and Edge
Prerequisites
- Node.js 18 or higher
- Chrome or Edge browser (for rendering pages)
Installation
npm install -g article-clipQuick Start
# Archive a single URL
article-clip "https://x.com/user/status/123"
# Archive with custom output directory
article-clip "https://x.com/user/status/123" --out ~/my-clips
# Batch processing from file
article-clip --file urls.txtOutput Structure
clips/
├── .archived.json # Deduplication database
└── twitter/
└── 2026/
└── 01/
└── 24/
└── slug-hash/
├── content.md
└── assets/
├── 001.jpg
└── 002.pngCommands
Archive Single URL
article-clip "url"Batch Processing
article-clip --file urls.txt
article-clip --stdin # Read URLs from stdinInstall Browsers (Optional Fallback)
article-clip install-browsersOptions
| Option | Description | Default |
|--------|-------------|---------|
| --out <dir> | Output directory | ./clips |
| --format <format> | Output format (md or md+html) | md |
| --browser <browser> | Browser to use (chrome, edge, auto) | auto |
| --no-assets | Skip asset downloads | - |
| --force | Force overwrite existing archives | - |
| --verbose | Show detailed deduplication info | - |
| --json | Output JSON to stdout | - |
| --jsonl | Output JSONL stream (batch mode) | - |
| --debug | Save debug artifacts | - |
Browser & Login
First Run
When you first run article-clip, it will:
- Open a browser window
- Navigate to the platform (Twitter/Zhihu)
- Wait for you to log in
- Save your session for future runs
Session Persistence
Login state is saved under the OS app data directory:
- Windows:
%LOCALAPPDATA%\\article-clip\\session-chrome/%LOCALAPPDATA%\\article-clip\\session-edge - macOS:
~/Library/Application Support/article-clip/session-chrome/~/Library/Application Support/article-clip/session-edge - Linux:
$XDG_DATA_HOME/article-clip/session-chrome/$XDG_DATA_HOME/article-clip/session-edge(fallback:~/.local/share/article-clip/...)
Close the browser when prompted to save your session properly.
Browser Selection
# Auto-detect (Edge -> Chrome fallback)
article-clip "url"
# Force Chrome
article-clip "url" --browser chrome
# Force Edge
article-clip "url" --browser edgeDeduplication
Article Clip automatically skips already archived content:
# First run: archives the URL
article-clip "https://x.com/user/status/123"
# Second run: skips (already archived)
article-clip "https://x.com/user/status/123"
# Output: ⊘ Already archived: clips/twitter/2026/01/24/...
# Force re-archive
article-clip "https://x.com/user/status/123" --forceThe .archived.json file in your output directory tracks all archived URLs.
Supported Platforms
| Platform | URL Pattern | Notes |
|----------|-------------|-------|
| Twitter/X | x.com/*, twitter.com/* | Requires login for full content |
| Zhihu | zhihu.com/* | Answers and articles |
| WeChat | mp.weixin.qq.com/* | Official Account articles |
Development
For development and contributing guidelines, see CONTRIBUTING.md.
License
MIT
