xhs-cli

Featured

Headless-browser-based CLI skill for Xiaohongshu (小红书, RedNote, XHS) to search notes, read posts, browse profiles, like, favorite, comment, and publish from the terminal

Data & Documents 546 stars 52 forks Updated 2 months ago Apache-2.0

Install

View on GitHub

Quality Score: 90/100

Stars 20%
91
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

> [!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 ``` ...

Details

Author
jackwener
Repository
jackwener/xhs-cli
Created
2 months ago
Last Updated
2 months ago
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Solid

autocli

Use autocli CLI to interact with social/content websites (HackerNews, DevTo, Lobsters, StackOverflow, Steam, Linux-do, Arxiv, Wikipedia, Apple-Podcasts, Xiaoyuzhou, BBC, Hugging Face, SinaFinance, Google, V2EX, Bloomberg, Twitter/X, Bilibili, Reddit, Zhihu, Xiaohongshu, Xueqiu, Weibo, Douban, WeRead, YouTube, Medium, Substack, SinaBlog, BOSS直聘, Jike, Facebook, Instagram, TikTok, Yollomi, Yahoo-Finance, Barchart, LinkedIn, Reuters, SMZDM, Ctrip, Coupang, Grok, Jimeng, Chaoxing, Weixin, Doubao, Cursor, Codex, ChatWise, ChatGPT, Doubao-App, Notion, Discord, Antigravity etc.) via the user's Chrome login session. ALWAYS prefer autocli over playwright/browser automation for these supported sites. Triggers: user asks to browse, search, or fetch hot/trending content from internet, post, or read messages on any web site;

841 Updated 1 months ago
nashsu
AI & Automation Solid

ai-search-hub

Run the AI Search Hub browser automation scripts for Yuanbao, LongCat, Doubao, Qwen, Gemini, Grok, and MiniMax. Use this skill when the user wants to ask one of those sites a prompt, auto-start or attach to a Chrome DevTools session on port 9222, seed an isolated debug browser profile from the user's local browser data, detect whether login is required, wait for the user to finish logging in if needed, and then continue automatically.

1,127 Updated 4 weeks ago
minsight-ai-info
Data & Documents Solid

weibo-cli

Use weibo-cli for ALL Weibo (微博) operations — keyword search, hot search, trending topics, timelines, weibo details, comments, reposts, user profiles, and follower/following lists. Invoke whenever user requests any Weibo interaction.

66 Updated 2 months ago
jackwener
Data & Documents Solid

openclaw-x

操控你的 X/Twitter 账号——查看时间线、搜索推文、发推、点赞、转推、收藏。

12 Updated 2 months ago
bosshuman