@skills-store/rednote 0.1.5 → 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.
- package/README.md +164 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# @skills-store/rednote
|
|
2
|
+
|
|
3
|
+
A Xiaohongshu (RED) automation CLI for browser session management, login, search, feed detail lookup, and profile lookup.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
### Install globally
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @skills-store/rednote
|
|
11
|
+
bun add -g @skills-store/rednote
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
After global installation, use the `rednote` executable:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
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
|
|
54
|
+
```
|
|
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
|
+
|
|
134
|
+
## Storage
|
|
135
|
+
|
|
136
|
+
The CLI stores browser instances and metadata under:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
~/.skills-router/rednote/instances
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Inspect the current environment and resolved paths with:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
rednote env
|
|
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
|