@fastmoss/cli 0.1.4 → 0.1.6

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.
@@ -0,0 +1,70 @@
1
+ # FastMoss CLI Command Reference
2
+
3
+ ## Install
4
+
5
+ Install the CLI before using this skill:
6
+
7
+ ```bash
8
+ npm install -g @fastmoss/cli
9
+ ```
10
+
11
+ After installation, the command is:
12
+
13
+ ```bash
14
+ fastmoss
15
+ ```
16
+
17
+ If `fastmoss` is not found, ask the user to make sure the npm global bin directory is in `PATH`.
18
+
19
+ ## Authentication and config
20
+
21
+ ```bash
22
+ fastmoss login --api-key <api-key>
23
+ fastmoss logout
24
+ fastmoss whoami
25
+ fastmoss show config
26
+ fastmoss show auth
27
+ fastmoss set api-key <api-key>
28
+ fastmoss clear api-key
29
+ fastmoss set language zh
30
+ fastmoss set language en
31
+ ```
32
+
33
+ `whoami`, `show config`, and `show auth` are safe first checks. Do not print or expose API keys in the final answer.
34
+
35
+ ## Tool discovery
36
+
37
+ ```bash
38
+ fastmoss tools
39
+ fastmoss tools --json
40
+ fastmoss tools --search <tool_name>
41
+ ```
42
+
43
+ Use `tools --json` when live metadata is needed. Use `tools --search <tool_name>` to inspect one exact tool.
44
+
45
+ ## Tool calls
46
+
47
+ ```bash
48
+ fastmoss call --tool <tool_name> --args '<json>' --output mcp
49
+ ```
50
+
51
+ Shortcut form:
52
+
53
+ ```bash
54
+ fastmoss <tool_name> --args '<json>' --output mcp
55
+ ```
56
+
57
+ Prefer the explicit `call --tool` form inside agents because it is clearer and easier to debug.
58
+
59
+ ## Common flags
60
+
61
+ These flags are supported by networked tool commands:
62
+
63
+ ```bash
64
+ --api-key <api-key>
65
+ --base-url <url>
66
+ --timeout <seconds>
67
+ --insecure-skip-tls
68
+ ```
69
+
70
+ Use config or environment defaults unless the user explicitly asks to override them.
@@ -0,0 +1,103 @@
1
+ # Calling FastMoss Tools from CLI
2
+
3
+ ## Basic pattern
4
+
5
+ ```bash
6
+ FASTMOSS_CLIENT_NAME="<client-name>" FASTMOSS_CLIENT_VERSION="<client-version>" fastmoss call --tool <tool_name> --args '<json>' --output mcp
7
+ ```
8
+
9
+ ## Client metadata
10
+
11
+ Every `fastmoss call` MUST include agent client metadata. Prefer environment variables when making one or more calls in the same shell session:
12
+
13
+ ```bash
14
+ FASTMOSS_CLIENT_NAME="<client-name>" FASTMOSS_CLIENT_VERSION="<client-version>" fastmoss call --tool <tool_name> --args '<json>' --output mcp
15
+ ```
16
+
17
+ Or pass explicit flags for a single call:
18
+
19
+ ```bash
20
+ fastmoss call --client-name "<client-name>" --client-version "<client-version>" --tool <tool_name> --args '<json>' --output mcp
21
+ ```
22
+
23
+ Use the actual client name and version when available. Do not invent a version number; if the runtime does not expose a version, use the client name and omit the version only if the CLI allows it.
24
+
25
+ Always pass valid JSON to `--args`. On macOS/Linux shells, wrap JSON in single quotes:
26
+
27
+ ```bash
28
+ FASTMOSS_CLIENT_NAME="<client-name>" FASTMOSS_CLIENT_VERSION="<client-version>" fastmoss call --tool creator_search --args '{"keywords":"beauty","region":"US"}' --output mcp
29
+ ```
30
+
31
+ If a value contains a single quote, write the JSON to a temporary file or carefully escape it before calling the CLI.
32
+
33
+ ## Choose the tool
34
+
35
+ 1. Read `references/tools.md` for the packaged static catalog index, then read the matching category file:
36
+ - `tools-advertising.md` for `ad_` tools.
37
+ - `tools-agency.md` for `agency_` tools.
38
+ - `tools-creator.md` for `creator_` tools.
39
+ - `tools-product.md` for `product_` tools.
40
+ - `tools-shop.md` for `shop_` tools.
41
+ - `tools-market.md` for `market_` tools.
42
+ - `tools-auxiliary-knowledge.md` for helper, link, document, category, live, video, and other tools.
43
+ 2. If the user is logged in and live metadata matters, run:
44
+
45
+ ```bash
46
+ fastmoss tools --json
47
+ fastmoss tools --search <tool_name>
48
+ ```
49
+
50
+ 3. Match the user's intent to the most specific tool. Prefer specific product, creator, shop, ad, video, category, or ranking tools over broad search tools.
51
+
52
+ ## Output modes
53
+
54
+ Use:
55
+
56
+ ```bash
57
+ --output mcp
58
+ ```
59
+
60
+ when an LLM or agent will read and reason over the tool response.
61
+
62
+ Use:
63
+
64
+ ```bash
65
+ --output data
66
+ ```
67
+
68
+ when the user needs a concise end-user payload without extra protocol wrapping.
69
+
70
+ Use:
71
+
72
+ ```bash
73
+ --output rpc
74
+ ```
75
+
76
+ only when debugging raw RPC behavior.
77
+
78
+ ## Error handling
79
+
80
+ - If the CLI is missing, tell the user to run `npm install -g @fastmoss/cli`.
81
+ - If auth is missing, tell the user to run `fastmoss login --api-key <api-key>`.
82
+ - If the tool name is unknown, check `references/tools.md` and the matching category file, then try `fastmoss tools --json` when live discovery is available.
83
+ - If arguments are rejected, inspect the tool's parameter table in the matching category file or run `fastmoss tools --search <tool_name>`.
84
+ - Do not invent unavailable fields. Ask a focused follow-up question when required parameters are missing.
85
+
86
+ ## Detail-page links
87
+
88
+ When the answer should include FastMoss detail-page links, call this helper first:
89
+
90
+ ```bash
91
+ FASTMOSS_CLIENT_NAME="<client-name>" FASTMOSS_CLIENT_VERSION="<client-version>" fastmoss call --tool fastmoss_detail_url_examples --args '{}' --output mcp
92
+ ```
93
+
94
+ Use the returned examples as the link assembly rules. Combine those rules with product IDs, creator IDs, shop IDs, video IDs, live IDs, or other IDs returned by the analysis tools.
95
+
96
+ ## Response pattern
97
+
98
+ After a successful tool call:
99
+
100
+ 1. Summarize the answer in the user's language.
101
+ 2. Mention key filters or assumptions used in the call.
102
+ 3. Preserve IDs, URLs, categories, regions, dates, and numeric fields that the user may need next.
103
+ 4. If the result is empty, suggest one or two concrete next filters to broaden or correct the query.
@@ -0,0 +1,48 @@
1
+ # Advertising Tools
2
+
3
+ > Advertising tools for ad creatives, ad spend, ROAS, engagement, and paid-traffic performance analysis.
4
+
5
+ ## Tool summary
6
+
7
+ | Tool | Description |
8
+ |---|---|
9
+ | ad_data_overview | Use when the user has a video_id and wants ad spend, ROAS, play, engagement, follower, and commerce performance over... |
10
+ | ad_search | Use when the user wants active ad creatives or needs to filter ads by country, category, landing page, spend, ROAS, p... |
11
+
12
+ ## Tool details
13
+
14
+ ### ad_data_overview
15
+
16
+ Use when the user has a video_id and wants ad spend, ROAS, play, engagement, follower, and commerce performance over a date range.
17
+
18
+ Example:
19
+
20
+ ```bash
21
+ fastmoss call --tool ad_data_overview --args '{"filter":{}}' --output mcp
22
+ ```
23
+
24
+ Parameters:
25
+
26
+ | Name | Type | Required | Description |
27
+ |---|---|---|---|
28
+ | filter | object | yes | Filter parameters. |
29
+
30
+ ### ad_search
31
+
32
+ Use when the user wants active ad creatives or needs to filter ads by country, category, landing page, spend, ROAS, plays, or run days. Returns ad, creator, shop, products, and performance sections.
33
+
34
+ Example:
35
+
36
+ ```bash
37
+ fastmoss call --tool ad_search --args '{"filter":{},"orderby":[],"page":1}' --output mcp
38
+ ```
39
+
40
+ Parameters:
41
+
42
+ | Name | Type | Required | Description |
43
+ |---|---|---|---|
44
+ | filter | object | no | Filter parameters. |
45
+ | orderby | array | no | Sort options. |
46
+ | page | integer | no | Page number. Default 1, max 10. |
47
+ | pagesize | integer | no | Page size. Default 10, max 10. |
48
+
@@ -0,0 +1,145 @@
1
+ # Agency Tools
2
+
3
+ > Agency tools for MCN agency search, rankings, profiles, creator collaborations, promoted products, and collaborating-shop analysis.
4
+
5
+ ## Tool summary
6
+
7
+ | Tool | Description |
8
+ |---|---|
9
+ | agency_creator_analysis | Use when the user wants agency creator structure, follower tiers, and individual collaborators. Returns distributions... |
10
+ | agency_product_analysis | Use for agency product-category and price-band structure. Use agency_product_list for individual products. |
11
+ | agency_product_list | Use when the user wants individual products promoted through an agency. Supports category, price, period, sorting, an... |
12
+ | agency_profile_overview | Use when the user wants an agency profile, historical performance, and recent 7/28/90-day data overview. |
13
+ | agency_rank_top | Use when the user wants leading MCN agencies in a market. Returns weekly or monthly agency rankings and period perfor... |
14
+ | agency_search | Use when the user has an agency name or market clue but no agency_id. Returns matching agencies and recent 7-day perf... |
15
+ | agency_shop_analysis | Use when the user wants agency collaborating-shop totals and individual shop performance. |
16
+
17
+ ## Tool details
18
+
19
+ ### agency_creator_analysis
20
+
21
+ Use when the user wants agency creator structure, follower tiers, and individual collaborators. Returns distributions and a paginated creator list.
22
+
23
+ Example:
24
+
25
+ ```bash
26
+ fastmoss call --tool agency_creator_analysis --args '{"filter":{}}' --output mcp
27
+ ```
28
+
29
+ Parameters:
30
+
31
+ | Name | Type | Required | Description |
32
+ |---|---|---|---|
33
+ | filter | object | yes | Filter parameters. |
34
+ | orderby | array | no | Sort options. |
35
+ | page | integer | no | Page number. Default 1, max 10. |
36
+ | pagesize | integer | no | Page size. Default 10, max 10. |
37
+
38
+ ### agency_product_analysis
39
+
40
+ Use for agency product-category and price-band structure. Use agency_product_list for individual products.
41
+
42
+ Example:
43
+
44
+ ```bash
45
+ fastmoss call --tool agency_product_analysis --args '{"filter":{}}' --output mcp
46
+ ```
47
+
48
+ Parameters:
49
+
50
+ | Name | Type | Required | Description |
51
+ |---|---|---|---|
52
+ | filter | object | yes | Filter parameters. |
53
+
54
+ ### agency_product_list
55
+
56
+ Use when the user wants individual products promoted through an agency. Supports category, price, period, sorting, and pagination.
57
+
58
+ Example:
59
+
60
+ ```bash
61
+ fastmoss call --tool agency_product_list --args '{"filter":{}}' --output mcp
62
+ ```
63
+
64
+ Parameters:
65
+
66
+ | Name | Type | Required | Description |
67
+ |---|---|---|---|
68
+ | filter | object | yes | Filter parameters. |
69
+ | orderby | array | no | Sort options. |
70
+ | page | integer | no | Page number. Default 1, max 10. |
71
+ | pagesize | integer | no | Page size. Default 10, max 10. |
72
+
73
+ ### agency_profile_overview
74
+
75
+ Use when the user wants an agency profile, historical performance, and recent 7/28/90-day data overview.
76
+
77
+ Example:
78
+
79
+ ```bash
80
+ fastmoss call --tool agency_profile_overview --args '{"filter":{}}' --output mcp
81
+ ```
82
+
83
+ Parameters:
84
+
85
+ | Name | Type | Required | Description |
86
+ |---|---|---|---|
87
+ | filter | object | yes | Filter parameters. |
88
+
89
+ ### agency_rank_top
90
+
91
+ Use when the user wants leading MCN agencies in a market. Returns weekly or monthly agency rankings and period performance.
92
+
93
+ Example:
94
+
95
+ ```bash
96
+ fastmoss call --tool agency_rank_top --args '{"filter":{}}' --output mcp
97
+ ```
98
+
99
+ Parameters:
100
+
101
+ | Name | Type | Required | Description |
102
+ |---|---|---|---|
103
+ | filter | object | yes | Filter parameters. |
104
+ | orderby | array | no | Sort options. |
105
+ | page | integer | no | Page number. Default 1, max 10. |
106
+ | pagesize | integer | no | Page size. Default 10, max 10. |
107
+
108
+ ### agency_search
109
+
110
+ Use when the user has an agency name or market clue but no agency_id. Returns matching agencies and recent 7-day performance.
111
+
112
+ Example:
113
+
114
+ ```bash
115
+ fastmoss call --tool agency_search --args '{"filter":{}}' --output mcp
116
+ ```
117
+
118
+ Parameters:
119
+
120
+ | Name | Type | Required | Description |
121
+ |---|---|---|---|
122
+ | filter | object | yes | Filter parameters. |
123
+ | orderby | array | no | Sort options. |
124
+ | page | integer | no | Page number. Default 1, max 10. |
125
+ | pagesize | integer | no | Page size. Default 10, max 10. |
126
+
127
+ ### agency_shop_analysis
128
+
129
+ Use when the user wants agency collaborating-shop totals and individual shop performance.
130
+
131
+ Example:
132
+
133
+ ```bash
134
+ fastmoss call --tool agency_shop_analysis --args '{"filter":{}}' --output mcp
135
+ ```
136
+
137
+ Parameters:
138
+
139
+ | Name | Type | Required | Description |
140
+ |---|---|---|---|
141
+ | filter | object | yes | Filter parameters. |
142
+ | orderby | array | no | Sort options. |
143
+ | page | integer | no | Page number. Default 1, max 10. |
144
+ | pagesize | integer | no | Page size. Default 10, max 10. |
145
+
@@ -0,0 +1,200 @@
1
+ # Auxiliary and Knowledge Base Tools
2
+
3
+ > Auxiliary and knowledge base tools for category keyword matching, FastMoss documentation, detail-page URL rules, live/video analysis, and tools outside the main business prefixes.
4
+
5
+ ## Tool summary
6
+
7
+ | Tool | Description |
8
+ |---|---|
9
+ | fastmoss_detail_url_examples | Use when the AI needs FastMoss detail-page links. Takes no arguments and returns product, creator, shop, video, and l... |
10
+ | live_detail_analysis | Use when the user wants one live session info, creator, key performance, and category breakdown. |
11
+ | live_products_list | Use when the user wants products sold in a live session or high GMV/units within this live session. Returns live_unit... |
12
+ | live_search | Use when the user has no room_id and provides a live title, host, or shop. Returns live, creator, and performance_sum... |
13
+ | search_category_by_words | Use when the user knows a product/category term but does not have the category_id yet. Returns matched TikTok product... |
14
+ | search_fastmoss_documents | Use when the user asks about FastMoss rules, features, terms, or operations rather than real-time business data. Retu... |
15
+ | video_data_trends | Use when the user wants one video play, like, comment, or share trends. Returns daily interaction trends. |
16
+ | video_detail_analysis | Use when the user wants one video basics, plays, engagement, interaction rate, IPM, and linked products. |
17
+ | video_script_info | Use when the user wants video subtitles or line-by-line spoken copy. Returns start/end time and text; empty subtitles... |
18
+ | video_search | Use when the user has no video_id and provides video keywords, title, or creator. Returns matching videos. |
19
+
20
+ ## Tool details
21
+
22
+ ### fastmoss_detail_url_examples
23
+
24
+ Use when the AI needs FastMoss detail-page links. Takes no arguments and returns product, creator, shop, video, and live URL templates.
25
+
26
+ Example:
27
+
28
+ ```bash
29
+ fastmoss call --tool fastmoss_detail_url_examples --args '{}' --output mcp
30
+ ```
31
+
32
+ Parameters: none documented.
33
+
34
+ ### live_detail_analysis
35
+
36
+ Use when the user wants one live session info, creator, key performance, and category breakdown.
37
+
38
+ Example:
39
+
40
+ ```bash
41
+ fastmoss call --tool live_detail_analysis --args '{"filter":{}}' --output mcp
42
+ ```
43
+
44
+ Parameters:
45
+
46
+ | Name | Type | Required | Description |
47
+ |---|---|---|---|
48
+ | filter | object | yes | Filter parameters. |
49
+ | lang | string | no | Language. Default EN_US, optional ZH_CN. |
50
+
51
+ ### live_products_list
52
+
53
+ Use when the user wants products sold in a live session or high GMV/units within this live session. Returns live_units_sold, live_gmv, commission_rate_percent, sales_timeline only when pagesize <= 10, and shop_cumulative_units_sold.
54
+
55
+ Example:
56
+
57
+ ```bash
58
+ fastmoss call --tool live_products_list --args '{"filter":{}}' --output mcp
59
+ ```
60
+
61
+ Parameters:
62
+
63
+ | Name | Type | Required | Description |
64
+ |---|---|---|---|
65
+ | filter | object | yes | Filter parameters. |
66
+ | lang | string | no | Language. Default EN_US, optional ZH_CN. |
67
+ | orderby | array | no | Sort options; only the first sort rule takes effect. Fields: units_sold, gmv. |
68
+ | page | integer | no | Page number. Default 1, max 10. |
69
+ | pagesize | integer | no | Page size. Default 10, max 10; timeline snapshots are returned only when pagesize <= 10. |
70
+
71
+ ### live_search
72
+
73
+ Use when the user has no room_id and provides a live title, host, or shop. Returns live, creator, and performance_summary.
74
+
75
+ Example:
76
+
77
+ ```bash
78
+ fastmoss call --tool live_search --args '{"filter":{},"keywords":"value","lang":"value"}' --output mcp
79
+ ```
80
+
81
+ Parameters:
82
+
83
+ | Name | Type | Required | Description |
84
+ |---|---|---|---|
85
+ | filter | object | no | Filter parameters. |
86
+ | keywords | string | no | Search keywords: product, shop, creator, video, live, or category terms. |
87
+ | lang | string | no | Language. Default EN_US, optional ZH_CN. |
88
+ | orderby | array | no | Sort options. |
89
+ | page | integer | no | Page number. Default 1, max 10. |
90
+ | pagesize | integer | no | Page size. Default 10, max 10. |
91
+
92
+ ### search_category_by_words
93
+
94
+ Use when the user knows a product/category term but does not have the category_id yet. Returns matched TikTok product category IDs and Chinese category paths.
95
+
96
+ Example:
97
+
98
+ ```bash
99
+ fastmoss call --tool search_category_by_words --args '{"query":[]}' --output mcp
100
+ ```
101
+
102
+ Parameters:
103
+
104
+ | Name | Type | Required | Description |
105
+ |---|---|---|---|
106
+ | max_total_results | integer | no | Max deduplicated candidates. Default 15. |
107
+ | query | array \| string | yes | Product or category terms, string or array; map natural-language category clues into category_id. |
108
+ | top_k | integer | no | Candidate categories per keyword. Default 5. |
109
+
110
+ ### search_fastmoss_documents
111
+
112
+ Use when the user asks about FastMoss rules, features, terms, or operations rather than real-time business data. Returns knowledge snippets and documents.
113
+
114
+ Example:
115
+
116
+ ```bash
117
+ fastmoss call --tool search_fastmoss_documents --args '{"query":[]}' --output mcp
118
+ ```
119
+
120
+ Parameters:
121
+
122
+ | Name | Type | Required | Description |
123
+ |---|---|---|---|
124
+ | query | array \| string | yes | Feature terms, terminology, rule questions, or operation questions; string or array. |
125
+ | source_file | string | no | Optional source file; use it to narrow the search scope and reduce noise. |
126
+ | top_k | integer | no | Knowledge snippets per query. Default 5. |
127
+
128
+ ### video_data_trends
129
+
130
+ Use when the user wants one video play, like, comment, or share trends. Returns daily interaction trends.
131
+
132
+ Example:
133
+
134
+ ```bash
135
+ fastmoss call --tool video_data_trends --args '{"filter":{}}' --output mcp
136
+ ```
137
+
138
+ Parameters:
139
+
140
+ | Name | Type | Required | Description |
141
+ |---|---|---|---|
142
+ | filter | object | yes | Filter parameters. |
143
+
144
+ ### video_detail_analysis
145
+
146
+ Use when the user wants one video basics, plays, engagement, interaction rate, IPM, and linked products.
147
+
148
+ Example:
149
+
150
+ ```bash
151
+ fastmoss call --tool video_detail_analysis --args '{"filter":{}}' --output mcp
152
+ ```
153
+
154
+ Parameters:
155
+
156
+ | Name | Type | Required | Description |
157
+ |---|---|---|---|
158
+ | filter | object | yes | Filter parameters. |
159
+ | lang | string | no | Language. Default EN_US, optional ZH_CN. |
160
+ | orderby | array | no | Sort options. |
161
+ | page | integer | no | Page number. Default 1, max 10. |
162
+ | pagesize | integer | no | Page size. Default 10, max 10. |
163
+
164
+ ### video_script_info
165
+
166
+ Use when the user wants video subtitles or line-by-line spoken copy. Returns start/end time and text; empty subtitles can fall back to video_desc.
167
+
168
+ Example:
169
+
170
+ ```bash
171
+ fastmoss call --tool video_script_info --args '{"video_id":"value"}' --output mcp
172
+ ```
173
+
174
+ Parameters:
175
+
176
+ | Name | Type | Required | Description |
177
+ |---|---|---|---|
178
+ | video_id | string | yes | Video ID; use video_search first if only a title/creator is known. |
179
+
180
+ ### video_search
181
+
182
+ Use when the user has no video_id and provides video keywords, title, or creator. Returns matching videos.
183
+
184
+ Example:
185
+
186
+ ```bash
187
+ fastmoss call --tool video_search --args '{"filter":{},"keywords":"value","lang":"value"}' --output mcp
188
+ ```
189
+
190
+ Parameters:
191
+
192
+ | Name | Type | Required | Description |
193
+ |---|---|---|---|
194
+ | filter | object | no | Filter parameters. |
195
+ | keywords | string | no | Search keywords: product, shop, creator, video, live, or category terms. |
196
+ | lang | string | no | Language. Default EN_US, optional ZH_CN. |
197
+ | orderby | array | no | Sort options. |
198
+ | page | integer | no | Page number. Default 1, max 10. |
199
+ | pagesize | integer | no | Page size. Default 10, max 10. |
200
+