Skip to content
proton-cli

proton drive

Files and folders in Drive.

Every command under proton drive, with the arguments and flags it takes. For these commands in use, see the guide.

Holds invitations, items, photos, settings, shared, sharing and trash.

Shares other people have offered you.

Holds accept, decline and list.

Accept invitations.

proton drive invitations accept REF...
Terminal window
proton drive invitations accept 5bH2mQxK

Decline invitations.

proton drive invitations decline REF...
Terminal window
proton drive invitations decline 5bH2mQxK

List invitations waiting for an answer.

proton drive invitations list
Terminal window
proton drive invitations list

Files and folders.

Holds copy, create, delete, download, get, list, move, revisions, share, trash, update and upload.

Copy files into another folder.

proton drive items copy [PATH...]
Terminal window
proton drive items copy /Documents/report.pdf --into /Archive
proton drive items copy --pattern '*.pdf' --scope /Documents --into /Backup
Flag Description
--all Act on everything in scope, rather than a subset
--into string Destination folder
--larger-than string Match files above SIZE (e.g. 100MB, 2GB)
--newer-than string Match files newer than DURATION
--older-than string Match files older than DURATION (e.g. 30d, 2w, 1h)
--pattern string Match names against a shell glob, e.g. *.tmp
--recursive Descend into subfolders when filtering
--scope string Look only inside this folder (default: the whole drive)
--smaller-than string Match files below SIZE

Create a folder, and any missing folder above it.

proton drive items create PATH
Terminal window
proton drive items create /Documents/2026

Delete files or folders permanently.

proton drive items delete [PATH...]
Terminal window
proton drive items delete /Documents/report.pdf
proton drive items delete --pattern '*.tmp' --scope /Build --recursive --yes
Flag Description
--all Act on everything in scope, rather than a subset
--larger-than string Match files above SIZE (e.g. 100MB, 2GB)
--newer-than string Match files newer than DURATION
--older-than string Match files older than DURATION (e.g. 30d, 2w, 1h)
--pattern string Match names against a shell glob, e.g. *.tmp
--recursive Descend into subfolders when filtering
--scope string Look only inside this folder (default: the whole drive)
--smaller-than string Match files below SIZE

Download a file.

proton drive items download PATH
Terminal window
proton drive items download /Documents/report.pdf --output-dir .
proton drive items download /Documents/report.pdf --output - > report.pdf
Flag Description
--force Overwrite a file that already exists
--output string Write to this path, or - for stdout
--output-dir string Write into this directory, keeping each item’s own name

Show a file or folder’s details.

proton drive items get PATH
Terminal window
proton drive items get /Documents/report.pdf

List what is in a folder.

The filters are the same ones move, copy, trash and delete take, so a selection can be worked out here and then handed to the verb that acts on it. PATH is what those commands call –scope.

proton drive items list [PATH]
Terminal window
proton drive items list
proton drive items list /Documents
Flag Description
--desc Reverse the order
--larger-than string Match files above SIZE (e.g. 100MB, 2GB)
--newer-than string Match files newer than DURATION
--older-than string Match files older than DURATION (e.g. 30d, 2w, 1h)
--page int Which page of results, counting from zero
--page-size int How many items per page (default 50)
--pattern string Match names against a shell glob, e.g. *.tmp
--recursive Descend into subfolders when filtering
--smaller-than string Match files below SIZE
--sort string Order by: name, size, modified (default name)

Move files or folders into another folder.

proton drive items move [PATH...]
Terminal window
proton drive items move /Documents/report.pdf --into /Archive
proton drive items move --pattern '*.log' --scope /Build --recursive --into /Archive
Flag Description
--all Act on everything in scope, rather than a subset
--into string Destination folder
--larger-than string Match files above SIZE (e.g. 100MB, 2GB)
--newer-than string Match files newer than DURATION
--older-than string Match files older than DURATION (e.g. 30d, 2w, 1h)
--pattern string Match names against a shell glob, e.g. *.tmp
--recursive Descend into subfolders when filtering
--scope string Look only inside this folder (default: the whole drive)
--smaller-than string Match files below SIZE

Earlier versions of a file.

Uploading over a file with --if-exists replace keeps what was there as a revision. Any of them can be read back without disturbing the file, put back in place, or dropped from the history.

Holds delete, download, list and restore.

Delete an earlier version permanently.

proton drive items revisions delete PATH REVISION_REF
Terminal window
proton drive items revisions delete /Documents/report.pdf 5bH2mQxK

Download an earlier version of a file.

The file keeps whatever it holds now: this reads an old version out, where revisions restore puts one back in place.

proton drive items revisions download PATH REVISION_REF
Terminal window
proton drive items revisions download /Documents/report.pdf 5bH2mQxK --output-dir .
Flag Description
--force Overwrite a file that already exists
--output string Write to this path, or - for stdout
--output-dir string Write into this directory, keeping each item’s own name

List a file’s earlier versions.

proton drive items revisions list PATH
Terminal window
proton drive items revisions list /Documents/report.pdf

Restore a file to an earlier version.

proton drive items revisions restore PATH REVISION_REF
Terminal window
proton drive items revisions restore /Documents/report.pdf 5bH2mQxK

Public links and the people you share with.

Holds add, get, link, remove, resend, unlink and update.

Invite someone to a file or folder.

proton drive items share add PATH EMAIL
Terminal window
proton drive items share add /Documents jane@example.com
proton drive items share add /Documents jane@example.com --edit --message 'Have a look'
Flag Description
--edit Allow editing rather than only viewing
--message string Note to include in the invitation email

Show how a file or folder is shared.

proton drive items share get PATH
Terminal window
proton drive items share get /Documents/report.pdf

Create or update the public link for a file or folder.

Running it again with different options changes the existing link rather than making a second one, so the URL you have shared keeps working.

proton drive items share link PATH
Terminal window
proton drive items share link /Documents/report.pdf
proton drive items share link /Documents/report.pdf --expires 7d --password hunter2
proton drive items share link /Documents --edit
Flag Description
--edit Allow editing rather than only viewing
--expires string Stop working after DURATION (e.g. 7d, 2w, 6mo)
--password string Require this password to open the link

Revoke someone’s access, or cancel their invitation.

proton drive items share remove PATH EMAIL
Terminal window
proton drive items share remove /Documents jane@example.com

Send an unanswered invitation again.

proton drive items share resend PATH EMAIL
Terminal window
proton drive items share resend /Reports jane@proton.me

Remove the public links for a file or folder.

proton drive items share unlink PATH
Terminal window
proton drive items share unlink /Documents/report.pdf

Change what somebody may do with a file or folder.

It applies to whoever holds the address, whether they have accepted yet or not: Proton keeps members and invitations apart, but the question is the same one either way.

proton drive items share update PATH EMAIL
Terminal window
proton drive items share update /Reports jane@proton.me --edit
proton drive items share update /Reports jane@proton.me --edit=false
Flag Description
--edit Allow editing rather than only viewing

Move files or folders to the trash.

proton drive items trash [PATH...]
Terminal window
proton drive items trash /Documents/report.pdf
proton drive items trash --pattern '*.tmp' --scope /Build --recursive
proton drive items trash --older-than 1y --scope /Downloads --dry-run
Flag Description
--all Act on everything in scope, rather than a subset
--larger-than string Match files above SIZE (e.g. 100MB, 2GB)
--newer-than string Match files newer than DURATION
--older-than string Match files older than DURATION (e.g. 30d, 2w, 1h)
--pattern string Match names against a shell glob, e.g. *.tmp
--recursive Descend into subfolders when filtering
--scope string Look only inside this folder (default: the whole drive)
--smaller-than string Match files below SIZE

Rename a file or folder.

A name is a field like any other, so changing it is update --name rather than a verb of its own. To put something somewhere else, use move.

proton drive items update PATH
Terminal window
proton drive items update /Documents/report.pdf --name summary.pdf
Flag Description
--name string New name, without a path

Upload a file or directory.

A name already taken is refused, so nothing is overwritten by accident. –if-exists answers instead:

replace a new revision, keeping the file’s history rename keep both, numbering the one being uploaded skip leave what is there alone

With –recursive that answer is about the folder the tree lands in.

SRC of - reads standard input, and then DEST has to name the file.

proton drive items upload SRC [DEST]
Terminal window
proton drive items upload ./report.pdf /Documents
proton drive items upload --recursive ./project /Backup
proton drive items upload --if-exists replace ./report.pdf /Documents
pg_dump mydb | gzip | proton drive items upload - /Backups/db.sql.gz
Flag Description
--if-exists string What to do when the folder already has that name: rename, replace, skip
--recursive Upload a directory and everything under it

Your photo library.

Holds albums, delete, download, favorite, list, trash, unfavorite and upload.

Photo albums.

Holds add, create, delete, list, remove and update.

Put photos into an album.

proton drive photos albums add REF PHOTO_REF...
Terminal window
proton drive photos albums add Holidays 5bH2mQxK

Create an album.

proton drive photos albums create
Terminal window
proton drive photos albums create --name Holidays
Flag Description
--name string Name for the new album

Delete albums.

proton drive photos albums delete REF...
Terminal window
proton drive photos albums delete Holidays
proton drive photos albums delete Holidays --delete-photos
Flag Description
--delete-photos Also move the album’s photos to the trash

List albums.

proton drive photos albums list
Terminal window
proton drive photos albums list

Take photos out of an album.

proton drive photos albums remove REF PHOTO_REF...
Terminal window
proton drive photos albums remove Holidays 5bH2mQxK

Change an album’s cover.

proton drive photos albums update REF
Terminal window
proton drive photos albums update Holidays --cover 5bH2mQxK
Flag Description
--cover string Which of the album’s photos represents it

Delete photos permanently.

proton drive photos delete REF...
Terminal window
proton drive photos delete 5bH2mQxK

Download a photo.

proton drive photos download REF
Terminal window
proton drive photos download 5bH2mQxK --output-dir .
Flag Description
--force Overwrite a file that already exists
--output string Write to this path, or - for stdout
--output-dir string Write into this directory, keeping each item’s own name

Mark photos as favourites.

proton drive photos favorite REF...
Terminal window
proton drive photos favorite 5bH2mQxK

List photos.

proton drive photos list
Terminal window
proton drive photos list
proton drive photos list --album Holidays
proton drive photos list --tag favorites
Flag Description
--album string Show only what is in this album, by ID
--tag string Show only photos with this tag: favorites, screenshots, videos, live-photos, motion-photos, selfies, portraits, bursts, panoramas, raw

Move photos to the trash.

proton drive photos trash REF...
Terminal window
proton drive photos trash 5bH2mQxK

Remove photos from favourites.

proton drive photos unfavorite REF...
Terminal window
proton drive photos unfavorite 5bH2mQxK

Upload a photo to the library.

proton drive photos upload SRC
Terminal window
proton drive photos upload ./IMG_2291.jpg

How Drive behaves.

Holds get, list and set.

Show the drive settings now in effect.

proton drive settings get
Terminal window
proton drive settings get

List the drive settings that can be changed.

proton drive settings list
Terminal window
proton drive settings list

Change one drive setting.

proton drive settings set KEY VALUE
Terminal window
proton drive settings set revision-retention 30

Files and folders other people have shared with you.

Holds list.

List what other people have shared with you.

These do not live in your tree, so they have no path: they are addressed by the ID this listing shows, the way trashed items and photos are.

An item whose name cannot be read is still listed, because knowing it is there is what lets you act on it.

proton drive shared list
Terminal window
proton drive shared list

What you have shared with other people.

Holds list.

List what you have shared, by link or with named people.

items share get PATH answers the question for one item; this answers the one you actually have, which is what have I left open.

proton drive sharing list
Terminal window
proton drive sharing list

Items you have removed but not yet deleted.

Holds empty, list and restore.

Delete everything in the trash, permanently.

proton drive trash empty
Terminal window
proton drive trash empty

List what is in the trash.

proton drive trash list
Terminal window
proton drive trash list

Put items back where they came from.

A trashed item has no path any more, so it is named by the ID that trash list shows.

proton drive trash restore REF...
Terminal window
proton drive trash restore 5bH2mQxK

Every command also takes the flags that work everywhere.