Rednote Commands
Use this skill only for the CLI command surface of @skills-store/rednote when the user wants to operate Xiaohongshu from the terminal.
Focus on:
- - the exact command to run
- the minimum required flags
- the correct command order
- practical, copy-paste-ready examples
Preferred command style
Prefer global-install examples first:
CODEBLOCK0
Only mention npx -y @skills-store/rednote ... if the user explicitly asks for one-off execution without global installation.
Only show local repo commands if the user is explicitly developing the CLI.
Use rednote --version when the user wants to confirm the installed @skills-store/rednote version before troubleshooting or upgrading.
For Xiaohongshu operation commands, default to omitting --instance. Assume the CLI uses the current or default connected instance unless the user explicitly asks to target a named instance.
If browser list shows no custom instance yet, tell the user to create one first with rednote browser create --name <NAME> .... A name is required; prefer a short, stable name such as seller-main.
Feature overview
| Command | Purpose | Key required flags | Recommended when | Notes |
|---|
| INLINECODE8 | Manage reusable browser instances | INLINECODE9 requires INLINECODE10 | The user needs to create, inspect, or connect a browser profile | See references/browser.md for detailed subcommands |
| INLINECODE12 |
Show installed CLI version | None | The user is checking install state or troubleshooting | Useful before upgrade/debugging |
|
env | Check local runtime and dependencies | None | The user is debugging setup or installation | Supports JSON output with
--save |
|
status | Check current instance and login state | None | The user wants a quick health check before running other commands | Good after
browser connect |
|
check-login | Verify whether the current session is still valid | None | The user only wants to know whether login is still active | Lighter than full login flow |
|
login | Log in to Xiaohongshu in the connected browser | None | The browser is connected but not authenticated | On success, show the returned QR code image to the user |
|
home | Read the current recommendation feed | None | The user wants candidate notes from the personalized feed | Good starting point before detail lookup |
|
search | Search notes by keyword |
--keyword | The user wants notes for a topic or query | Use before choosing a note to inspect |
|
get-feed-detail | Fetch structured note detail | Prefer
--id;
--url only if the user only has a URL | The user wants title, content, stats, media, or comments for one note | Prefer internal note ID for stability |
|
get-profile | Fetch author/account profile data |
--id | The user wants author info or the author's notes | Supports
--mode profile and
--mode notes |
|
interact | Like, collect, or comment on one note | Prefer
--id; keep
--url as fallback, plus one of
--like,
--collect,
--comment | The user wants to engage with a note | Use
get-feed-detail first if they want to inspect before acting |
|
publish | Publish or save drafts | Depends on content type | The user wants to post image, video, or article content | Usually requires connected and logged-in browser |
Core workflow
Use this sequence for most live Xiaohongshu operations:
- 1. INLINECODE37
- INLINECODE38 ; if no custom instance exists, create one with INLINECODE39
- INLINECODE40
- INLINECODE41 or INLINECODE42
- INLINECODE43
- Run
home, search, get-feed-detail, get-profile, publish, or INLINECODE49
If the user needs exact browser subcommands, flags, or examples, open ./references/browser.md.
If the instance is blocked by a stale profile lock, check ./references/browser.md for the force reconnect command.
Common use cases
Find posts from the home feed
Read the current recommendation feed:
CODEBLOCK1
Use home when the user wants to browse candidate posts from the personalized feed before choosing one to inspect or comment on.
Find posts by keyword
Search by keyword:
CODEBLOCK2
Use search when the user wants candidate notes for a topic instead of the home feed.
Get one note's detail
Prefer the internal note ID:
CODEBLOCK3
Only use --url if the user only has a note URL and does not have the internal ID yet.
CODEBLOCK4
Use get-feed-detail after home or search when the user wants the title, content, interaction data, and media before taking an action. Add --comments only when comment data is needed.
Interact with one note
Prefer the internal note ID:
CODEBLOCK5
Only use --url if the user only has a note URL and does not have the internal ID yet.
CODEBLOCK6
Use interact when the user wants one command entrypoint for like, collect, or comment. Recommend --id first because it is the preferred and more stable input; keep --url as a fallback. Combine --like, --collect, and --comment TEXT to perform multiple operations in one command. Use --comment TEXT for replies; there is no standalone comment command.
Publish content
Publish content for an authenticated instance.
Video note:
CODEBLOCK7
Image note:
CODEBLOCK8
Article:
CODEBLOCK9
Use publish when the user wants to post or save drafts from an authenticated browser instance.
End-to-end examples
Home → detail → interact comment
Find a post, inspect it, then reply:
CODEBLOCK10
Home → detail → like or collect
Inspect a post, then like or collect it:
CODEBLOCK11
Search → detail → interact comment
Start from a keyword, then inspect the note and reply:
CODEBLOCK12
Inspect profile after finding a post
Check the author before engaging:
CODEBLOCK13
Command reference
browser
Use browser list to inspect default browsers, custom instances, stale locks, and the current lastConnect target.
Use browser create to create a reusable named browser profile for later account-scoped commands. Creation requires --name; if the user has no custom instance yet, tell them to pick a name first and then create it, for example rednote browser create --name seller-main --browser chrome --port 9222.
For exact browser subcommands, flags, and examples, open references/browser.md.
version
CODEBLOCK14
Use --version when the user wants to check the installed @skills-store/rednote version.
env
CODEBLOCK15
Use env when the user is debugging installation or local setup.
status
CODEBLOCK16
Use status to confirm whether the instance exists, is running, and appears logged in.
check-login
CODEBLOCK17
Use check-login when the user only wants to verify whether the session is still valid.
login
CODEBLOCK18
Use login after browser connect if the account is not authenticated yet.
If login succeeds and returns rednote.qrCodePath, show the QR code image to the user instead of only repeating the path so they can scan it immediately.
home
CODEBLOCK19
Use home when the user wants the current home feed and optionally wants to save it.
search
CODEBLOCK20
Use search when the user wants notes by keyword.
get-feed-detail
Prefer the internal note ID:
CODEBLOCK21
Only fall back to URL input when the user does not have the internal note ID:
CODEBLOCK22
Use get-feed-detail when the user wants structured detail data for one note. Recommend --id first because it is the preferred and more stable input; use --url only as a fallback.
- - Without
--comments, the saved JSON contains only the note item array. - With
--comments, each item may include a comments array with reduced comment fields only, using only the comments already loaded on the page. It does not scroll. - With
--comments COUNT, the CLI scrolls .note-scroller until it has collected about COUNT comments, reaches the end, or times out. - In JSON mode,
--save PATH is required, and the saved file contains only the note items array instead of the full wrapper object.
get-profile
CODEBLOCK23
Use get-profile when the user wants author or account profile information.
- -
--mode profile returns only the normalized profile.user data. This is the default mode. - INLINECODE110 returns only the normalized
profile.notes list. - When
--format json is used, --save PATH is required, and the saved JSON contains only the selected mode data instead of the full wrapper object.
interact
Prefer the internal note ID:
CODEBLOCK24
Only fall back to URL input when the user does not have the internal note ID:
CODEBLOCK25
Use interact when the user wants a unified command for like, collect, or comment. Recommend --id first because it is the preferred and more stable input; use --url only as a fallback. Use --comment TEXT for replies.
publish
CODEBLOCK26
Use publish when the user wants to publish or save a draft.
JSON save rules
When the user asks for --format json, remember these CLI rules:
- -
env, home, search, get-feed-detail, and get-profile require --save PATH in JSON mode. - The command prints only the saved file path plus a field-format example; the full payload is written to disk.
- INLINECODE128 saves only the normalized user object.
- INLINECODE129 saves only the normalized notes array.
- INLINECODE130 saves only the normalized note items array; add
--comments to include reduced comment data from the currently loaded comments, or --comments COUNT to scroll for more comments.
Flag guidance
- -
--instance NAME picks the browser instance for account-scoped commands. - INLINECODE134 is best for scripting.
- INLINECODE135 is best for direct reading.
- INLINECODE136 is required in JSON mode for
env, home, search, get-feed-detail, and get-profile. - INLINECODE142 is required for
search. - Prefer
--id for get-feed-detail; use --url only when the internal note ID is unavailable. - Prefer
--id for interact; use --url only when the internal note ID is unavailable. - INLINECODE150 uses
--comment TEXT for comment content; there is no standalone comment command. - INLINECODE153 requires either
--id or --url, plus at least one of --like, --collect, or --comment TEXT. - INLINECODE159 is required for
get-profile. - INLINECODE161 ,
--title, --content, --video, --image, --tag, and --publish are the main publish flags. - INLINECODE169 usually requires a connected and logged-in instance before running; without
--publish, it saves a draft.
Response style
When answering users:
- - lead with the exact command they should run
- include only the flags needed for that task
- prefer one happy-path example first
- mention
browser connect and login if the command requires an authenticated instance - if no custom instance exists yet, first tell the user to create one and call out that
--name is required - recommend
home or search first when the user still needs to find a post - recommend
get-feed-detail before interact --comment when the user wants to inspect the post before replying - for
get-feed-detail, recommend --id first and treat --url as a fallback only - for
interact, recommend --id first and treat --url as a fallback only
Troubleshooting
If a command fails, check these in order:
- - the instance name is correct
- the browser instance was created or connected; if no custom instance exists yet, create one first with INLINECODE184
- login was completed for that instance
- the profile was not blocked by a stale lock; if it was, run INLINECODE185
- the user provided the required flag such as
--keyword, --id or --url, --comment, or INLINECODE190
Rednote 命令
仅在用户想要从终端操作小红书时,将此技能用于 @skills-store/rednote 的 CLI 命令界面。
重点关注:
- - 要运行的确切命令
- 最少必需的标志
- 正确的命令顺序
- 实用、可直接复制粘贴的示例
首选命令风格
优先展示全局安装示例:
bash
npm install -g @skills-store/rednote
bun add -g @skills-store/rednote
rednote [...args]
仅当用户明确要求一次性执行而不进行全局安装时,才提及 npx -y @skills-store/rednote ...。
仅当用户正在明确开发 CLI 时,才展示本地仓库命令。
当用户想在故障排除或升级前确认已安装的 @skills-store/rednote 版本时,使用 rednote --version。
对于小红书操作命令,默认省略 --instance。假设 CLI 使用当前或默认连接的实例,除非用户明确要求指定某个命名实例。
如果 browser list 显示尚无自定义实例,告知用户先使用 rednote browser create --name ... 创建一个。名称是必需的;建议使用简短、稳定的名称,例如 seller-main。
功能概览
| 命令 | 用途 | 关键必需标志 | 推荐使用场景 | 备注 |
|---|
| browser | 管理可重用的浏览器实例 | create 需要 --name | 用户需要创建、检查或连接浏览器配置文件 | 详细子命令请参见 references/browser.md |
| --version |
显示已安装的 CLI 版本 | 无 | 用户正在检查安装状态或进行故障排除 | 在升级/调试前使用 |
| env | 检查本地运行环境和依赖 | 无 | 用户正在调试安装或设置 | 支持使用 --save 输出 JSON |
| status | 检查当前实例和登录状态 | 无 | 用户想在运行其他命令前快速进行健康检查 | 在 browser connect 后使用效果良好 |
| check-login | 验证当前会话是否仍然有效 | 无 | 用户只想了解登录是否仍然有效 | 比完整的登录流程更轻量 |
| login | 在已连接的浏览器中登录小红书 | 无 | 浏览器已连接但未认证 | 成功后,向用户展示返回的二维码图片 |
| home | 读取当前推荐信息流 | 无 | 用户想要从个性化信息流中获取候选笔记 | 在查看详情前作为起点使用 |
| search | 按关键词搜索笔记 | --keyword | 用户想要某个主题或查询的笔记 | 在选择要查看的笔记前使用 |
| get-feed-detail | 获取结构化的笔记详情 | 首选 --id;仅当用户只有 URL 时使用 --url | 用户想要某条笔记的标题、内容、统计数据、媒体或评论 | 为保持稳定性,优先使用内部笔记 ID |
| get-profile | 获取作者/账号个人资料数据 | --id | 用户想要作者信息或作者的笔记 | 支持 --mode profile 和 --mode notes |
| interact | 对一条笔记进行点赞、收藏或评论 | 首选 --id;保留 --url 作为备选,加上 --like、--collect、--comment 之一 | 用户想要与笔记互动 | 如果用户想在操作前先查看,先使用 get-feed-detail |
| publish | 发布或保存草稿 | 取决于内容类型 | 用户想要发布图片、视频或文章内容 | 通常需要已连接并已登录的浏览器 |
核心工作流程
对于大多数实时小红书操作,请使用此顺序:
- 1. rednote env
- rednote browser list;如果没有自定义实例,使用 rednote browser create --name seller-main --browser chrome --port 9222 创建一个
- rednote browser connect
- rednote login 或 rednote check-login
- rednote status
- 运行 home、search、get-feed-detail、get-profile、publish 或 interact
如果用户需要确切的浏览器子命令、标志或示例,请打开 ./references/browser.md。
如果实例因过时的配置文件锁定而被阻止,请查看 ./references/browser.md 了解强制重新连接命令。
常见用例
从首页信息流查找帖子
读取当前推荐信息流:
bash
rednote home --format md
rednote home --format json --save ./output/home.jsonl
当用户想要从个性化信息流中浏览候选帖子,然后再选择要查看或评论的帖子时,使用 home。
按关键词查找帖子
按关键词搜索:
bash
rednote search --keyword 护肤
rednote search --keyword 护肤 --format json --save ./output/search.json
当用户想要某个主题的候选笔记而不是首页信息流时,使用 search。
获取一条笔记的详情
优先使用内部笔记 ID:
bash
rednote get-feed-detail --id NOTE_ID
rednote get-feed-detail --id NOTE_ID --format json --save ./output/feed-detail.json
rednote get-feed-detail --id NOTE_ID --comments --format json --save ./output/feed-detail-with-comments.json
rednote get-feed-detail --id NOTE_ID --comments 100 --format json --save ./output/feed-detail-100-comments.json
仅当用户只有笔记 URL 且没有内部 ID 时,才使用 --url。
bash
rednote get-feed-detail --url https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy
在 home 或 search 之后,当用户想要获取标题、内容、互动数据和媒体信息后再采取行动时,使用 get-feed-detail。仅在需要评论数据时添加 --comments。
与一条笔记互动
优先使用内部笔记 ID:
bash
rednote interact --id NOTE_ID --like --collect
rednote interact --id NOTE_ID --like --collect --comment 内容写得很清楚,步骤也很实用,感谢分享。
仅当用户只有笔记 URL 且没有内部 ID 时,才使用 --url。
bash
rednote interact --url https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy --like --collect
当用户想要通过一个命令入口点进行点赞、收藏或评论时,使用 interact。首先推荐 --id,因为它是首选且更稳定的输入;保留 --url 作为备选。可以组合使用 --like、--collect 和 --comment TEXT 在一个命令中执行多个操作。使用 --comment TEXT 进行回复;没有独立的 comment 命令。
发布内容
为已认证的实例发布内容。
视频笔记:
bash
rednote publish --type video --video ./note.mp4 --title 标题 --content 描述 --tag 穿搭 --tag 日常 --publish
图片笔记:
bash
rednote publish --type image --image ./1.jpg --image ./2.jpg --title 标题 --content 描述 --tag 探店 --publish
文章:
bash
rednote publish --type article --title 标题 --content $# 一级标题\n\n正文 --publish
当用户想要从已认证的浏览器实例发布或保存草稿时,使用 publish。
端到端示例
首页 → 详情 → 互动评论
查找帖子,查看详情,然后回复:
bash
rednote home --format md
rednote get-feed-detail --id NOTE_ID
rednote interact --id NOTE_ID --comment 谢谢分享,信息整理得很完整,对我很有帮助。
首页 → 详情 → 点赞或收藏
查看帖子,然后点赞或收藏:
bash
rednote home --format md
rednote get-feed-detail --id NOTE_ID
rednote interact --id NOTE_ID --like --collect
搜索 → 详情 → 互动评论
从关键词开始,然后查看笔记并回复:
bash
rednote search --keyword 低糖早餐 --format md
rednote get-feed-detail --id NOTE_ID --comments --format json --save ./output/feed-detail-with-comments.json
rednote get-feed-detail --id NOTE_ID --comments 100 --format json --save ./output/feed-detail-100-comments.json
rednote interact --id NOTE_ID --comment 这份搭配看起来很实用,食材和步骤都写得很清楚。
查找帖子后查看个人资料
在互动前检查作者:
bash
rednote get-feed-detail --id NOTE_ID --format json --save ./