opencli-plugin-socialdatax 0.1.0 → 0.1.1

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 CHANGED
@@ -16,6 +16,8 @@ Use this OpenCLI plugin when you want API Key based data access without relying
16
16
  opencli plugin install /Users/devin/work/cx/code/social-service/public-listings/socialdatax-opencli
17
17
  ```
18
18
 
19
+ OpenCLI plugin install currently accepts file, GitHub, and git sources. It does not install plugins directly from an npm package name, so use an absolute local path for this private-repo smoke test or a GitHub/git source after the plugin is mirrored to a public repository.
20
+
19
21
  Set your API Key before data calls:
20
22
 
21
23
  ```bash
@@ -60,3 +62,26 @@ Users and agents may search for this plugin with:
60
62
  - `social media data`
61
63
  - `creator analytics`
62
64
  - `comment analysis`
65
+
66
+ ## Maintainer Notes
67
+
68
+ Published package: `opencli-plugin-socialdatax`.
69
+
70
+ Current npm release: `0.1.0`, published on `2026-05-19 11:17:29` Asia/Shanghai.
71
+
72
+ Local source version: `0.1.1`, prepared after smoke testing so the plugin ships a precompiled `socialdatax.js` entrypoint for OpenCLI environments without `esbuild`.
73
+
74
+ Release from the repository root:
75
+
76
+ ```bash
77
+ node scripts/publish_socialdatax_opencli.mjs --dry-run
78
+ node scripts/publish_socialdatax_opencli.mjs
79
+ ```
80
+
81
+ Verify after publishing:
82
+
83
+ ```bash
84
+ npm view opencli-plugin-socialdatax version time dist-tags.latest homepage engines --json
85
+ opencli plugin install /Users/devin/work/cx/code/social-service/public-listings/socialdatax-opencli
86
+ opencli list | rg 'socialdatax|小红书|抖音|xiaohongshu|douyin'
87
+ ```
@@ -2,7 +2,7 @@
2
2
  "name": "socialdatax",
3
3
  "displayName": "SocialDataX / 社媒数据助手",
4
4
  "description": "SocialDataX / 社媒数据助手 provides hosted read-only social data tools for 小红书 / Xiaohongshu / XHS / RedNote and 抖音 / Douyin: search content, read details, analyze comments, creator profiles, and creator posts.",
5
- "version": "0.1.0",
5
+ "version": "0.1.1",
6
6
  "opencli": ">=1.0.0",
7
7
  "homepage": "https://socialdatax.com",
8
8
  "keywords": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencli-plugin-socialdatax",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "SocialDataX / 社媒数据助手 OpenCLI plugin for 小红书, Xiaohongshu, XHS, RedNote, 抖音, and Douyin read-only social data workflows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,6 +8,7 @@
8
8
  "README.md",
9
9
  "LICENSE",
10
10
  "opencli-plugin.json",
11
+ "socialdatax.js",
11
12
  "socialdatax.ts",
12
13
  "lib/**",
13
14
  "skills/**"
package/socialdatax.js ADDED
@@ -0,0 +1,145 @@
1
+ import { cli, Strategy } from "@jackwener/opencli/registry";
2
+ import { runSocialDataXCommand } from "./lib/socialdatax-core.mjs";
3
+
4
+ const COMMON_COLUMNS = [
5
+ "note_id",
6
+ "note_url",
7
+ "aweme_id",
8
+ "sec_user_id",
9
+ "comment_id",
10
+ "title",
11
+ "desc",
12
+ "content",
13
+ "nickname",
14
+ "author_nickname",
15
+ "profile_nickname",
16
+ "like_count",
17
+ "comment_count",
18
+ "top_level_comment_count",
19
+ "next_page",
20
+ "next_page_token",
21
+ ];
22
+
23
+ const pageTokenOption = {
24
+ name: "page-token",
25
+ type: "string",
26
+ help: "Opaque pagination token returned by the previous page.",
27
+ };
28
+
29
+ function localCommand(name, description, options = {}) {
30
+ return cli({
31
+ site: "socialdatax",
32
+ name,
33
+ description,
34
+ access: "read",
35
+ example: `opencli socialdatax ${name} -f json`,
36
+ strategy: Strategy.LOCAL,
37
+ browser: false,
38
+ args: options,
39
+ columns: COMMON_COLUMNS,
40
+ async func(argv) {
41
+ return runSocialDataXCommand(name, argv);
42
+ },
43
+ });
44
+ }
45
+
46
+ localCommand(
47
+ "xhs-search",
48
+ "Search 小红书 / Xiaohongshu / XHS / RedNote notes with SocialDataX / 社媒数据助手.",
49
+ [
50
+ { name: "keyword", type: "string", required: true, help: "Search keyword." },
51
+ { name: "page", type: "int", help: "1-based page number." },
52
+ { name: "sort-type", type: "string", help: "general, time_descending, like_count_descending, comment_count_descending, or collect_count_descending." },
53
+ { name: "note-type", type: "string", help: "all, image, or video." },
54
+ { name: "publish-time-range", type: "string", help: "all, day, week, or half_year." },
55
+ ]
56
+ );
57
+ localCommand(
58
+ "xhs-detail",
59
+ "Read one 小红书 / Xiaohongshu / XHS / RedNote note detail.",
60
+ [
61
+ { name: "note-id", type: "string", help: "Known XHS note ID." },
62
+ { name: "url", type: "string", help: "XHS note URL, short link, share text, or note ID." },
63
+ ]
64
+ );
65
+ localCommand(
66
+ "xhs-comments",
67
+ "Fetch 小红书 / Xiaohongshu / XHS / RedNote first-level comments.",
68
+ [
69
+ { name: "note-id", type: "string", help: "Known XHS note ID." },
70
+ { name: "url", type: "string", help: "XHS note URL, short link, or share text." },
71
+ pageTokenOption,
72
+ ]
73
+ );
74
+ localCommand(
75
+ "xhs-sub-comments",
76
+ "Fetch 小红书 / Xiaohongshu / XHS / RedNote replies under one comment.",
77
+ [
78
+ { name: "note-id", type: "string", required: true, help: "Known XHS note ID." },
79
+ { name: "comment-id", type: "string", required: true, help: "First-level comment ID." },
80
+ pageTokenOption,
81
+ ]
82
+ );
83
+ localCommand(
84
+ "xhs-user-info",
85
+ "Read 小红书 / Xiaohongshu / XHS / RedNote creator profile data.",
86
+ [
87
+ { name: "user-id", type: "string", help: "Known XHS user ID." },
88
+ { name: "profile-url", type: "string", help: "XHS profile URL, short link, or share text." },
89
+ ]
90
+ );
91
+ localCommand(
92
+ "xhs-user-posts",
93
+ "Fetch 小红书 / Xiaohongshu / XHS / RedNote creator notes.",
94
+ [
95
+ { name: "user-id", type: "string", help: "Known XHS user ID." },
96
+ { name: "profile-url", type: "string", help: "XHS profile URL, short link, or share text." },
97
+ pageTokenOption,
98
+ ]
99
+ );
100
+ localCommand(
101
+ "douyin-search",
102
+ "Search 抖音 / Douyin works with SocialDataX / 社媒数据助手.",
103
+ [
104
+ { name: "keyword", type: "string", required: true, help: "Search keyword." },
105
+ pageTokenOption,
106
+ { name: "sort-type", type: "string", help: "general, time_descending, or like_count_descending." },
107
+ { name: "publish-time-range", type: "string", help: "all, day, week, or half_year." },
108
+ { name: "duration-range", type: "string", help: "all, under_1_minute, one_to_five_minutes, or over_5_minutes." },
109
+ { name: "content-type", type: "string", help: "all, video, or image." },
110
+ ]
111
+ );
112
+ localCommand(
113
+ "douyin-detail",
114
+ "Read one 抖音 / Douyin work detail.",
115
+ [
116
+ { name: "aweme-id", type: "string", help: "Known Douyin aweme_id." },
117
+ { name: "url", type: "string", help: "Douyin content URL, short link, or share text." },
118
+ ]
119
+ );
120
+ localCommand(
121
+ "douyin-comments",
122
+ "Fetch 抖音 / Douyin first-level comments.",
123
+ [
124
+ { name: "aweme-id", type: "string", help: "Known Douyin aweme_id." },
125
+ { name: "url", type: "string", help: "Douyin content URL, short link, or share text." },
126
+ pageTokenOption,
127
+ ]
128
+ );
129
+ localCommand(
130
+ "douyin-user-info",
131
+ "Read 抖音 / Douyin creator profile data.",
132
+ [
133
+ { name: "sec-user-id", type: "string", help: "Known Douyin sec_user_id." },
134
+ { name: "profile-url", type: "string", help: "Douyin profile URL, short link, or share text." },
135
+ ]
136
+ );
137
+ localCommand(
138
+ "douyin-user-posts",
139
+ "Fetch 抖音 / Douyin creator works.",
140
+ [
141
+ { name: "sec-user-id", type: "string", help: "Known Douyin sec_user_id." },
142
+ { name: "profile-url", type: "string", help: "Douyin profile URL, short link, or share text." },
143
+ pageTokenOption,
144
+ ]
145
+ );