MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / main

Function main

uncommon_route/cli.py:1994–2038  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1992
1993
1994def main() -> None:
1995 args = sys.argv[1:]
1996
1997 if not args or args[0] in ("-h", "--help"):
1998 _print_help()
1999 sys.exit(0)
2000
2001 if args[0] in ("--version", "-v"):
2002 print(VERSION)
2003 sys.exit(0)
2004
2005 cmd = args[0]
2006 sub_args = args[1:]
2007
2008 if _wants_help(sub_args):
2009 _print_generic_subcommand_help(cmd)
2010 sys.exit(0)
2011
2012 commands = {
2013 "init": _cmd_init,
2014 "route": _cmd_route,
2015 "serve": _cmd_serve,
2016 "setup": _cmd_setup,
2017 "stop": _cmd_stop,
2018 "doctor": _cmd_doctor,
2019 "logs": _cmd_logs,
2020 "support": _cmd_support,
2021 "debug": _cmd_debug,
2022 "openclaw": _cmd_openclaw,
2023 "spend": _cmd_spend,
2024 "provider": _cmd_provider,
2025 "config": _cmd_config,
2026 "stats": _cmd_stats,
2027 "feedback": _cmd_feedback,
2028 "explain": _cmd_explain,
2029 "telemetry": _cmd_telemetry,
2030 "traces": _cmd_traces,
2031 "scene": _cmd_scene,
2032 }
2033
2034 handler = commands.get(cmd)
2035 if handler:
2036 handler(sub_args)
2037 else:
2038 _cmd_route(args)
2039
2040
2041if __name__ == "__main__":

Callers 1

cli.pyFile · 0.70

Calls 6

_print_helpFunction · 0.85
_wants_helpFunction · 0.85
_cmd_routeFunction · 0.85
handlerFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected