@skills-store/rednote 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +144 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,35 +1,164 @@
1
- # rednote
1
+ # @skills-store/rednote
2
2
 
3
- A Xiaohongshu (RED) automation CLI.
3
+ A Xiaohongshu (RED) automation CLI for browser session management, login, search, feed detail lookup, and profile lookup.
4
4
 
5
- ## Run with npx
5
+ ## Install
6
+
7
+ ### Install globally
6
8
 
7
9
  ```bash
8
- npx -y @skills-store/rednote browser list
9
- npx -y @skills-store/rednote browser create --name seller-main --browser chrome
10
- npx -y @skills-store/rednote browser connect --instance seller-main
11
- npx -y @skills-store/rednote login --instance seller-main
12
- npx -y @skills-store/rednote search --instance seller-main --keyword 护肤
13
- npx -y @skills-store/rednote get-feed-detail --instance seller-main --url "https://www.xiaohongshu.com/explore/<id>?xsec_token=<token>"
14
- npx -y @skills-store/rednote get-profile --instance seller-main --id USER_ID
10
+ npm install -g @skills-store/rednote
11
+ bun add -g @skills-store/rednote
15
12
  ```
16
13
 
17
- ## Install globally
14
+ After global installation, use the `rednote` executable:
18
15
 
19
16
  ```bash
20
- npm install -g @skills-store/rednote
17
+ rednote <command> [...args]
18
+ ```
19
+
20
+ ## Recommended command order
21
+
22
+ For most tasks, run commands in this order:
23
+
24
+ ```text
25
+ 1. env
26
+ 2. browser list or browser create
27
+ 3. browser connect
28
+ 4. login or check-login
29
+ 5. status
30
+ 6. home, search, get-feed-detail, or get-profile
31
+ ```
32
+
33
+ ## Quick start
34
+
35
+ ```bash
36
+ rednote env
37
+ rednote browser create --name seller-main --browser chrome --port 9222
38
+ rednote browser connect --instance seller-main
39
+ rednote login --instance seller-main
40
+ rednote status --instance seller-main
41
+ rednote search --instance seller-main --keyword 护肤
42
+ ```
43
+
44
+ ## Commands
45
+
46
+ ### `browser`
47
+
48
+ ```bash
49
+ rednote browser list
50
+ rednote browser create --name seller-main --browser chrome --port 9222
51
+ rednote browser connect --instance seller-main
52
+ rednote browser connect --browser edge --user-data-dir /tmp/edge-profile --port 9223
53
+ rednote browser remove --name seller-main
21
54
  ```
22
55
 
56
+ Use `browser` for browser setup, reusable profiles, and instance management.
57
+
58
+ ### `env`
59
+
60
+ ```bash
61
+ rednote env
62
+ rednote env --format json
63
+ ```
64
+
65
+ Use `env` first when checking installation, runtime info, or storage paths.
66
+
67
+ ### `status`
68
+
69
+ ```bash
70
+ rednote status --instance seller-main
71
+ ```
72
+
73
+ Use `status` to confirm whether an instance exists, is running, and appears logged in.
74
+
75
+ ### `check-login`
76
+
77
+ ```bash
78
+ rednote check-login --instance seller-main
79
+ ```
80
+
81
+ Use `check-login` when you only want to verify whether the session is still valid.
82
+
83
+ ### `login`
84
+
85
+ ```bash
86
+ rednote login --instance seller-main
87
+ ```
88
+
89
+ Use `login` after `browser connect` if the instance is not authenticated yet.
90
+
91
+ ### `home`
92
+
93
+ ```bash
94
+ rednote home --instance seller-main --format md --save
95
+ ```
96
+
97
+ Use `home` when you want the current home feed and optionally want to save it to disk.
98
+
99
+ ### `search`
100
+
101
+ ```bash
102
+ rednote search --instance seller-main --keyword 护肤
103
+ rednote search --instance seller-main --keyword 护肤 --format json --save ./output/search.jsonl
104
+ ```
105
+
106
+ Use `search` for keyword-based note lookup.
107
+
108
+ ### `get-feed-detail`
109
+
110
+ ```bash
111
+ rednote get-feed-detail --instance seller-main --url "https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy"
112
+ ```
113
+
114
+ Use `get-feed-detail` when you already have a Xiaohongshu note URL.
115
+
116
+ ### `get-profile`
117
+
118
+ ```bash
119
+ rednote get-profile --instance seller-main --id USER_ID
120
+ ```
121
+
122
+ Use `get-profile` when you want author or account profile information.
123
+
124
+ ## Important flags
125
+
126
+ - `--instance NAME` selects the browser instance for account-scoped commands.
127
+ - `--format json` is best for scripting.
128
+ - `--format md` is best for direct reading.
129
+ - `--save` is useful for `home` and `search` when you want saved output.
130
+ - `--keyword` is required for `search`.
131
+ - `--url` is required for `get-feed-detail`.
132
+ - `--id` is required for `get-profile`.
133
+
23
134
  ## Storage
24
135
 
25
- The CLI stores custom browser instances and metadata under:
136
+ The CLI stores browser instances and metadata under:
26
137
 
27
138
  ```text
28
139
  ~/.skills-router/rednote/instances
29
140
  ```
30
141
 
31
- Run this to inspect the current environment and exact resolved paths:
142
+ Inspect the current environment and resolved paths with:
32
143
 
33
144
  ```bash
34
- npx -y @skills-store/rednote env
145
+ rednote env
35
146
  ```
147
+
148
+ ## Troubleshooting
149
+
150
+ If a command fails, check these in order:
151
+
152
+ - the instance name is correct
153
+ - the browser instance was created or connected
154
+ - login was completed for that instance
155
+ - the required flag such as `--keyword`, `--url`, or `--id` was provided
156
+
157
+ ## Repository
158
+
159
+ - Homepage: https://github.com/skills-router/skills-store/tree/main/packages/rednote
160
+ - Issues: https://github.com/skills-router/skills-store/issues
161
+
162
+ ## License
163
+
164
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skills-store/rednote",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {