{"id":13550926,"url":"https://github.com/verseles/flyclone","last_synced_at":"2025-04-15T01:29:22.189Z","repository":{"id":45189163,"uuid":"268690468","full_name":"verseles/flyclone","owner":"verseles","description":"PHP wrapper for rclone. Supports Local disk, Dropbox, FTP, SFTP, Google Drive, MEGA, S3 (any compatible) and others. Progress support.","archived":false,"fork":false,"pushed_at":"2024-03-10T05:50:42.000Z","size":233,"stargazers_count":64,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-16T23:43:02.058Z","etag":null,"topics":["cloudatlas","disk","dropbox","flysystem","hacktoberfest","php","php-wrapper","rclone","wrapper"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/verseles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2020-06-02T03:19:32.000Z","updated_at":"2024-01-29T11:40:51.000Z","dependencies_parsed_at":"2023-12-27T03:41:25.912Z","dependency_job_id":"7b422634-8c38-433d-bbe0-de6c86202a9d","html_url":"https://github.com/verseles/flyclone","commit_stats":{"total_commits":84,"total_committers":2,"mean_commits":42.0,"dds":"0.011904761904761862","last_synced_commit":"5e0ef1213f42f114389870f95dde6516fc819cee"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verseles%2Fflyclone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verseles%2Fflyclone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verseles%2Fflyclone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verseles%2Fflyclone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verseles","download_url":"https://codeload.github.com/verseles/flyclone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248988585,"owners_count":21194445,"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","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":["cloudatlas","disk","dropbox","flysystem","hacktoberfest","php","php-wrapper","rclone","wrapper"],"created_at":"2024-08-01T12:01:39.744Z","updated_at":"2025-04-15T01:29:22.170Z","avatar_url":"https://github.com/verseles.png","language":"PHP","readme":"# Verseles\\flyclone\nPHP wrapper for [rclone](https://rclone.org/) \n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/verseles/progressable/phpunit.yml?style=for-the-badge\u0026label=PHPUnit)\n\nsupports [local](https://rclone.org/local/) disk, [dropbox](https://rclone.org/dropbox/), [ftp](https://rclone.org/ftp/), [sftp](https://rclone.org/sftp/), [google drive](https://rclone.org/sftp/), [mega](https://rclone.org/mega/), [s3](https://rclone.org/s3/), [b2](https://rclone.org/b2/) ([any compatible](https://rclone.org/overview/)) and others can be easily added via pr.\n\nprogress support.\n\n![](https://img.shields.io/badge/php-777bb4?style=for-the-badge\u0026logo=php\u0026logoColor=white)\n![](http://img.shields.io/badge/-phpstorm-7256fe?style=for-the-badge\u0026logo=phpstorm\u0026logoColor=white)\n![](https://img.shields.io/badge/composer-885630?style=for-the-badge\u0026logo=composer\u0026logoColor=white)\n![](https://img.shields.io/badge/Docker-2CA5E0?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n![](https://img.shields.io/badge/GIT-E44C30?style=for-the-badge\u0026logo=git\u0026logoColor=white)\n\n## installation\n\n```shell script\ncomposer require verseles/flyclone\n```\n\n## usage\n\u003cdetails open\u003e\u003csummary\u003elist local files\u003c/summary\u003e\n\n```php\nuse Verseles\\Flyclone\\Rclone;\nuse Verseles\\Flyclone\\Providers\\LocalProvider;\n\n$left_side = new LocalProvider('mydisk'); // nickname\n$rclone = new Rclone($left_side);\n\nvar_dump($rclone-\u003els('/home/')); // returns array\n```\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003elist files from mega server\u003c/summary\u003e\n\n```php\nuse Verseles\\Flyclone\\Rclone;\nuse Verseles\\Flyclone\\Providers\\MegaProvider;\n\n$left_side = new MegaProvider('myserver',[\n    'user'=\u003e'johnivy@pear.com',\n    'pass'=\u003e Rclone::obscure('applesux')\n]);\n\n$rclone = new Rclone($left_side);\n\nvar_dump($rclone-\u003els('/docs')); // returns array\n```\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003ecopy from local disk to mega\u003c/summary\u003e\n\n```php\nuse Verseles\\Flyclone\\Rclone;\nuse Verseles\\Flyclone\\Providers\\LocalProvider;\nuse Verseles\\Flyclone\\Providers\\MegaProvider;\n\n$left_side = new LocalProvider('mydisk'); // name\n\n$right_side = new MegaProvider('myremote',[\n    'user'=\u003e'your@email.com',\n    'pass'=\u003e Rclone::obscure('4ppl35u*')\n]);\n\n$rclone = new Rclone($left_side, $right_side);\n\n$rclone-\u003ecopy('/home/appleinc/index.html', '/docs'); // always true, otherwise throws error\n```\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003emove from local disk to the same local disk\u003c/summary\u003e\n\n```php\nuse Verseles\\Flyclone\\Rclone;\nuse Verseles\\Flyclone\\Providers\\LocalProvider;\n\n$samedisk = new LocalProvider('mydisk'); // name\n\n$rclone = new Rclone($samedisk);\n\n$rclone-\u003ecopy('/home/appleinc/index.html', '/home/www/'); // always true, otherwise throws error\n```\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003ecopy to dropbox with progress every sec\u003c/summary\u003e\n\n```php\nuse Verseles\\Flyclone\\Rclone;\nuse Verseles\\Flyclone\\Providers\\LocalProvider;\nuse Verseles\\Flyclone\\Providers\\DropboxProvider;\n\n$left_side = new LocalProvider('mydisk'); // nickname\n$right_side = new DropboxProvider('myremote', [\n    'client_id'     =\u003e 'your_dropbox_client_id',\n    'client_secret' =\u003e 'your_dropbox_client_secret',\n    'token'         =\u003e 'your_dropbox_token',\n]);\n\n$rclone = new Rclone($left_side, $right_side);\n\n$rclone-\u003ecopy('/home/appleinc/index.html', '/home/www/', [], static function ($type, $buffer) use ($rclone) {\n   var_dump($rclone-\u003egetProgress());\n});\n```\n\u003c/details\u003e\n\n## tips - read before use.\n* of course, you need known how [rclone works](https://rclone.org/docs).\n* rclone class and providers classes always support any flag listed at [rclone documentation](https://rclone.org/flags/), often as 3rd argument. but\n* any flag, parameter or option passed like `--parameter-here`, in this lib is a array like `['parameter-here'='value', 'max-depth' =\u003e 3, 'any'=\u003e'1']`\n* if you inform only one provider (_'left side'_), in commands like `copy`/`move` we assume _'right side'_ as the same _'left side'_ provider. which means a copying/moving to the same disk.\n* we don't have a great doc for now so open a issue always you have a doubt. remember to be descriptful.\n## ~~wip~~ to-do\n- [x] ~~add progress support~~\n- [x] ~~add timeout support~~\n- [x] ~~add more commands~~\n- [x] ~~add tests~~\n  - [x] ~~use docker and docker compose for tests~~\n- [ ] send meta details like file id in some storage system like google drive\n\n## testing\n  install docker and docker compose, then run:\n```shell\ncp .env.example .env\nmake\n```\n\n\u003e there are others tests (test_all, test_gdrive, etc), but you'll need fill `.env` file properly.\n\n## contribution\n\u003e you know how to do that.\n\n## license\n[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](LICENSE.md)\n","funding_links":[],"categories":["PHP","API Libraries and SDKs"],"sub_categories":["PHP"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverseles%2Fflyclone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverseles%2Fflyclone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverseles%2Fflyclone/lists"}