{"id":31738129,"url":"https://github.com/universal-development/zero-clone","last_synced_at":"2025-10-09T09:52:43.122Z","repository":{"id":312363047,"uuid":"1047256867","full_name":"universal-development/zero-clone","owner":"universal-development","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-30T03:42:48.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-30T05:29:08.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/universal-development.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-30T03:06:14.000Z","updated_at":"2025-08-30T03:36:22.000Z","dependencies_parsed_at":"2025-08-30T05:29:17.239Z","dependency_job_id":"59d51c5b-4a4d-4638-a122-76e8acb60856","html_url":"https://github.com/universal-development/zero-clone","commit_stats":null,"previous_names":["universal-development/zero-clone"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/universal-development/zero-clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-development%2Fzero-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-development%2Fzero-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-development%2Fzero-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-development%2Fzero-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/universal-development","download_url":"https://codeload.github.com/universal-development/zero-clone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-development%2Fzero-clone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001068,"owners_count":26083022,"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-10-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2025-10-09T09:52:40.804Z","updated_at":"2025-10-09T09:52:43.116Z","avatar_url":"https://github.com/universal-development.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zero-clone\n\nPortable Bash CLI to automatically sync from remote servers to local directories using rclone, with a simple convention-based layout per project.\n\nDirectory convention (per base directory)\n- clone: synchronized files go here\n- .zero-clone/rclone.conf: rclone configuration used for that base\n- .zero-clone/list.txt: sources to sync, one per line\n- .zero-clone/env.sh: optional environment overrides (e.g., JOBS, RCLONE_OPTS)\n- .zero-clone/logs/: per-job rclone logs\n\nQuick start\n- Install rclone and ensure it’s in PATH.\n- Create a base directory and add the structure above.\n- Put sync sources in `.zero-clone/list.txt` (format below).\n- Run: `bash bin/zero-clone` (or add `bin/` to PATH and run `zero-clone`).\n\nCLI usage\n- `zero-clone [options] [PATH ...]`\n- Options:\n  - `-y, --yes`: skip confirmation prompt\n  - `-j, --jobs N`: default parallel jobs when env.sh doesn’t set JOBS\n  - `--from-file FILE`: file listing base directories to process (falls back to `zero-clone.txt` if present)\n  - `--dry-run`: pass `--dry-run` to rclone\n  - `--no-progress`: hide rclone progress\n  - `--version`, `-h/--help`\n- PATH arguments: search roots that are scanned recursively for `.zero-clone` directories. Defaults to current directory when not using `--from-file`.\n\nDiscovery of bases (.zero-clone)\n- If `--from-file` provided: read base directories from it (one per line, `#` comments allowed).\n- Else if `zero-clone.txt` exists in current working directory: read from it.\n- Else: recursively find `.zero-clone` directories under provided PATH(s) (or `.`) and use their parents as bases.\n\nlist.txt format\n- One job per non-empty, non-comment line: `SRC [DEST]`\n  - `SRC`: rclone source (e.g., `remote:path/to/data` or a URL supported by rclone)\n  - `DEST` (optional): relative path under `clone/`. If omitted, it is derived from `basename(SRC path)`.\n- Examples:\n  - `myremote:projects/repo         repos/repo` → syncs to `clone/repos/repo`\n  - `myremote:datasets/cats` → syncs to `clone/cats`\n\nenv.sh (optional)\n- Sourced before running jobs for the base; you may export:\n  - `JOBS`: number of parallel rclone sync processes (default 2, or `--jobs` CLI)\n  - `RCLONE_OPTS`: extra flags passed to rclone (e.g., `\"--checksum --transfers 8\"`)\n\nLogs\n- Per-job logs are written to `\u003cbase\u003e/.zero-clone/logs/\u003ctimestamp\u003e_\u003cdest\u003e_\u003csrc\u003e.log`.\n- On failures, the script exits non-zero and points to the relevant log files.\n\nExamples\n- `examples/sample-project/`: minimal layout with placeholder files.\n- `examples/local-to-local/`: end-to-end local-to-local sync with a runnable `run.sh`.\n\n**Testing**\n- Run all tests: `bash test/run.sh`\n- Requires `rclone` installed from your OS package manager and available in PATH.\n- Tests use local filesystem paths (no network) by copying `examples/sample-project` to a temp dir, generating local sources, and verifying:\n  - discovery, confirmation bypass, logging, and per-base concurrency wiring\n  - creation of per-job logs in `\u003cbase\u003e/.zero-clone/logs/`\n  - local file sync results under `\u003cbase\u003e/clone/`\n\nNotes\n- rclone is executed with `--config \u003cbase\u003e/.zero-clone/rclone.conf` so each base can have isolated configs, remotes, and keys.\n- The script groups jobs per base and applies the per-base `JOBS` limit concurrently.\n\n**License**\n- MIT License. See `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversal-development%2Fzero-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funiversal-development%2Fzero-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversal-development%2Fzero-clone/lists"}