← ClaudeAtlas

xhs-clilisted

Headless-browser-based CLI skill for Xiaohongshu (小红书, RedNote, XHS) to search notes, read posts, browse profiles, like, favorite, comment, and publish from the terminal
jackwener/xhs-cli · ★ 585 · Data & Documents · score 85
Install: claude install-skill jackwener/xhs-cli
> [!NOTE] > An alternative package [xiaohongshu-cli](https://github.com/jackwener/xiaohongshu-cli) is available, which uses a reverse-engineered API and runs faster. > This package (`xhs-cli`) uses a headless browser (camoufox) approach — slower but more resilient against risk-control detection. > Choose whichever best fits your needs. # xhs-cli Skill A CLI tool for interacting with Xiaohongshu (小红书). Use it to search notes, read details, browse user profiles, and perform interactions like liking, favoriting, and commenting. ## Prerequisites ```bash # Install (requires Python 3.8+) uv tool install xhs-cli # Or: pipx install xhs-cli ``` ## Authentication All commands require valid cookies to function. ```bash xhs status # Check saved login session (no browser extraction) xhs login # Auto-extract Chrome cookies xhs login --cookie "a1=..." # Or provide cookies manually ``` Authentication first uses saved local cookies. If unavailable, it auto-detects local Chrome cookies via browser-cookie3. If extraction fails, QR code login is available. ## Command Reference ### Search ```bash xhs search "咖啡" # Search notes (rich table output) xhs search "咖啡" --json # Raw JSON output ``` ### Read Note ```bash # View note (xsec_token auto-resolved from search cache) xhs read <note_id> xhs read <note_id> --comments # Include comments xhs read <note_id> --xsec-token <token> # Manual token xhs read <note_id> --json ```