Using Proton Drive CLI
- Čtení
- 1 minut
- Kategorie
- 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
- Download Proton Drive CLI for your device. It runs on macOS, Windows, and Linux.
- Open a console / command prompt in the directory where you downloaded the CLI.
- Run
./proton-drive auth loginto 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-filesto 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-driveand then the commands directly. - For further processing, use the
--jsonparameter and pipe the output to any other tool.