Hjemmeside for Proton

Using Proton Drive CLI

Lesetid
1 min
Kategori
Using Proton Drive

The Proton Drive CLI is a command-line tool built on the Proton Drive SDK. It gives users, developers, and businesses a fast and flexible way to interact with and automate Proton Drive without needing to write code or use a desktop application. You can use it to automate backups, integrate Proton Drive into your workflows, or manage files and sharing from a script.

How to access the Proton Drive CLI

  1. Download Proton Drive CLI for your device. It runs on macOS, Windows, and Linux.
  2. Open a console / command prompt in the directory where you downloaded the CLI.
  3. Run ./proton-drive auth login to authenticate via your browser.

How to use the CLI

Here are a few examples of what you can do:

  • Use ./proton-drive filesystem list /my-files to explore the root of your Drive.
  • Upload your files with ./proton-drive filesystem upload ~/Documents/* /my-files/Documents
  • Download your folder with ./proton-drive filesystem download /my-files/Documents ./
  • Invite people to your folder for collaboration with ./proton-drive sharing invite --user proton@proton.me /my-files/Documents

To list all the available commands, type ./proton-drive --help. Use the help parameter on any command to see available options and flags, such as ./proton-drive filesystem upload --help.

Tips:

  • You don’t have to type the full command names. As long as the short version is unique, any will work.
  • You can also run interactive shell. Just type ./proton-drive and then the commands directly.
  • For further processing, use the --json parameter and pipe the output to any other tool.