agent-cli-helper 0.2.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-cli-helper
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A tmux wrapper for LLMs to interact with full-screen CLI applications
5
5
  Author: DAY50
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-cli-helper
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A tmux wrapper for LLMs to interact with full-screen CLI applications
5
5
  Author: DAY50
6
6
  License: MIT License
@@ -1,13 +1,10 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
- cli-tool: A tool for LLMs and agents to interface interactive applications from the CLI.
4
-
5
- Usage:
6
- cli-tool run-command <cmd> # Run a program in a session
7
- cli-tool send-keystrokes <id> <keys> # Send keystrokes to a session
8
- cli-tool process-info <id> # Get process info for a session
9
- cli-tool kill-all-tools # Kill all sessions
10
- cli-tool --global # View all sessions globally
3
+ Examples:
4
+ agent-cli-helper run-command <cmd> # Run a program in a session
5
+ agent-cli-helper send-keystrokes <id> <keys> # Send keystrokes to a session
6
+ agent-cli-helper process-info <id> # Get process info for a session
7
+ agent-cli-helper kill-all-tools # Kill all sessions
11
8
  """
12
9
 
13
10
  import argparse
@@ -825,9 +822,10 @@ def main():
825
822
 
826
823
  args = parser.parse_args()
827
824
 
828
- # Handle --global flag (list sessions)
829
- if args.global_list:
830
- return list_sessions()
825
+ # If no command is provided, print help and exit with 1
826
+ if not args.command:
827
+ parser.print_help()
828
+ sys.exit(1)
831
829
 
832
830
  # Dispatch to appropriate command handler
833
831
  if args.command == 'run-command':
@@ -852,4 +850,4 @@ def main():
852
850
 
853
851
 
854
852
  if __name__ == '__main__':
855
- sys.exit(main())
853
+ sys.exit(main())
@@ -1,14 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
- acli-manage: Manage agent-cli-helper sessions
4
-
5
- A human-facing tool to view and manage all agent-cli-helper sessions across
6
- different namespaces (harnesses). Shows liveness of parent processes,
7
- session tree, and supports glob patterns for operations.
8
-
9
- Examples:
10
- acli-manage # Show tree of all sessions
11
- acli-manage kill "<pattern>" # Kill sessions matching pattern
3
+ Manage agent-cli-helper sessions across different namespaces.
12
4
  """
13
5
 
14
6
  import argparse
@@ -17,6 +9,7 @@ import os
17
9
  import subprocess
18
10
  import sys
19
11
  import time
12
+ from importlib.metadata import version
20
13
  from pathlib import Path
21
14
  from typing import Dict, List, Optional, Tuple
22
15
 
@@ -263,10 +256,10 @@ def kill_matching_sessions(pattern: str, verbose: bool = False) -> int:
263
256
  def main():
264
257
  """Main entry point for acli-manage."""
265
258
  parser = argparse.ArgumentParser(
266
- description='acli-manage: Manage agent-cli-helper sessions',
267
- formatter_class=argparse.RawDescriptionHelpFormatter,
268
- epilog=__doc__
259
+ description='View and manage agent-cli-helper sessions.',
260
+ formatter_class=argparse.RawDescriptionHelpFormatter
269
261
  )
262
+ parser.add_argument('--version', action='version', version=f'%(prog)s {version("agent-cli-helper")}')
270
263
 
271
264
  subparsers = parser.add_subparsers(dest='command', help='Available commands')
272
265
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agent-cli-helper"
7
- version = "0.2.3"
7
+ version = "0.2.4"
8
8
  authors = [
9
9
  { name="DAY50" },
10
10
  ]
@@ -40,6 +40,24 @@ class TestGenerateSessionId:
40
40
  assert "session" in session_id.lower()
41
41
 
42
42
 
43
+ class TestCLIArgs:
44
+ """Tests for CLI argument parsing."""
45
+
46
+ def test_no_arguments_exits_with_error(self):
47
+ """Running the CLI without arguments should print help and return exit code 1."""
48
+ from cli_tool.main import main
49
+ # We need to mock sys.argv because main() calls parser.parse_args() which reads it.
50
+ import sys
51
+ old_argv = sys.argv
52
+ sys.argv = ["agent-cli-helper"]
53
+ try:
54
+ with pytest.raises(SystemExit) as excinfo:
55
+ main()
56
+ assert excinfo.value.code == 1
57
+ finally:
58
+ sys.argv = old_argv
59
+
60
+
43
61
  class TestParseKeystrokes:
44
62
  """Tests for parse_keystrokes function."""
45
63