MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / parse_args

Function parse_args

start_webui.py:57–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56
57def parse_args() -> argparse.Namespace:
58 parser = argparse.ArgumentParser(description="启动本地 PostgreSQL + Web UI")
59 parser.add_argument("--host", default="0.0.0.0", help="监听地址,默认 0.0.0.0")
60 parser.add_argument("--port", type=int, default=8000, help="监听端口,默认 8000")
61 parser.add_argument("--skip-docker", action="store_true", help="跳过 docker compose up / 健康检查")
62 parser.add_argument("--no-browser", action="store_true", help="启动后不自动打开浏览器")
63 parser.add_argument("--dry-run", action="store_true", help="只打印计划,不真正启动服务")
64 parser.add_argument("--db-timeout", type=int, default=120, help="等待 PostgreSQL 就绪的超时秒数")
65 parser.add_argument("--web-timeout", type=int, default=45, help="等待 Web UI 可访问并打开浏览器的超时秒数")
66 parser.add_argument("--service", default="postgres", help="docker compose 中的数据库服务名,默认 postgres")
67 return parser.parse_args()
68
69
70def read_env_file(env_path: Path) -> dict[str, str]:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected