/install jackwener-xhs-cli
Xiaohongshu CLI
Use this skill for terminal-first Xiaohongshu work through xhs-cli.
Prefer shell commands over browser automation when the task fits the CLI.
Quick Start
- Check whether
xhsis already installed withxhs --version. - If it is missing, install it with
uv tool install xhs-cli. - If it is present but outdated, prefer
uv tool upgrade xhs-cli. - Check auth with
xhs status. - If auth is missing or stale, run
xhs login. - Prefer
--jsonwhen results will be parsed, summarized, or reused in later commands.
Install
Prefer uv:
uv tool install xhs-cli
uv tool upgrade xhs-cli
Fallback to pipx if uv is unavailable:
pipx install xhs-cli
pipx upgrade xhs-cli
Only use a source checkout when the user is explicitly developing or patching the CLI itself:
git clone https://github.com/jackwener/xhs-cli.git
cd xhs-cli
uv sync
Auth
Prefer xhs login first. It tries saved cookies, then local Chrome cookies, then QR login.
Use these checks in order:
xhs status
xhs login
xhs whoami --json
Do not ask the user to paste raw cookies into chat logs.
Only use xhs login --cookie ... if the user explicitly wants manual cookie input and can provide it locally.
Core Workflows
Search and Read
xhs search "coffee"
xhs search "coffee" --json
xhs read NOTE_ID
xhs read NOTE_ID --comments --json
Use search first when the user needs candidate notes.
Use read after a note ID is known.
Profile and Network
xhs whoami --json
xhs user USER_ID --json
xhs user-posts USER_ID --json
xhs followers USER_ID --json
xhs following USER_ID --json
Use whoami --json to discover the current account's internal userId.
Feed, Topics, and Favorites
xhs feed --json
xhs topics "travel" --json
xhs favorites --max 10 --json
Use feed for recommendation browsing.
Use topics for hashtag discovery.
Use favorites to inspect saved items.
Interaction
Run xhs status before write actions.
For note actions, prefer working from IDs already returned by search, feed, or read.
xhs like NOTE_ID
xhs like NOTE_ID --undo
xhs favorite NOTE_ID
xhs favorite NOTE_ID --undo
xhs comment NOTE_ID "Helpful post."
xhs delete NOTE_ID
Publish
xhs post "Title" --image ./cover.jpg --content "Body text"
xhs post "Title" --image ./a.jpg --image ./b.jpg --content "Body text" --json
Use post only after auth is confirmed.
Response Style
Lead with the exact xhs command to run.
Keep flags minimal.
Prefer a short happy-path command before optional variants.
If the user still needs IDs, guide them to search, feed, or whoami --json first.
Reference
Read references/commands.md when the user needs:
- full command coverage
- JSON-oriented examples
- installation variants
- publish examples
- troubleshooting guidance
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install jackwener-xhs-cli - 安装完成后,直接呼叫该 Skill 的名称或使用
/jackwener-xhs-cli触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Xiaohongshu CLI 是什么?
Install and use the `xhs-cli` terminal client for Xiaohongshu (小红书, RedNote, XHS). Use when Codex needs shell-driven Xiaohongshu operations such as checking... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 384 次。
如何安装 Xiaohongshu CLI?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install jackwener-xhs-cli」即可一键安装,无需额外配置。
Xiaohongshu CLI 是免费的吗?
是的,Xiaohongshu CLI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Xiaohongshu CLI 支持哪些平台?
Xiaohongshu CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Xiaohongshu CLI?
由 laosuan(@laosuan)开发并维护,当前版本 v0.1.0。