mouter-cli 0.1.0__tar.gz → 0.2.0__tar.gz
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.
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/PKG-INFO +19 -13
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/README.md +18 -12
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/pyproject.toml +1 -1
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/pyproject.toml.orig +1 -1
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/src/mouter_cli/__init__.py +1 -1
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/src/mouter_cli/cli.py +10 -10
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/src/mouter_cli/client.py +0 -0
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/src/mouter_cli/config.py +0 -0
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/src/mouter_cli/errors.py +0 -0
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/src/mouter_cli/oauth.py +0 -0
- {mouter_cli-0.1.0 → mouter_cli-0.2.0}/src/mouter_cli/storage.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: mouter-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Discover and call Mouter tools from a terminal or AI client
|
|
5
5
|
Requires-Dist: httpx>=0.28,<1
|
|
6
6
|
Requires-Dist: simplejson>=3.19,<4
|
|
@@ -14,8 +14,6 @@ with HTTPX and local credential files; no backend runtime, local AI model, datab
|
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
17
|
-
After publication:
|
|
18
|
-
|
|
19
17
|
```sh
|
|
20
18
|
uv tool install mouter-cli
|
|
21
19
|
mouter --version
|
|
@@ -23,14 +21,14 @@ uv tool upgrade mouter-cli
|
|
|
23
21
|
# Run without a permanent tool installation:
|
|
24
22
|
uvx --from mouter-cli mouter --help
|
|
25
23
|
# Pin a version for reproducible automation:
|
|
26
|
-
uvx --from mouter-cli==0.
|
|
24
|
+
uvx --from mouter-cli==0.2.0 mouter --version
|
|
27
25
|
```
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
To build and install from source:
|
|
30
28
|
|
|
31
29
|
```sh
|
|
32
30
|
uv build --project packages/mouter-cli --out-dir /tmp/mouter-cli-dist
|
|
33
|
-
uv tool install /tmp/mouter-cli-dist/mouter_cli-0.
|
|
31
|
+
uv tool install /tmp/mouter-cli-dist/mouter_cli-0.2.0-py3-none-any.whl
|
|
34
32
|
```
|
|
35
33
|
|
|
36
34
|
The default API origin is `https://mouter.ai`. Override it with `MOUTER_BASE_URL` or
|
|
@@ -38,6 +36,12 @@ The default API origin is `https://mouter.ai`. Override it with `MOUTER_BASE_URL
|
|
|
38
36
|
Saved credentials are isolated by normalized origin. Redirects are never followed.
|
|
39
37
|
The HTTP client does not inherit proxy configuration or transport debug logging.
|
|
40
38
|
|
|
39
|
+
## Upgrade from 0.1.0
|
|
40
|
+
|
|
41
|
+
Version 0.2.0 renames the `catalog` command group to `tools`. Update scripts and AI
|
|
42
|
+
instructions to use `mouter tools categories|list|search|get|price`; `catalog` is no longer
|
|
43
|
+
accepted. Authentication, tool keys and HTTP endpoints are unchanged.
|
|
44
|
+
|
|
41
45
|
## Authenticate
|
|
42
46
|
|
|
43
47
|
The default login opens your browser to sign in and authorize Mouter CLI:
|
|
@@ -124,12 +128,14 @@ these read endpoints.
|
|
|
124
128
|
|
|
125
129
|
## Discover, inspect and call
|
|
126
130
|
|
|
131
|
+
Tool discovery now uses `mouter tools` in place of `mouter catalog`.
|
|
132
|
+
|
|
127
133
|
```sh
|
|
128
|
-
mouter
|
|
129
|
-
mouter
|
|
130
|
-
mouter
|
|
131
|
-
mouter
|
|
132
|
-
mouter
|
|
134
|
+
mouter tools categories
|
|
135
|
+
mouter tools search '播放量' --limit 10
|
|
136
|
+
mouter tools list --category social --limit 10
|
|
137
|
+
mouter tools get media_stats
|
|
138
|
+
mouter tools price media_stats
|
|
133
139
|
mouter call media_stats --input @input.json
|
|
134
140
|
mouter call media_stats --input @input.json --wait --wait-timeout 300
|
|
135
141
|
mouter tasks get TASK_ID
|
|
@@ -142,10 +148,10 @@ case-insensitive substring in the tool key, name or description. A phrase is not
|
|
|
142
148
|
query, and tool-key ordering is not a relevance ranking. Defaults: 10 results, active tools.
|
|
143
149
|
Use `--status all` or `--status disabled` explicitly. Follow `page.next_cursor` with
|
|
144
150
|
`--cursor`; the cursor is bound to the query, category and status. No automatic full scan.
|
|
145
|
-
Category counts include both active and disabled tools. Only `
|
|
151
|
+
Category counts include both active and disabled tools. Only `tools get` loads schemas.
|
|
146
152
|
Visibility is not permission to execute; server checks are authoritative.
|
|
147
153
|
|
|
148
|
-
Use `
|
|
154
|
+
Use `tools get TOOL_KEY` directly when the public key is known. Search does not give
|
|
149
155
|
exact key matches a ranking bonus. A platform name such as `TikTok` can span many pages;
|
|
150
156
|
prefer a distinctive capability substring. For example, `视频生成` and `生成视频` are different
|
|
151
157
|
literal queries: rewrite the keyword or browse `--category video` after an empty result.
|
|
@@ -5,8 +5,6 @@ with HTTPX and local credential files; no backend runtime, local AI model, datab
|
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
|
-
After publication:
|
|
9
|
-
|
|
10
8
|
```sh
|
|
11
9
|
uv tool install mouter-cli
|
|
12
10
|
mouter --version
|
|
@@ -14,14 +12,14 @@ uv tool upgrade mouter-cli
|
|
|
14
12
|
# Run without a permanent tool installation:
|
|
15
13
|
uvx --from mouter-cli mouter --help
|
|
16
14
|
# Pin a version for reproducible automation:
|
|
17
|
-
uvx --from mouter-cli==0.
|
|
15
|
+
uvx --from mouter-cli==0.2.0 mouter --version
|
|
18
16
|
```
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
To build and install from source:
|
|
21
19
|
|
|
22
20
|
```sh
|
|
23
21
|
uv build --project packages/mouter-cli --out-dir /tmp/mouter-cli-dist
|
|
24
|
-
uv tool install /tmp/mouter-cli-dist/mouter_cli-0.
|
|
22
|
+
uv tool install /tmp/mouter-cli-dist/mouter_cli-0.2.0-py3-none-any.whl
|
|
25
23
|
```
|
|
26
24
|
|
|
27
25
|
The default API origin is `https://mouter.ai`. Override it with `MOUTER_BASE_URL` or
|
|
@@ -29,6 +27,12 @@ The default API origin is `https://mouter.ai`. Override it with `MOUTER_BASE_URL
|
|
|
29
27
|
Saved credentials are isolated by normalized origin. Redirects are never followed.
|
|
30
28
|
The HTTP client does not inherit proxy configuration or transport debug logging.
|
|
31
29
|
|
|
30
|
+
## Upgrade from 0.1.0
|
|
31
|
+
|
|
32
|
+
Version 0.2.0 renames the `catalog` command group to `tools`. Update scripts and AI
|
|
33
|
+
instructions to use `mouter tools categories|list|search|get|price`; `catalog` is no longer
|
|
34
|
+
accepted. Authentication, tool keys and HTTP endpoints are unchanged.
|
|
35
|
+
|
|
32
36
|
## Authenticate
|
|
33
37
|
|
|
34
38
|
The default login opens your browser to sign in and authorize Mouter CLI:
|
|
@@ -115,12 +119,14 @@ these read endpoints.
|
|
|
115
119
|
|
|
116
120
|
## Discover, inspect and call
|
|
117
121
|
|
|
122
|
+
Tool discovery now uses `mouter tools` in place of `mouter catalog`.
|
|
123
|
+
|
|
118
124
|
```sh
|
|
119
|
-
mouter
|
|
120
|
-
mouter
|
|
121
|
-
mouter
|
|
122
|
-
mouter
|
|
123
|
-
mouter
|
|
125
|
+
mouter tools categories
|
|
126
|
+
mouter tools search '播放量' --limit 10
|
|
127
|
+
mouter tools list --category social --limit 10
|
|
128
|
+
mouter tools get media_stats
|
|
129
|
+
mouter tools price media_stats
|
|
124
130
|
mouter call media_stats --input @input.json
|
|
125
131
|
mouter call media_stats --input @input.json --wait --wait-timeout 300
|
|
126
132
|
mouter tasks get TASK_ID
|
|
@@ -133,10 +139,10 @@ case-insensitive substring in the tool key, name or description. A phrase is not
|
|
|
133
139
|
query, and tool-key ordering is not a relevance ranking. Defaults: 10 results, active tools.
|
|
134
140
|
Use `--status all` or `--status disabled` explicitly. Follow `page.next_cursor` with
|
|
135
141
|
`--cursor`; the cursor is bound to the query, category and status. No automatic full scan.
|
|
136
|
-
Category counts include both active and disabled tools. Only `
|
|
142
|
+
Category counts include both active and disabled tools. Only `tools get` loads schemas.
|
|
137
143
|
Visibility is not permission to execute; server checks are authoritative.
|
|
138
144
|
|
|
139
|
-
Use `
|
|
145
|
+
Use `tools get TOOL_KEY` directly when the public key is known. Search does not give
|
|
140
146
|
exact key matches a ranking bonus. A platform name such as `TikTok` can span many pages;
|
|
141
147
|
prefer a distinctive capability substring. For example, `视频生成` and `生成视频` are different
|
|
142
148
|
literal queries: rewrite the keyword or browse `--category video` after an empty result.
|
|
@@ -26,18 +26,18 @@ Never put credentials in prompts. `mouter balance` shows wallet and current cred
|
|
|
26
26
|
`mouter usage` shows only this credential's recent consumption.
|
|
27
27
|
Only query balances, prices or consumption when the user requests that information.
|
|
28
28
|
1. Understand the user's desired outcome. Extract a short keyword, not the entire request.
|
|
29
|
-
If the public tool key is already known, use `mouter
|
|
30
|
-
2. Run `mouter
|
|
29
|
+
If the public tool key is already known, use `mouter tools get TOOL_KEY` directly.
|
|
30
|
+
2. Run `mouter tools search 'keyword' --limit 10` or `mouter tools categories`.
|
|
31
31
|
Search is literal and case-insensitive; multiple words are not an OR query.
|
|
32
32
|
Results are ordered by tool key, not relevance. The page contains summaries, not schemas.
|
|
33
33
|
3. If necessary, rewrite the keyword at most twice, or list a relevant category with
|
|
34
|
-
`mouter
|
|
34
|
+
`mouter tools list --category KEY --limit 10`. Follow --cursor only when useful.
|
|
35
35
|
Never load all tool schemas. An empty result does not prove no suitable tool exists.
|
|
36
36
|
For broad results, prefer a distinctive capability substring over a platform name alone.
|
|
37
37
|
Do not concatenate unrelated keywords: literal search does not interpret intent or synonyms.
|
|
38
|
-
4. Inspect selected candidates using `mouter
|
|
38
|
+
4. Inspect selected candidates using `mouter tools get TOOL_KEY`. Match public inputs and
|
|
39
39
|
outputs; if the user's goal is ambiguous, ask the user instead of guessing a paid action.
|
|
40
|
-
5. Only query `mouter
|
|
40
|
+
5. Only query `mouter tools price TOOL_KEY` when the user requests pricing.
|
|
41
41
|
Do not automatically query prices before execution. A quote is not a billing guarantee.
|
|
42
42
|
Catalog visibility does not grant execution permission. The server enforces permissions.
|
|
43
43
|
6. Build a JSON input file and use `mouter call TOOL_KEY --input @file.json --wait`.
|
|
@@ -100,9 +100,9 @@ def parser() -> Parser:
|
|
|
100
100
|
_common(usage)
|
|
101
101
|
usage.add_argument("--limit", type=int, default=10)
|
|
102
102
|
usage.add_argument("--cursor")
|
|
103
|
-
|
|
104
|
-
_common(
|
|
105
|
-
actions =
|
|
103
|
+
tools = groups.add_parser("tools", help="Public tool discovery")
|
|
104
|
+
_common(tools)
|
|
105
|
+
actions = tools.add_subparsers(dest="action", required=True, parser_class=Parser)
|
|
106
106
|
for name in ("categories", "list", "search", "get", "price"):
|
|
107
107
|
item = actions.add_parser(name)
|
|
108
108
|
_common(item)
|
|
@@ -224,7 +224,7 @@ def execute(args: argparse.Namespace) -> dict[str, Any]:
|
|
|
224
224
|
value["meta"] = {"saved": True, "environment_key_present": "MOUTER_API_KEY" in os.environ}
|
|
225
225
|
return value
|
|
226
226
|
needs_key = args.group in {"auth", "call", "tasks", "balance", "usage"} or (
|
|
227
|
-
args.group == "
|
|
227
|
+
args.group == "tools" and args.action == "price"
|
|
228
228
|
)
|
|
229
229
|
provider: Callable[[float | None], str] | None = None
|
|
230
230
|
receipt_identity = None
|
|
@@ -271,7 +271,7 @@ def execute(args: argparse.Namespace) -> dict[str, Any]:
|
|
|
271
271
|
return client.request(
|
|
272
272
|
"GET", "/v1/credentials/usage", params=usage_params, authenticated=True
|
|
273
273
|
)
|
|
274
|
-
if args.group == "
|
|
274
|
+
if args.group == "tools":
|
|
275
275
|
if args.action == "categories":
|
|
276
276
|
return client.request("GET", "/v1/tool-categories")
|
|
277
277
|
if args.action in {"get", "price"}:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|