MCPcopy Create free account
hub / github.com/MiniMax-AI/Mini-Agent / main

Function main

mini_agent/cli.py:844–869  ·  view source on GitHub ↗

Main entry point for CLI

()

Source from the content-addressed store, hash-verified

842
843
844def 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
872if __name__ == "__main__":

Callers 1

cli.pyFile · 0.70

Calls 5

parse_argsFunction · 0.85
read_log_fileFunction · 0.85
show_log_directoryFunction · 0.85
run_agentFunction · 0.85
runMethod · 0.80

Tested by

no test coverage detected