matimo-cli 0.1.3__tar.gz → 0.4.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.
@@ -58,7 +58,6 @@ temp/
58
58
 
59
59
  # Personal scratch notes / working docs — not part of the shipped repo
60
60
  .local-notes/
61
- typescript/examples/mcp/matimo-tools/.matimo-approvals.json
62
61
  typescript/examples/mcp/matimo-tools/fetch-weather/definition.yaml
63
62
  typescript/examples/mcp/matimo-tools/npm_downloads/definition.yaml
64
63
  typescript/examples/mcp/matimo-tools/skills/ecosystem-health/SKILL.md
@@ -68,3 +67,6 @@ typescript/packages/cli/.matimo/certs/server.crt
68
67
  typescript/packages/cli/.matimo/certs/server.key
69
68
  typescript/examples/mcp/.matimo/certs/server.crt
70
69
  typescript/examples/mcp/.matimo/certs/server.key
70
+
71
+ # HITL approval manifests are per-machine state (HMAC-signed approvals); never commit one
72
+ **/.matimo-approvals.json
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ROAIQ TECHNOLOGIES PRIVATE LIMITED
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,16 +1,17 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: matimo-cli
3
- Version: 0.1.3
3
+ Version: 0.4.0
4
4
  Summary: Matimo CLI — tool package manager & MCP server launcher
5
5
  Author: Matimo
6
6
  License: MIT
7
+ License-File: LICENSE
7
8
  Keywords: ai-governance,ai-tools,cli,matimo,mcp,mcp-server,policy-engine
8
9
  Classifier: Development Status :: 3 - Alpha
9
10
  Classifier: License :: OSI Approved :: MIT License
10
11
  Classifier: Programming Language :: Python :: 3
11
12
  Requires-Python: >=3.11
12
- Requires-Dist: matimo-core[mcp]<0.2.0,>=0.1.0a14.post1
13
- Requires-Dist: mcp>=1.28.1
13
+ Requires-Dist: matimo-core[mcp]<0.5.0,>=0.4.0
14
+ Requires-Dist: mcp>=2.0
14
15
  Requires-Dist: pyyaml>=6.0
15
16
  Description-Content-Type: text/markdown
16
17
 
@@ -19,7 +20,7 @@ Description-Content-Type: text/markdown
19
20
  > Command-line interface for [Matimo](https://matimo.dev) - tool package manager & MCP server launcher.
20
21
 
21
22
  [![PyPI](https://img.shields.io/pypi/v/matimo-cli)](https://pypi.org/project/matimo-cli/)
22
- [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://matimo.dev/docs)
23
+ [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://docs.matimo.dev)
23
24
 
24
25
  ---
25
26
 
@@ -56,7 +57,7 @@ matimo search "send message"
56
57
 
57
58
  ### `matimo mcp` - Start MCP server
58
59
 
59
- Serve all loaded tools over the [Model Context Protocol](https://matimo.dev/docs/MCP) so Claude Desktop, Cursor, or any MCP client can access them.
60
+ Serve all loaded tools over the [Model Context Protocol](https://docs.matimo.dev/MCP) so Claude Desktop, Cursor, or any MCP client can access them.
60
61
 
61
62
  ```bash
62
63
  matimo mcp # start on stdio (default)
@@ -86,11 +87,18 @@ matimo doctor # check config, installed providers, c
86
87
  Operates on the current directory (or `$MATIMO_TOOL_DIR`), not an arbitrary path argument:
87
88
 
88
89
  ```bash
89
- matimo review list # list draft tools awaiting approval
90
+ matimo review list # list approved tools and HITL-pending ones
90
91
  matimo review approve my_tool # approve a pending tool
91
92
  matimo review reject my_tool # reject/revoke a tool
92
93
  ```
93
94
 
95
+ `review` works on one directory that holds both the agent-created tools (`<dir>/<tool>/definition.yaml`) and the approval manifest (`<dir>/.matimo-approvals.json`): the current directory, or `MATIMO_TOOL_DIR`. For your app to see a CLI approval:
96
+
97
+ - set `approvalDir` (`approval_dir`) in the app to that same directory, and
98
+ - use the same `MATIMO_APPROVAL_SECRET` in the CLI and the app (`approve` refuses to run without it).
99
+
100
+ `approve` sets `status: approved` in the YAML and signs it; reload the app's tools afterwards. `list` shows the tools the manifest records as approved, and those held as pending by HITL quarantine on reload. Inside a running agent, `matimo_approve_tool` does the same job with the app's own manifest.
101
+
94
102
  ---
95
103
 
96
104
  ## Configuration
@@ -101,22 +109,22 @@ The CLI reads configuration entirely from environment variables - there is no
101
109
  ```bash
102
110
  export MATIMO_LOG_LEVEL=info # silent | error | warn | info | debug
103
111
  export MATIMO_LOG_FORMAT=json # json | simple
104
- export MATIMO_AUTO_APPROVE=true # auto-approve tool approval prompts (CI/CD)
112
+ export MATIMO_APPROVED_PATTERNS="get_*,list_*" # tools that never ask for approval
105
113
  ```
106
114
 
107
115
  ---
108
116
 
109
117
  ## Documentation
110
118
 
111
- - [CLI Guide](https://matimo.dev/docs/user-guide/)
112
- - [MCP Guide](https://matimo.dev/docs/MCP)
113
- - [Getting Started](https://matimo.dev/docs/getting-started/QUICK_START)
119
+ - [CLI Guide](https://github.com/tallclub/matimo/blob/main/python/packages/cli/README.md)
120
+ - [MCP Guide](https://docs.matimo.dev/MCP)
121
+ - [Getting Started](https://docs.matimo.dev/getting-started/QUICK_START)
114
122
 
115
123
  ---
116
124
 
117
125
  ## Links
118
126
 
119
127
  - **PyPI:** https://pypi.org/project/matimo-cli/
120
- - **Docs:** https://matimo.dev/docs
128
+ - **Docs:** https://docs.matimo.dev/
121
129
  - **GitHub:** https://github.com/tallclub/matimo
122
130
 
@@ -3,7 +3,7 @@
3
3
  > Command-line interface for [Matimo](https://matimo.dev) - tool package manager & MCP server launcher.
4
4
 
5
5
  [![PyPI](https://img.shields.io/pypi/v/matimo-cli)](https://pypi.org/project/matimo-cli/)
6
- [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://matimo.dev/docs)
6
+ [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://docs.matimo.dev)
7
7
 
8
8
  ---
9
9
 
@@ -40,7 +40,7 @@ matimo search "send message"
40
40
 
41
41
  ### `matimo mcp` - Start MCP server
42
42
 
43
- Serve all loaded tools over the [Model Context Protocol](https://matimo.dev/docs/MCP) so Claude Desktop, Cursor, or any MCP client can access them.
43
+ Serve all loaded tools over the [Model Context Protocol](https://docs.matimo.dev/MCP) so Claude Desktop, Cursor, or any MCP client can access them.
44
44
 
45
45
  ```bash
46
46
  matimo mcp # start on stdio (default)
@@ -70,11 +70,18 @@ matimo doctor # check config, installed providers, c
70
70
  Operates on the current directory (or `$MATIMO_TOOL_DIR`), not an arbitrary path argument:
71
71
 
72
72
  ```bash
73
- matimo review list # list draft tools awaiting approval
73
+ matimo review list # list approved tools and HITL-pending ones
74
74
  matimo review approve my_tool # approve a pending tool
75
75
  matimo review reject my_tool # reject/revoke a tool
76
76
  ```
77
77
 
78
+ `review` works on one directory that holds both the agent-created tools (`<dir>/<tool>/definition.yaml`) and the approval manifest (`<dir>/.matimo-approvals.json`): the current directory, or `MATIMO_TOOL_DIR`. For your app to see a CLI approval:
79
+
80
+ - set `approvalDir` (`approval_dir`) in the app to that same directory, and
81
+ - use the same `MATIMO_APPROVAL_SECRET` in the CLI and the app (`approve` refuses to run without it).
82
+
83
+ `approve` sets `status: approved` in the YAML and signs it; reload the app's tools afterwards. `list` shows the tools the manifest records as approved, and those held as pending by HITL quarantine on reload. Inside a running agent, `matimo_approve_tool` does the same job with the app's own manifest.
84
+
78
85
  ---
79
86
 
80
87
  ## Configuration
@@ -85,22 +92,22 @@ The CLI reads configuration entirely from environment variables - there is no
85
92
  ```bash
86
93
  export MATIMO_LOG_LEVEL=info # silent | error | warn | info | debug
87
94
  export MATIMO_LOG_FORMAT=json # json | simple
88
- export MATIMO_AUTO_APPROVE=true # auto-approve tool approval prompts (CI/CD)
95
+ export MATIMO_APPROVED_PATTERNS="get_*,list_*" # tools that never ask for approval
89
96
  ```
90
97
 
91
98
  ---
92
99
 
93
100
  ## Documentation
94
101
 
95
- - [CLI Guide](https://matimo.dev/docs/user-guide/)
96
- - [MCP Guide](https://matimo.dev/docs/MCP)
97
- - [Getting Started](https://matimo.dev/docs/getting-started/QUICK_START)
102
+ - [CLI Guide](https://github.com/tallclub/matimo/blob/main/python/packages/cli/README.md)
103
+ - [MCP Guide](https://docs.matimo.dev/MCP)
104
+ - [Getting Started](https://docs.matimo.dev/getting-started/QUICK_START)
98
105
 
99
106
  ---
100
107
 
101
108
  ## Links
102
109
 
103
110
  - **PyPI:** https://pypi.org/project/matimo-cli/
104
- - **Docs:** https://matimo.dev/docs
111
+ - **Docs:** https://docs.matimo.dev/
105
112
  - **GitHub:** https://github.com/tallclub/matimo
106
113
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "matimo-cli"
7
- version = "0.1.3"
7
+ version = "0.4.0"
8
8
  description = "Matimo CLI — tool package manager & MCP server launcher"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -17,9 +17,9 @@ classifiers = [
17
17
  "License :: OSI Approved :: MIT License",
18
18
  ]
19
19
  dependencies = [
20
- "matimo-core[mcp]>=0.1.0a14.post1,<0.2.0",
20
+ "matimo-core[mcp]>=0.4.0,<0.5.0",
21
21
  "pyyaml>=6.0",
22
- "mcp>=1.28.1",
22
+ "mcp>=2.0",
23
23
  ]
24
24
 
25
25
  [project.scripts]
@@ -16,6 +16,8 @@ Usage::
16
16
  from __future__ import annotations
17
17
 
18
18
  import sys
19
+ from importlib.metadata import PackageNotFoundError
20
+ from importlib.metadata import version as _pkg_version
19
21
 
20
22
  from matimo_cli.commands.doctor import doctor_command
21
23
  from matimo_cli.commands.install import install_command
@@ -24,7 +26,10 @@ from matimo_cli.commands.mcp import mcp_command
24
26
  from matimo_cli.commands.review import review_command
25
27
  from matimo_cli.commands.search import search_command
26
28
 
27
- _VERSION = "0.1.0" # also update in setup.py and pyproject.toml
29
+ try:
30
+ _VERSION = _pkg_version("matimo-cli")
31
+ except PackageNotFoundError: # running from a source tree without install metadata
32
+ _VERSION = "unknown"
28
33
 
29
34
  _HELP = f"""\
30
35
  🔨 Matimo CLI — Tool Package Manager (v{_VERSION})
@@ -57,8 +62,17 @@ Documentation: https://github.com/tallclub/matimo#readme
57
62
  """
58
63
 
59
64
 
65
+ def _ensure_utf8_output() -> None:
66
+ """Avoid UnicodeEncodeError on consoles with a legacy code page (e.g. cp1252 on Windows)."""
67
+ for stream in (sys.stdout, sys.stderr):
68
+ reconfigure = getattr(stream, "reconfigure", None)
69
+ if reconfigure is not None:
70
+ reconfigure(encoding="utf-8", errors="replace")
71
+
72
+
60
73
  def main(cli_args: list[str] | None = None) -> None:
61
74
  """Main CLI handler — parses commands and routes to handlers."""
75
+ _ensure_utf8_output()
62
76
  args = cli_args if cli_args is not None else sys.argv[1:]
63
77
  command = args[0] if args else None
64
78
  params = args[1:] if args else []
@@ -13,7 +13,7 @@ def install_command(tool_names: list[str]) -> None:
13
13
  if not tool_names:
14
14
  print("❌ Error: Please specify at least one tool to install", file=sys.stderr)
15
15
  print("\nUsage: matimo install [tool1] [tool2] …")
16
- print("Example: matimo install slack gmail stripe")
16
+ print("Example: matimo install slack gmail github")
17
17
  sys.exit(1)
18
18
 
19
19
  packages = [f"matimo-{name}" for name in tool_names]
@@ -21,6 +21,7 @@ class McpArgs:
21
21
  vault_path: str | None = None
22
22
  aws_secret_id: str | None = None
23
23
  token: str | None = None
24
+ host: str = "127.0.0.1"
24
25
  tool_paths: list[str] | None = None
25
26
  skill_paths: list[str] | None = None
26
27
  https: bool = False
@@ -50,6 +51,8 @@ def _parse_args(params: list[str]) -> McpArgs:
50
51
  print('❌ --transport must be "stdio" or "http"', file=sys.stderr)
51
52
  sys.exit(1)
52
53
  args.transport = val
54
+ case "--host":
55
+ args.host = require_value("--host")
53
56
  case "--port" | "-p":
54
57
  val = require_value("--port")
55
58
  try:
@@ -179,6 +182,7 @@ async def _mcp_command_async(params: list[str]) -> None:
179
182
  options = MCPServerOptions(
180
183
  transport=args.transport,
181
184
  port=args.port,
185
+ host=args.host,
182
186
  tools=args.tools,
183
187
  exclude_tools=args.exclude_tools,
184
188
  secret_resolver=_build_resolver_config(args),