The drive2
command-line interface (CLI) allows to use most features of the Google drive service from the comfort of your terminal.
By default all output is printed to standard out, but flags can be set to direct it into a file independent of your shell's
capabilities. Errors will be printed to standard error, and cause the program's exit code to be non-zero.
If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools.
Everything else about the drive API can be found at the
official documentation site.
Installation and Source Code
Install the command-line interface with cargo using:
bash
cargo install google-drive2-cli
Find the source code on github.
Usage
This documentation was generated from the drive API at revision 20190620. The CLI is at version 1.0.12.
```bash
drive2 [options]
about
get [-p ]... [-o ]
apps
get [-p ]... [-o ]
list [-p ]... [-o ]
changes
get [-p ]... [-o ]
get-start-page-token [-p ]... [-o ]
list [-p ]... [-o ]
watch (-r )... [-p ]... [-o ]
channels
stop (-r )... [-p ]...
children
delete [-p ]...
get [-p ]... [-o ]
insert (-r )... [-p ]... [-o ]
list [-p ]... [-o ]
comments
delete [-p ]...
get [-p ]... [-o ]
insert (-r )... [-p ]... [-o ]
list [-p ]... [-o ]
patch (-r )... [-p ]... [-o ]
update (-r )... [-p ]... [-o ]
drives
delete [-p ]...
get [-p ]... [-o ]
hide [-p ]... [-o ]
insert (-r )... [-p ]... [-o ]
list [-p ]... [-o ]
unhide [-p ]... [-o ]
update (-r )... [-p ]... [-o ]
files
copy (-r )... [-p ]... [-o ]
delete [-p ]...
empty-trash [-p ]...
export [-p ]... [-o ]
generate-ids [-p ]... [-o ]
get [-p ]... [-o ]
insert (-r )... (-u (simple|resumable) -f [-m ]) [-p ]... [-o ]
list [-p ]... [-o ]
patch (-r )... [-p ]... [-o ]
touch [-p ]... [-o ]
trash [-p ]... [-o ]
untrash [-p ]... [-o ]
update (-r )... (-u (simple|resumable) -f [-m ]) [-p ]... [-o ]
watch (-r )... [-p ]... [-o ]
parents
delete [-p ]...
get [-p ]... [-o ]
insert (-r )... [-p ]... [-o ]
list [-p ]... [-o ]
permissions
delete [-p ]...
get [-p ]... [-o ]
get-id-for-email [-p ]... [-o ]
insert (-r )... [-p ]... [-o ]
list [-p ]... [-o ]
patch (-r )... [-p ]... [-o ]
update (-r )... [-p ]... [-o ]
properties
delete [-p ]...
get [-p ]... [-o ]
insert (-r )... [-p ]... [-o ]
list [-p ]... [-o ]
patch (-r )... [-p ]... [-o ]
update (-r )... [-p ]... [-o ]
realtime
get [-p ]... [-o ]
update (-u (simple|resumable) -f [-m ]) [-p ]...
replies
delete [-p ]...
get [-p ]... [-o ]
insert (-r )... [-p ]... [-o ]
list [-p ]... [-o ]
patch (-r )... [-p ]... [-o ]
update (-r )... [-p ]... [-o ]
revisions
delete [-p ]...
get [-p ]... [-o ]
list [-p ]... [-o ]
patch (-r )... [-p ]... [-o ]
update (-r )... [-p ]... [-o ]
teamdrives
delete [-p ]...
get [-p ]... [-o ]
insert (-r )... [-p