MCPcopy
hub / github.com/zai-org/Open-AutoGLM / parse_args

Function parse_args

ios.py:250–368  ·  view source on GitHub ↗

Parse command line arguments.

()

Source from the content-addressed store, hash-verified

248
249
250def parse_args() -> argparse.Namespace:
251 """Parse command line arguments."""
252 parser = argparse.ArgumentParser(
253 description="Phone Agent iOS - AI-powered iOS phone automation",
254 formatter_class=argparse.RawDescriptionHelpFormatter,
255 epilog="""
256Examples:
257 # Run with default settings
258 python ios.py
259
260 # Specify model endpoint
261 python ios.py --base-url http://localhost:8000/v1
262
263 # Run with specific device
264 python ios.py --device-id <UDID>
265
266 # Use WiFi connection
267 python ios.py --wda-url http://192.168.1.100:8100
268
269 # List connected devices
270 python ios.py --list-devices
271
272 # Check device pairing status
273 python ios.py --pair
274
275 # List supported apps
276 python ios.py --list-apps
277
278 # Run a specific task
279 python ios.py "Open Safari and search for iPhone tips"
280 """,
281 )
282
283 # Model options
284 parser.add_argument(
285 "--base-url",
286 type=str,
287 default=os.getenv("PHONE_AGENT_BASE_URL", "http://localhost:8000/v1"),
288 help="Model API base URL",
289 )
290
291 parser.add_argument(
292 "--api-key",
293 type=str,
294 default="EMPTY",
295 help="Model API KEY",
296 )
297
298 parser.add_argument(
299 "--model",
300 type=str,
301 default=os.getenv("PHONE_AGENT_MODEL", "autoglm-phone-9b"),
302 help="Model name",
303 )
304
305 parser.add_argument(
306 "--max-steps",
307 type=int,

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected