Prefer using sau as the primary interface.
Do not assume the current environment can read the repository source code.
Do not start by reading uploader/.
Only fall back to the troubleshooting instructions when the command is unavailable or the CLI execution fails.
Feature Overview
| Feature | Command Entry | Description |
|---|---|---|
| Xiaohongshu Login | sau xiaohongshu login --account <name> |
Generate or refresh the cookie for the specified account |
| Cookie Validation | sau xiaohongshu check --account <name> |
Check whether the specified account cookie is valid |
| Video Upload | sau xiaohongshu upload-video ... |
Upload and publish a Xiaohongshu video |
| Image-and-Text Upload | sau xiaohongshu upload-note ... |
Upload and publish Xiaohongshu image-and-text content |
Metadata conventions:
- For videos use
title + desc + tags - For image-and-text use
title + note + tags
Default Workflow
- First confirm
references/runtime-requirements.mdthe runtime prerequisites. - Then confirm
references/cli-contract.mdthe command contract. - Execute the matching
sau xiaohongshu ...command. - If the command fails, then check
references/troubleshooting.md。
Supported Actions
- Use
sau xiaohongshu login --account <name>to log in to Xiaohongshu - Use
sau xiaohongshu check --account <name>to validate whether the cookie is valid - Use
sau xiaohongshu upload-video ...to upload a Xiaohongshu video - Use
sau xiaohongshu upload-note ...to upload Xiaohongshu image-and-text content
Command Selection Suggestions
- When the user needs a new cookie, or the existing cookie has expired, use
login - When the user only needs to confirm the cookie status, use
check - When the user wants to publish a video, use
upload-video - When the user wants to publish image-and-text content, use
upload-note
Pre-execution Checks
- First confirm whether
sau - If
sauis unavailable, handle it according toreferences/runtime-requirements.mdthe fallback method. - When the user explicitly specifies headless or headed mode, explicitly pass
--headlessor--headed - Only use
--schedule - If the login process generates a local QR code image, do not just tell the user the image path
- The QR code image itself is for the user to scan; prefer to directly display/send the local image to the user
Template Files
When you need stable command templates, use the files under scripts/examples/ :
xiaohongshu_commands.ps1xiaohongshu_commands.shxiaohongshu_cli_template.py
Reference Documentation
- Runtime Prerequisites:
references/runtime-requirements.md - CLI Contract:
references/cli-contract.md - Troubleshooting:
references/troubleshooting.md