MCPcopy Create free account
hub / github.com/lightningpixel/modly / cmd_export

Function cmd_export

tools/modly-cli/agent.py:959–972  ·  view source on GitHub ↗
(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

957
958
959def cmd_export(args: argparse.Namespace) -> int:
960 base_url = args.base_url.rstrip("/")
961 _require_health(base_url, args.request_timeout)
962 dest = Path(args.output).expanduser().resolve()
963 bytes_written = _export_workspace_path(base_url, args.path, args.format, dest, timeout=args.request_timeout)
964 _json_print({
965 "ok": True,
966 "base_url": base_url,
967 "workspace_path": args.path,
968 "export_format": args.format,
969 "export_path": str(dest),
970 "bytes_written": bytes_written,
971 }, compact=args.compact)
972 return 0
973
974
975def _iter_images(input_dir: Path) -> list[Path]:

Callers

nothing calls this directly

Calls 3

_require_healthFunction · 0.85
_export_workspace_pathFunction · 0.85
_json_printFunction · 0.85

Tested by

no test coverage detected