这几天把 xiaohongshu-cli 连续打磨了一轮,做了几件我自己很满意的事:
- 放弃了没必要的 server 方案,回到纯 CLI,但把真正有价值的状态能力保住了:
- xsec_token + xsec_source 成对缓存
- search 更像浏览器真实请求链
- search_id / note context 复用
- read / comments / reread 的连续链路更稳
- 补了一整套真实只读 smoke tests,不只是单测
直接验证:
search -> read -> comments -> feed -> reread
这类连续场景在真实登录态下能不能跑通
- 做了短索引交互
现在不光能:
- xhs read 1
- xhs comments 1
还支持:
- xhs like 1
- xhs favorite 1
- xhs unfavorite 1
- xhs comment 1 -c "..."
- xhs reply 1 --comment-id ... -c "..."
而且 search / feed / hot / user-posts / favorites / my-notes 都会刷新索引。
顺手还吸收并重做了社区 PR 的产品思路,把实现按当前主线重构了一遍,避免把新的 anti-blocking 逻辑回退掉。
最新版本:v0.6.3
https://t.co/mi1L5h6GNU