Main entry point for CLI
()
| 842 | |
| 843 | |
| 844 | def main(): |
| 845 | """Main entry point for CLI""" |
| 846 | # Parse command line arguments |
| 847 | args = parse_args() |
| 848 | |
| 849 | # Handle log subcommand |
| 850 | if args.command == "log": |
| 851 | if args.filename: |
| 852 | read_log_file(args.filename) |
| 853 | else: |
| 854 | show_log_directory(open_file_manager=True) |
| 855 | return |
| 856 | |
| 857 | # Determine workspace directory |
| 858 | # Expand ~ to user home directory for portability |
| 859 | if args.workspace: |
| 860 | workspace_dir = Path(args.workspace).expanduser().absolute() |
| 861 | else: |
| 862 | # Use current working directory |
| 863 | workspace_dir = Path.cwd() |
| 864 | |
| 865 | # Ensure workspace directory exists |
| 866 | workspace_dir.mkdir(parents=True, exist_ok=True) |
| 867 | |
| 868 | # Run the agent (config always loaded from package directory) |
| 869 | asyncio.run(run_agent(workspace_dir, task=args.task)) |
| 870 | |
| 871 | |
| 872 | if __name__ == "__main__": |
no test coverage detected