Idea #22390
Updated by Peter Amstutz 10 days ago
When @arvados-client@ is invoked as @arv@ it should mimic as much as possible the CLI of the Ruby @arv@ tool.
<pre>
$ arv
Arvados command line client
Usage: arv [--flags] subcommand|resource [method] [--parameters]
Available flags:
-n, --dry-run Don't actually do anything
-v, --verbose Print some things on stderr
-f, --format=<s> Set the output format. Must be one of json (default), yaml or uuid. (Default: json)
-s, --short Return only UUIDs (equivalent to --format=uuid)
Use 'arv subcommand|resource --help' to get more information about a particular command or resource.
Available subcommands: copy, create, edit, get, keep, tag, ws
Available resources: api_client_authorization, authorized_key, collection, computed_permission, container, container_request, group, keep_service, link, log, user,
user_agreement, virtual_machine, workflow, config, vocabulary, sy
Additional options:
-e, --version Print version and exit
-h, --help Show this message
</pre>
* The @copy@ subcommand just invokes the Python @arv-copy@ and can stay that way.
* The @create@ subcommand invokes an interactive text editor where the user edits JSON that will be sent as the body in a @create@ API operation for a given resource type. This is pretty simple and could be handy but I forgot it existed and can't remember the last time I used it.
* The @edit@ subcommand fetches the JSON of an object, invokes an interactive text editor where the user edits the returned JSON, any fields that are changed are as the body in a @update@ API operation for a given resource type.
* The @get@ subcommand takes an arbitrary UUID and list of fields to select on, determines which API endpoint to use, and prints JSON to stdout. Also simple and could be handy but I also forgot it existed.
* The @keep@ subcommand just invokes the corresponding Python tools @arv-ls@, @arv-get@, @arv-put@, or @arv-keepdocker@
* The @tag@ subcommand invokes the @arv-tag@ subcommand which is another Ruby tool. These are link-based tags, which are generally deprecated in favor of properties.
* The @ws@ subcommand invokes @arv-ws@ which provides a live stream of events from websockets.
* The various resource commands were mechanically derived from the discovery document, so it should be possible to generate a compatible CLI