@fastmoss/cli 0.1.6 → 0.1.14
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 +131 -186
- package/README.zh-CN.md +131 -178
- package/bin/fastmoss.js +12 -7
- package/lib/runtime.js +56 -461
- package/lib/targets.js +65 -0
- package/package.json +22 -9
- package/bin/install-skill.js +0 -34
- package/bin/postinstall.js +0 -12
- package/skills/fastmoss-cli/SKILL.md +0 -70
- package/skills/fastmoss-cli/agents/openai.yaml +0 -3
- package/skills/fastmoss-cli/data/tools.json +0 -4014
- package/skills/fastmoss-cli/references/cli.md +0 -70
- package/skills/fastmoss-cli/references/tool-call.md +0 -103
- package/skills/fastmoss-cli/references/tools-advertising.md +0 -48
- package/skills/fastmoss-cli/references/tools-agency.md +0 -145
- package/skills/fastmoss-cli/references/tools-auxiliary-knowledge.md +0 -200
- package/skills/fastmoss-cli/references/tools-creator.md +0 -197
- package/skills/fastmoss-cli/references/tools-market.md +0 -69
- package/skills/fastmoss-cli/references/tools-product.md +0 -230
- package/skills/fastmoss-cli/references/tools-shop.md +0 -200
- package/skills/fastmoss-cli/references/tools.md +0 -26
package/bin/postinstall.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const packageJSON = require("../package.json");
|
|
4
|
-
const { installCLI } = require("../lib/runtime");
|
|
5
|
-
|
|
6
|
-
installCLI({
|
|
7
|
-
version: packageJSON.version,
|
|
8
|
-
configuredDownloadBaseURL: packageJSON.fastmoss?.downloadBaseURL,
|
|
9
|
-
}).catch((error) => {
|
|
10
|
-
process.stderr.write(`fastmoss postinstall warning: ${error.message}\n`);
|
|
11
|
-
process.stderr.write("The binary will be downloaded on first run.\n");
|
|
12
|
-
});
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: fastmoss
|
|
3
|
-
description: Use when working with FastMoss CLI, FastMoss MCP tools, TikTok Shop product, creator, shop, MCN agency, video, ad, category, or market data, or when the user asks an agent to call FastMoss tools from the command line.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# FastMoss CLI
|
|
7
|
-
|
|
8
|
-
Use the `fastmoss` command to discover and call FastMoss tools.
|
|
9
|
-
|
|
10
|
-
## Startup checks
|
|
11
|
-
|
|
12
|
-
1. Check the CLI is available:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
fastmoss --version
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
If the FastMoss CLI is not installed or the command is not found, install it first:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npm install -g --allow-scripts=@fastmoss/cli @fastmoss/cli
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
To update an existing FastMoss CLI installation to the latest package version, run:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npm install -g @fastmoss/cli@latest
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Then continue to the login check.
|
|
31
|
-
|
|
32
|
-
2. Check login status:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
fastmoss whoami
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
3. If not logged in, ask the user to provide or configure an API key:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
fastmoss login --api-key <your-api-key>
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Tool workflow
|
|
45
|
-
|
|
46
|
-
1. Read `references/tool-call.md` before invoking a tool.
|
|
47
|
-
2. Read `references/tools.md` to choose the tool and understand its parameters.
|
|
48
|
-
3. Every `fastmoss call` MUST include agent client metadata. Prefer environment variables when making one or more calls in the same shell session:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
FASTMOSS_CLIENT_NAME="<client-name>" FASTMOSS_CLIENT_VERSION="<client-version>" fastmoss call --tool <tool_name> --args '<json>' --output mcp
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Or pass explicit flags for a single call:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
fastmoss call --client-name "<client-name>" --client-version "<client-version>" --tool <tool_name> --args '<json>' --output mcp
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
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.
|
|
61
|
-
|
|
62
|
-
Prefer `--output mcp` when an LLM or agent will read and reason over the tool response. Use `--output data` when the user needs a concise end-user payload. Use `--output rpc` only when debugging raw RPC responses.
|
|
63
|
-
|
|
64
|
-
If the analysis result needs FastMoss detail-page links, call `fastmoss_detail_url_examples` first to get the link assembly rules, then build links from the returned examples and IDs in the analysis result.
|
|
65
|
-
|
|
66
|
-
## References
|
|
67
|
-
|
|
68
|
-
- `references/cli.md`: CLI command reference.
|
|
69
|
-
- `references/tool-call.md`: safe calling patterns, quoting, output modes, and error handling.
|
|
70
|
-
- `references/tools.md`: static FastMoss tool catalog index. Read the matching category file from this index instead of loading all tools at once.
|