@model-go/cli 0.1.2 → 0.1.3
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 +15 -4
- package/checksums.txt +6 -6
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The official CLI for modelgo. Pairs with AI agent skills (Claude Code, Codex, Gemini CLI, etc.) so AI agents can operate modelgo on your behalf.
|
|
4
4
|
|
|
5
|
-
> **v0 framework stage.**
|
|
5
|
+
> **v0 framework stage.** Device-flow `auth` commands are available. `modelgo pay request` supports anonymous x402 pay-per-call calls to model gateway APIs; API key management is not wired up yet.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -17,9 +17,9 @@ This runs an interactive wizard that:
|
|
|
17
17
|
|
|
18
18
|
After install, restart your AI agent (open a new chat / session) and try:
|
|
19
19
|
|
|
20
|
-
> "
|
|
20
|
+
> "Check my modelgo login status."
|
|
21
21
|
|
|
22
|
-
Your AI should find the `modelgo-
|
|
22
|
+
Your AI should find the `modelgo-shared` skill and run `modelgo auth status`.
|
|
23
23
|
|
|
24
24
|
## Direct commands
|
|
25
25
|
|
|
@@ -28,7 +28,8 @@ modelgo --version
|
|
|
28
28
|
modelgo auth login
|
|
29
29
|
modelgo auth status
|
|
30
30
|
modelgo auth logout
|
|
31
|
-
modelgo
|
|
31
|
+
modelgo pay methods
|
|
32
|
+
modelgo pay request --env cn --path /v1/chat/completions --method POST --data '{"model":"gpt-4o","messages":[]}' --json
|
|
32
33
|
modelgo --help
|
|
33
34
|
```
|
|
34
35
|
|
|
@@ -87,6 +88,16 @@ seeing the URL before the agent starts waiting.
|
|
|
87
88
|
> `JSON.parse` the whole stream. With `--no-wait`, only the device-code object
|
|
88
89
|
> is printed.
|
|
89
90
|
|
|
91
|
+
### x402 pay-per-call model APIs
|
|
92
|
+
|
|
93
|
+
Use `modelgo pay request` when the user wants to call a model API without logging in to ModelGo first. The CLI opts into the gateway x402 path with `X-Payment-Protocol: x402`.
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
modelgo pay request --env cn --path /v1/chat/completions --method POST --data '{"model":"gpt-4o","messages":[{"role":"user","content":"hello"}]}' --intent "调用 gpt-4o 完成聊天补全" --json
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
In the `cn` environment, if the gateway returns a 402 that advertises `alipay:*`, the CLI writes the `PAYMENT-REQUIRED` payload to a local file and returns a structured handoff for `alipay-payment-skill`. In `intl`, the CLI does not route to Alipay; it returns the advertised x402 options for a future non-Alipay rail.
|
|
100
|
+
|
|
90
101
|
## Upgrade
|
|
91
102
|
|
|
92
103
|
Re-run the installer; it detects an out-of-date install and upgrades in place:
|
package/checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
d2301f86bdccb4225e959062382d20108eaac2ce023456f306485b8addcacacc modelgo-0.1.2-rc.1-SNAPSHOT-7701312-darwin-amd64.tar.gz
|
|
2
|
+
88480f50f971139c72866d73a69a67368a08a260c96b71e04add4eb7d6676ecf modelgo-0.1.2-rc.1-SNAPSHOT-7701312-darwin-arm64.tar.gz
|
|
3
|
+
9bc1719a182e3b996a793491775fd501da419a6c526d2b8a7cb2e72479cd9e1c modelgo-0.1.2-rc.1-SNAPSHOT-7701312-linux-amd64.tar.gz
|
|
4
|
+
534554cb7b7fff278260b4e030fcbe30a0029c146d46980493a1d902e65c7669 modelgo-0.1.2-rc.1-SNAPSHOT-7701312-linux-arm64.tar.gz
|
|
5
|
+
13cfa7761480b595fab0e1c3400c299013d29eaca3643282f2817b872b7d89d1 modelgo-0.1.2-rc.1-SNAPSHOT-7701312-windows-amd64.zip
|
|
6
|
+
3d57522bf6cfaeaded3ea3b6db4cf4afd8ddd4f0fbf0bcea71241531898a939c modelgo-0.1.2-rc.1-SNAPSHOT-7701312-windows-arm64.zip
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@model-go/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "The official CLI for modelgo. Pairs with AI agent skills so AI agents can operate modelgo on your behalf.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"modelgo": "scripts/run.js"
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"postinstall": "node scripts/install.js",
|
|
10
10
|
"test": "node --test scripts/__tests__/*.test.mjs",
|
|
11
|
-
"lint:skills": "node scripts/lint-skills.mjs"
|
|
11
|
+
"lint:skills": "node scripts/lint-skills.mjs",
|
|
12
|
+
"sync:skills": "node scripts/sync-skill-version.mjs",
|
|
13
|
+
"generate:reference": "node scripts/generate-reference.mjs",
|
|
14
|
+
"sync:skill-assets": "node scripts/generate-reference.mjs && node scripts/sync-skill-version.mjs"
|
|
12
15
|
},
|
|
13
16
|
"files": [
|
|
14
17
|
"scripts/install.js",
|