Added Nov 3, 2026
xhs-cli
A command-line tool for searching and reading Xiaohongshu, liking, collecting, commenting and posting image notes.
- Ecosystem
- Agent Skills
- Skill category
- Automation
- Creator / organization
- jackwener(GitHub 用户)
What it is
xhs-cli is a Xiaohongshu command-line tool (CLI) by GitHub user jackwener, and it comes with an Agent Skill. It runs a Camoufox browser in the background with no window (a headless browser). From your terminal you can search notes, read notes and comments, and look at user profiles, follower and following lists and collections. You can also like, collect, comment, post image notes, or delete your own notes. Once an AI agent has the Skill installed, it can run these commands for you. xhs-cli drives a real browser; the author also makes xiaohongshu-cli, which uses a reverse-engineered API and runs faster, and we cover it separately.
Who it's for:Developers who live in the terminal and want an AI agent to look things up on Xiaohongshu. Readers who don't write code won't get much from it.
Before you start: Install with uv tool install xhs-cli or pipx. It needs Python 3.8 or later, and the first run needs camoufox fetch to download the browser. For an AI agent, run npx skills add jackwener/xhs-cli or put it in .agents/skills. Claude Code has its own install flag, and the ClawHub instructions are out of date. The docs don't say clearly which operating systems are supported.
To sign in, it first uses cookies it has already saved. If there are none, it uses browser-cookie3 to read Xiaohongshu cookies from Chrome, Firefox, Edge or Brave on your computer. You can also paste cookies in by hand or scan a QR code. Login cookies are saved at ~/.xhs-cli/cookies.json and note tokens from searches at ~/.xhs-cli/token_cache.json, and it tries to make both readable only by you.
It reads search results, notes and comments, user profiles and their posts, follower and following lists, collections and your own profile, plus the images and text you choose to post. It has no feature for reading DMs or your clipboard. It can like and unlike, collect and uncollect, comment, post image notes and delete your own notes. The current commands don't post videos or send DMs. It opens a headless browser to visit Xiaohongshu and its Creator Center, which may need a separate sign-in. The review found no code that sends your cookies to any other service. The browser closes when a command finishes; nothing stays running in the background or on a schedule, and setup has no curl-to-bash step.
It can sign in by reading cookies from your browsers, which means going into the browsers on your computer to pull out your Xiaohongshu login. The agent can also like, comment or post without your approval, speaking for you from your own account.
No paid API is required. If you use these features, weigh your account's safety and the platform's rules yourself. AI Inspiration World is not responsible for any consequences. Apache-2.0 license, which doesn't mean Xiaohongshu has authorized the tool.
Based on the project's public documentation. Not tested by AI Inspiration World.