chattermate-cli 0.2.2__tar.gz → 0.2.4__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.
Files changed (24) hide show
  1. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/PKG-INFO +1 -1
  2. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/__init__.py +1 -1
  3. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/commands/auth.py +17 -4
  4. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli.egg-info/PKG-INFO +1 -1
  5. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/pyproject.toml +1 -1
  6. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/LICENSE +0 -0
  7. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/README.md +0 -0
  8. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/client.py +0 -0
  9. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/commands/__init__.py +0 -0
  10. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/commands/agent.py +0 -0
  11. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/commands/knowledge.py +0 -0
  12. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/commands/workflow.py +0 -0
  13. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/config.py +0 -0
  14. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/context.py +0 -0
  15. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/main.py +0 -0
  16. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli/mcp_server.py +0 -0
  17. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli.egg-info/SOURCES.txt +0 -0
  18. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli.egg-info/dependency_links.txt +0 -0
  19. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli.egg-info/entry_points.txt +0 -0
  20. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli.egg-info/requires.txt +0 -0
  21. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/chattermate_cli.egg-info/top_level.txt +0 -0
  22. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/setup.cfg +0 -0
  23. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/tests/test_client.py +0 -0
  24. {chattermate_cli-0.2.2 → chattermate_cli-0.2.4}/tests/test_mcp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chattermate-cli
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: ChatterMate CLI and MCP server — sign up, authenticate, and configure agents, workflows and knowledge from the terminal or an AI agent.
5
5
  Author: ChatterMate
6
6
  License: AGPL-3.0-or-later
@@ -16,4 +16,4 @@ You should have received a copy of the GNU Affero General Public License
16
16
  along with this program. If not, see <https://www.gnu.org/licenses/>
17
17
  """
18
18
 
19
- __version__ = "0.2.2"
19
+ __version__ = "0.2.4"
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>
17
17
  """
18
18
 
19
19
  import json
20
+ import sys
20
21
  from typing import Optional
21
22
 
22
23
  import typer
@@ -75,8 +76,8 @@ def signup(
75
76
  ),
76
77
  otp: Optional[str] = typer.Option(
77
78
  None, "--otp",
78
- help="One-time code emailed to the admin address. If omitted you'll be prompted "
79
- "(localhost test OTP is 123456). Ignored with --community.",
79
+ help="One-time code emailed to the admin address (on a localhost instance the test "
80
+ "code is 123456). If omitted you'll be prompted. Ignored with --community.",
80
81
  ),
81
82
  as_json: bool = typer.Option(False, "--json", help="Output raw JSON."),
82
83
  ):
@@ -92,9 +93,21 @@ def signup(
92
93
  client = get_client(require_auth=False)
93
94
 
94
95
  if not community:
95
- run(lambda: client.signup_request_otp(admin_email))
96
+ # Only request a fresh OTP when the caller hasn't already supplied one.
97
+ # Requesting again would email a NEW code and invalidate the --otp passed in.
96
98
  if not otp:
97
- otp = typer.prompt("Enter the OTP sent to your email (localhost test OTP: 123456)")
99
+ run(lambda: client.signup_request_otp(admin_email))
100
+ if not sys.stdin.isatty():
101
+ # Non-interactive (AI agent / CI): can't prompt. The code was just
102
+ # emailed — tell them how to finish without re-sending it.
103
+ print_error(
104
+ f"A one-time code was emailed to {admin_email}. "
105
+ f"Re-run this command with --otp <code> to complete signup."
106
+ )
107
+ raise typer.Exit(1)
108
+ is_local = any(h in client.api_url for h in ("localhost", "127.0.0.1", "0.0.0.0"))
109
+ hint = " (localhost test code: 123456)" if is_local else ""
110
+ otp = typer.prompt(f"Enter the one-time code emailed to {admin_email}{hint}")
98
111
  data = run(lambda: client.signup_verify_otp(
99
112
  email=admin_email, otp=otp, admin_name=admin_name,
100
113
  admin_password=admin_password, organization_name=name, domain=domain,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chattermate-cli
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: ChatterMate CLI and MCP server — sign up, authenticate, and configure agents, workflows and knowledge from the terminal or an AI agent.
5
5
  Author: ChatterMate
6
6
  License: AGPL-3.0-or-later
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "chattermate-cli"
7
- version = "0.2.2"
7
+ version = "0.2.4"
8
8
  description = "ChatterMate CLI and MCP server — sign up, authenticate, and configure agents, workflows and knowledge from the terminal or an AI agent."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes