Tags: sntran/rclone.js
Tags
feat: custom command A custom command can be called, and `rclone.js` CLI will look for the module that provides the functionality. For example, when calling the custom command `echo` below: ```sh $ npx rclone echo arg1 --string value arg2 --boolean ``` `rclone.js` CLI will look for the followings: - A `echo.js` in the current working directory. - A `echo/index.js` in the current working directory. - A `echo` module inside `node_modules`. - A `rclone-echo` module inside `node_modules`. The custom module just needs to export a function that takes arguments and flags parsed from the CLI. It can either return a child process, or a `Promise`. For a child process, its `stdout` and `stderr` are piped to the caller process.