{"id":17320970,"url":"https://github.com/tom-tan/core-wire","last_synced_at":"2026-02-09T21:10:32.976Z","repository":{"id":70118289,"uuid":"507577521","full_name":"tom-tan/core-wire","owner":"tom-tan","description":"A tool/library to make CWL engines connected to remote resources","archived":false,"fork":false,"pushed_at":"2023-05-11T08:14:20.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T03:41:39.474Z","etag":null,"topics":["common-workflow-language","commonwl","library","workflows"],"latest_commit_sha":null,"homepage":"","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tom-tan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-26T13:10:00.000Z","updated_at":"2022-09-28T07:07:20.000Z","dependencies_parsed_at":"2023-05-12T22:30:59.006Z","dependency_job_id":null,"html_url":"https://github.com/tom-tan/core-wire","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":"tom-tan/dlang-for-remote-container-template","purl":"pkg:github/tom-tan/core-wire","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-tan%2Fcore-wire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-tan%2Fcore-wire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-tan%2Fcore-wire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-tan%2Fcore-wire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tom-tan","download_url":"https://codeload.github.com/tom-tan/core-wire/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-tan%2Fcore-wire/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271752100,"owners_count":24814745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["common-workflow-language","commonwl","library","workflows"],"created_at":"2024-10-15T13:34:29.084Z","updated_at":"2026-02-09T21:10:32.911Z","avatar_url":"https://github.com/tom-tan.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# core-wire: A tool/library to make CWL engines connected to remote resources\n[![release](https://badgen.net/github/release/tom-tan/core-wire)](https://github.com/tom-tan/core-wire/releases/latest)\n[![license](https://badgen.net/github/license/tom-tan/core-wire)](https://github.com/tom-tan/core-wire/blob/main/LICENSE)\n[![CI](https://github.com/tom-tan/core-wire/actions/workflows/ci.yml/badge.svg)](https://github.com/tom-tan/core-wire/actions/workflows/ci.yml)\n\nThe [CWL specification](https://www.commonwl.org/v1.2/CommandLineTool.html#File) requires the workflow engines to support the URIs with the `file` scheme but supporting other schemes such as `https`, `ftp`, and `s3` is optional.\nTherefore, using such optional schemes in the input objects prevents portability between workflow engines.\n\nThe core-wire aims to fix this problem by providing a way to download/upload files and directories in a given input object\nand returns a new input object with downloaded/uploaded URIs.\n\n## Usage\n```console\n$ core-wire input.yaml file:///uri/to/the/destination\n```\nIt accepts YAML and JSON files for the input object.\n\nSee `core-wire -h` for details.\n\n### Example: get remote resources\n- It currently supports `file`, `http`, `https`, and `ftp` schemes by default.\n  - Limitation: The `ftp` scheme requires the `curl` command. It will be fixed in the future release.\n```console\n$ cat input.json\n{\n    \"param1\": 10,\n    \"param2\": {\n        \"class\": \"File\",\n        \"location\": \"https://remote/resource/file.txt\"\n    }\n}\n$ core-wire input.json file:///current-dir/inp\n{\n    \"param1\": 10,\n    \"param2\": {\n        \"class\": \"File\",\n        \"location\": \"file:///current-dir/inp/file.txt\",\n        \"path\": \"/current-dir/inp/file.txt\",\n        \"basename\": \"file.txt\",\n        \"dirname\": \"/current-dir/inp\",\n        \"nameroot\": \"file\",\n        \"nameext\": \".txt\"\n        \"checksum\": \"sha1$47a013e660d408619d894b20806b1d5086aab03b\",\n        \"size\": 13\n    }\n}\n$ ls inp\nfile.txt\n```\n\n### Example: put local resources\n**Note**: not yet implemented\n\n```console\n$ cat input.json\n{\n    \"param1\": 10,\n    \"param2\": {\n        \"class\": \"File\",\n        \"location\": \"file:///current-dir/inp/efa951dd-df01-4ce9-0008-39e7dbe25d6a/file.txt\",\n        \"path\": \"/current-dir/inp/efa951dd-df01-4ce9-0008-39e7dbe25d6a/file.txt\",\n        \"basename\": \"file.txt\",\n        \"dirname\": \"/current-dir/inp/efa951dd-df01-4ce9-0008-39e7dbe25d6a\",\n        \"nameroot\": \"file\",\n        \"nameext\": \".txt\"\n        \"checksum\": \"sha1$47a013e660d408619d894b20806b1d5086aab03b\",\n        \"size\": 13\n    }\n}\n$ core-wire --config=s3conf.json input.json s3://bucket/inp/\n{\n    \"param1\": 10,\n    \"param2\": {\n        \"class\": \"File\",\n        \"location\": \"s3://bucket/inp/e2949107-f856-2417-ce6c-1030af43f9ea/file.txt\"\n        \"basename\": \"file.txt\",\n        \"nameroot\": \"file\",\n        \"nameext\": \".txt\"\n        \"checksum\": \"sha1$47a013e660d408619d894b20806b1d5086aab03b\",\n        \"size\": 13\n    }\n}\n```\n\n## Extending supported schemes\nYou can extend schemes by specifying the commands to download files and directories with `--inline-dl-file-cmd` and `--inline-dl-dir-cmd`.\n\nThe accepted value is as follows:\n```\n$scheme:$command\n```\n- `$scheme` is a URI scheme such as `ssh` and `s3`. You can also override the default schemes.\n- `$command` is a command to download a file or a directory from a URI with a given scheme.\n  - Example: `curl -f \u003csrc-uri\u003e -o \u003cdst-path\u003e`\n  - The `\u003csrc-uri\u003e` and `\u003csrc-path\u003e` is replaced with a source URI or path of a file or a directory.\n  - The `\u003cdst-uri\u003e` and `\u003cdst-path\u003e` is replaced with a destination URI or path of a file or a directory.\n\nHere is a concrete example:\n```console\n$ cat input.json\n{\n    \"param1\": 10,\n    \"param2\": {\n        \"class\": \"File\",\n        \"location\": \"ssh:///remote-server:/home/user/path-to/file.txt\",\n    }\n}\n$ core-wire input.json file:///current-dir/inp --inline-dl-file-cmd=ssh:\"scp \u003csrc-uri\u003e \u003cdst-path\u003e\"\n{\n    \"param1\": 10,\n    \"param2\": {\n        \"class\": \"File\",\n        \"location\": \"file:///current-dir/inp/file.txt\",\n        \"path\": \"/current-dir/inp/file.txt\",\n        \"basename\": \"file.txt\",\n        \"dirname\": \"/current-dir/inp\",\n        \"nameroot\": \"file\",\n        \"nameext\": \".txt\"\n        \"checksum\": \"sha1$47a013e660d408619d894b20806b1d5086aab03b\",\n        \"size\": 13\n    }\n}\n```\n\nThere is a limitation of the extended schemes:\n- When `--inline-dl-file-cmd` is specified but `--inline-dl-dir-cmd` is not, `core-wire` rejects non-literal directory objects (i.e., only accept directory objects with the `listing` field).\n  - If you have to handle non-literal directory objects, specify `--inline-dl-dir-cmd` in addition to `--inline-dl-file-cmd`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-tan%2Fcore-wire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftom-tan%2Fcore-wire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-tan%2Fcore-wire/lists"}