Rednote platform CLI
Project description
rednote-cli
Rednote 平台专用 CLI 包(独立安装、独立升级)。
安装
pipx install rednote-cli
快速开始
rednote-cli init runtime
rednote-cli doctor run --format json
rednote-cli account login
rednote-cli account status --format json
rednote-cli account list --only-active true
rednote-cli account list --only-active false
rednote-cli search note --keyword 旅行 --size 10 --sort-by latest --note-type image_text --format json
rednote-cli publish --target image --account user_001 --image-list /abs/a.jpg,/abs/b.jpg --title 标题 --content 正文 --format json
rednote-cli publish --target video --account user_001 --video /abs/demo.mp4 --title 标题 --content 正文 --format json
命令结构(当前版本):
note/user作为详情查询入口,search note|user作为统一搜索入口。- 旧层级
note get|search、user get|search已移除。
空参数行为(统一约定):
rednote-cli note、rednote-cli publish、rednote-cli account activate等缺少业务参数时,输出帮助文本并返回退出码0。- 非空调用但参数非法时,返回 JSON
INVALID_ARGS(退出码2)。
account status 会实时打开浏览器检查登录态并刷新账号存储(is_logged_in/check_time/storage_state),输出结构与 account list --only-active false 对齐。
account list 的 --only-active 支持显式 true|false(默认 true)。
发布能力说明:
publish --target image:图文发布,支持本地/URL 图片,--account必填。publish --target video:视频发布,支持本地/URL 视频(仅mp4/mov),--account必填。
自动化建议
rednote-cli --format json --trace-id req-001 <command> ...
--input(面向 AI/Agent):
- 作用:从 JSON 文件或 stdin 读取参数,适合复杂命令的程序化调用。
- 优先级:显式 CLI 参数 >
--inputJSON > 默认值。 - 范围:
--input不是全局参数,仅search note|user、note、user、publish支持。
示例:
rednote-cli --format json --trace-id req-001 search note --input payload.json
cat payload.json | rednote-cli --format json --trace-id req-002 publish --input - --account user_001
文档
完整文档请查看仓库根目录:
README.mdDESIGN.mdDEV.mdUSER_GUIDE.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rednote_cli-0.1.0.tar.gz
(53.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rednote_cli-0.1.0.tar.gz.
File metadata
- Download URL: rednote_cli-0.1.0.tar.gz
- Upload date:
- Size: 53.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
159073aa4ca36bdfee80b37318e3fac947d232ad07dee439241e4ae4be1951a7
|
|
| MD5 |
571929eeaf76fb656a0ed55fe84663e4
|
|
| BLAKE2b-256 |
340a13bd83816174c677317f42c828f2bdac8b68981fd27a416d2c7c34f1e366
|
File details
Details for the file rednote_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rednote_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 75.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45d1e1cb8357046b38b5f75859cb14aa1ed9719523947bd060eddae271fe95da
|
|
| MD5 |
0a0e03addc481f357de113cea361a9c0
|
|
| BLAKE2b-256 |
34be91afcd5b40060038d1419f5a7558062a6e1f8e59f19ba7325c35ac298daf
|