Introducing rclone.js

Hello everyone! Hope y'all have a great time with family and friends this season and be ready for the new year.

As we are getting back to work, I would like to take the time to introduce a side project that I have been working on, called rclone.js.

GitHub: GitHub - sntran/rclone.js

As the name indicates, it's a Javascript wrapper around rclone, specifically in Node. Besides providing a Javascript API to integrate into your existing project, it also provides a CLI. Wait, I know what you are thinking. rclone is already a CLI, why having another CLI on top of it?

For my use case, it's easier for me to maintain rclone, as I work in Node.js a lot of time.

But as of version 0.6.0, the CLI allows us to use custom command that can be written in Javascript. This allows Javascript developers like me to have desired functionality faster than trying to figuring out Go.

For example, I have a custom command, aptly named rclone-archive, which will be published soon after ironing out some quirks. This command lets us archiving a remote path into another remote path, and can be used soon, while waiting for Streaming archive/unarchive capabilities · Issue #2815 · rclone/rclone · GitHub to be implemented.

The usage would be npx rclone archive source:path dest:path.

Besides supporting new functionality, rclone.js also allows us to override existing commands to add support for more backends or flags. Imagine adding a new cloud provider with copy or move.

Anyway, I hope it can be useful to some of us, and I really appreciate any feedback.


As mentioned before, here is the rclone-archive "plugin" for rclone.js:

This is the very first release, so bugs are expected. It is also a stop gap until Streaming archive/unarchive capabilities · Issue #2815 · rclone/rclone · GitHub is implemented in rclone itself.

I think I'm missing the point, help me out here.

Why not use an alias for rclone-archive instead of writing a node.js wrapper for it? What's the use case for your project? I love rclone, but I don't understand what your thing does/is for. I'm not saying your program is bad, just unclear.

The case is to make rclone embeddable in other applications and storage related workflows.
The core team has done a lot of steps in this direction: REST API, librclone for C and python bindings, permissive MIT license, open source.
I personally baked a simple wrapper to be used with python pandas to pull statistical data off storage providers.
So why not have a wrapper for node.js or other ecosystems?

What Ivan said.

Also, to clarify, rclone.js is a wrapper to call rclone API from within Node.js projects. For example, a Discord bot that needs to handle data, or a web server... While it's not that hard to just spawn a rclone process from within Node.js environment, having a wrapper reduces the boilerplate needed.

rclone-archive is a "plugin" for rclone.js that adds archive command to rclone. You can say it is one of the use cases for rclone.js, albeit small usefulness. rclone.js let JavaScript developers extend rclone with extra functionality using the languages they already know, not just Go.