Upload or download files to Google Drive from a server or terminal script without a GUI.
Sync a local folder to Google Drive (one-way, like rsync) from an automated backup script.
Use service account credentials to authenticate on a headless server where no browser is available.
List and manage file revisions in Google Drive from the command line.
Download the pre-built binary directly, no dependencies. First run requires browser-based Google account authorization, but subsequent commands are non-interactive.
Gdrive is a command-line tool that lets you interact with Google Drive from a terminal window, without opening a browser. You can upload files, download them, list what is on your drive, delete files, create folders, share items, and manage older versions of files. The project is no longer maintained, and the README points to Gdrive 3 at a separate repository as the current replacement. The tool comes as a pre-built binary, so you do not need to install any other software to use it. On a Mac you can get it through Homebrew. On other systems you download the binary directly from the releases page on GitHub. The first time you run it, it prints a URL you visit in your browser to authorize it against your Google account. After that it stores an access token in a folder in your home directory, and future commands work without prompting you again. For everyday use, the main commands cover listing your files, uploading or downloading individual files or entire folders, and checking how much storage quota you have used. The delete and share commands let you remove items or change who can see them. There is also a revision system, so you can list the past versions of a file, download a specific old version, or delete versions you no longer need. One notable feature is syncing. It works in one direction at a time, similar to rsync rather than a two-way sync tool. You can push a local folder up to Drive or pull a Drive folder down to a local path. Files you sync get a marker so Drive knows they belong to that sync relationship. You can also create a file called .gdriveignore in the root of the folder you are syncing, which works like a .gitignore file and tells the tool which files to skip. For automated server use where no human can log in and approve access, the tool supports service accounts: you provide a credentials file from the Google API console and the tool authenticates without any interactive step. The full README is longer than what was shown.
← prasmussen on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.