
protondrive
io.github.NSky/protondrive
Proton Drive for AI assistants: list, read, upload, download, move and trash files (unofficial)
Documentation
protondrive-client
Command-line client (CLI) for Proton Drive on Linux, Windows and macOS, written in C# on top of the Proton Drive SDK, with two-way synchronization of local folders, background sync and a built-in MCP server for AI assistants.
[!NOTE] This is unofficial, third-party software. It is not affiliated with, endorsed by or supported by Proton AG; "Proton" and "Proton Drive" are trademarks of Proton AG. It is provided "as is", without warranty of any kind, and the authors accept no responsibility or liability for any loss of data, damage to your account or other harm resulting from its use. See Disclaimer.
Contents
- What it is, and what it isn't
- Features
- Install
- Quick start
- Sync
- AI assistants (MCP)
- Building from source
- Commands
- Update
- Uninstall
- Where data is stored
- Application identification
- Disclaimer
What it is, and what it is not
- Not an rclone wrapper, and not a reverse-engineered client. It does not re-implement Proton's API or encryption.
- Built on Proton's own open-source libraries: the Proton Drive SDK and Proton's cryptography library. Login, keys, encryption and API calls all go through Proton's code; this project adds the command line, the synchronization engine and MCP server for AI assistants.
- Your password stays with Proton. With
protondrive login --browseryou sign in on Proton's own page, and this app never sees your password. Typed in the terminal instead, it is never stored, logged or accepted on the command line, and the login itself is Proton's (SRP: the password is not sent to the server). The security review shows, with references to the code, how your password, session and files are handled. - Sync follows the Drive events feed. After the first synchronization, it asks Drive what changed since the last pass instead of walking the whole remote folder tree each time. That keeps it fast, and light on the API, with large folders. See Finding changes.
Features
protondrive-client brings two-way synchronization and AI assistants to the terminal on Linux, Windows and macOS.
| Official Proton Drive CLI | protondrive-client | |
|---|---|---|
| Basic file operations in the cloud | ✅ | ✅ |
| Two-way folder sync | ❌ | ✅ |
| Background sync | ❌ | ✅ |
| AI assistants (MCP server) | ❌ | ✅ |
Linux packages (.deb, .rpm, AUR) | ❌ | ✅ |
| Saved login encrypted | ✅ | ✅ |
| Made and supported by Proton | ✅ | ❌ |
Install
Releases: releases page, with SHA256SUMS to check the
downloads. Each is one self-contained program for x64 or arm64; nothing else is needed.
On Linux
A package is recommended: it includes the systemd units for background sync. Pick the one for your distribution.
Debian, Ubuntu, Linux Mint: download the .deb from the releases page (_arm64.deb for arm64), then
sudo apt install ./nsky-protondrive-client_0.4.2-1_amd64.deb
Fedora, RHEL, openSUSE: download the .rpm (.aarch64.rpm for arm64), then
sudo dnf install ./nsky-protondrive-client-0.4.2-1.x86_64.rpm # openSUSE: sudo zypper install ./...
Arch Linux: from the AUR
yay -S nsky-protondrive-client-bin
Other distributions: the release archive
tar -xzf protondrive-0.4.2-linux-x64.tar.gz # or -linux-arm64
sudo protondrive-0.4.2-linux-x64/install.sh # into /usr/local; --prefix /usr also works
On Windows and macOS (Linux too, but not recommended)
With npm:
Needs Node.js 18 or newer, only to start the program. Not recommended on Linux: it brings no systemd units, so background sync does not work there; use a package above.
npm install -g @nskylabs/protondrive-cli # update: npm update -g @nskylabs/protondrive-cli
Or from the release archive if you don't want Node.js and npm:
Download the archive for your platform from the releases page.
On Windows, in PowerShell, unpack it into your programs folder and add that to your PATH:
Expand-Archive protondrive-0.4.2-win-x64.zip $env:TEMP\protondrive -Force # or -win-arm64.zip
Move-Item $env:TEMP\protondrive\protondrive-0.4.2-win-x64 $env:LOCALAPPDATA\Programs\protondrive
[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', 'User') + ";$env:LOCALAPPDATA\Programs\protondrive", 'User')
Then open a new terminal. On macOS (-osx-arm64 for Apple Silicon, -osx-x64 for Intel):
tar -xzf protondrive-0.4.2-osx-arm64.tar.gz
xattr -dr com.apple.quarantine protondrive-0.4.2-osx-arm64 # macOS blocks unsigned downloads until this
mkdir -p ~/Applications && mv protondrive-0.4.2-osx-arm64 ~/Applications/protondrive
sudo mkdir -p /usr/local/bin && sudo ln -sf ~/Applications/protondrive/protondrive /usr/local/bin/protondrive
Then go on to Quick start. To build it yourself, see Building from source.
Install details
npm and a Linux package together: both put the command in /usr/bin/protondrive when npm installs into /usr
(Arch, Fedora), so they clash. To have both, install npm packages in your home folder, without sudo
(npm config set prefix ~/.local).
Windows and macOS archives are not signed by a publisher: Windows SmartScreen warns on first run ("More info",
then "Run anyway"), and macOS needs the xattr command above. The npm install needs neither.
On Linux, protondrive-client is installed system-wide, so every user on the machine can use it. Each user then signs in and chooses folders on their own: logins, settings and sync state stay in each user's home folder.
Quick start
As yourself, not with sudo. Sign in first:
protondrive login --browser # on Proton's own page; or plain 'protondrive login' to type it in the terminal
Then sync a folder:
protondrive sync add ~/Proton /Backup/Laptop # a local folder, then a Proton Drive folder; either is created
protondrive sync --dry-run # see what the first sync would do
protondrive service enable # keep them in sync in the background
Or let your AI assistant use Proton Drive (Claude Code here; other clients):
claude mcp add --scope user ProtonDrive -- protondrive mcp --local-dir ~/ProtonDrive-AI
Sync
Once you are logged in, choose a local folder and a Proton Drive folder to keep synchronized, as yourself (not with sudo):
protondrive sync add ~/Proton /Backup/Laptop # local folder first, then the Proton Drive folder; creates either if missing
protondrive sync --dry-run # show what the first sync would do
protondrive sync # one pass over all synced folders
protondrive sync status # synced folders, last sync, anything that needs attention
On Windows the local folder uses backslashes, and the Proton Drive folder still uses /:
protondrive sync add C:\Users\you\Proton /Backup/Laptop.
Running it in the background
To keep your folders synchronized without a terminal open, protondrive service enable runs it in the background under
your own user, with no administrator rights:
- Linux: a systemd user service. It keeps going after you log out and starts again at boot.
- Windows: a Task Scheduler task,
protondrive sync (<your user name>), while you are logged on. No window opens. - macOS: a launch agent,
~/Library/LaunchAgents/io.github.nsky.protondrive.sync.plist, while you are logged in. It shows under System Settings → General → Login Items asprotondrive, and problems show as notifications.
There are two modes. Enabling one turns the other off.
Watch mode, the best choice for most users. It synchronizes continuously: local changes within seconds, changes in Proton Drive within about 30 seconds.
protondrive service enable
Timer mode. One synchronization pass every 15 minutes, and nothing running in between. Use it when a short delay doesn't matter and you'd rather not have a program running all the time.
protondrive service enable --timer
To check on it, with the last lines of its log:
protondrive service status
The full log is in the journal on Linux (journalctl --user -u protondrive-sync-watch, timer mode:
-u protondrive-sync), in %LOCALAPPDATA%\protondrive\state\logs\sync.log on Windows and in
~/Library/Application Support/protondrive/state/logs/sync.log on macOS.
To stop it (either mode):
protondrive service disable
macOS keeps background programs out of your Documents, Desktop and Downloads folders and iCloud Drive until you allow
it: a synced folder there fails with "Operation not permitted". service enable and service status say so when it
applies. Give protondrive Full Disk Access: System Settings → Privacy & Security → Full Disk Access, click +, press
Cmd+Shift+G and enter the program's real path, which service enable shows when this applies (or
realpath "$(which protondrive)"), then run protondrive service enable again. A folder elsewhere in your home
folder needs nothing.
To synchronize continuously in a terminal instead, run protondrive sync --watch (Ctrl+C stops it).
Good to know:
- Each user runs their own background sync under their own account, independently of other users.
- On Linux,
service enablealso enables linger for you (loginctl enable-linger), which lets the service run while you are logged out. If the system does not allow that, it prints the command an administrator can run (sudo loginctl enable-linger <user>). - A sync started by hand while the service runs is safe: two passes on the same folder never overlap.
- If your Proton session ends, the watch service stops and stays stopped, on Windows and macOS too (it does not retry
every minute, and at the next login it stops again at once). Run
protondrive login, thenprotondrive service enableagain.
How sync works
SYNC.md explains how synchronization decides what to do, what it never does (nothing is deleted permanently, and conflicts keep both versions), the safety checks against accidents, and what is not synced.
AI assistants (MCP)
protondrive mcp lets AI assistants such as Claude Code, Claude Desktop or Cursor use your Proton Drive through the
Model Context Protocol. It uses your protondrive login, and runs safely alongside
the sync service. Log in first (see Quick start).
It runs on your computer. The AI client starts it and talks to it over stdin and stdout; it never listens on the network, so nothing else on your computer, and no web page, can reach it. Your files are downloaded and decrypted here, by Proton's code, as with any other command.
File contents stay on your computer until the model reads one, usually because you asked it to; your client can
ask you before each tool call. A tool's answer goes to the AI client, and with a model in the cloud, to its provider.
Listing a folder or showing an item's details sends names, sizes, dates and other details; only read_text_file
sends a file's contents. upload and download copy files between Proton Drive and --local-dir without the
model seeing what is in them. Only a model running on your computer keeps everything local.
Add it to your AI tool
--local-dir is the only local folder the server may upload from or download into; leave it out and the server
never touches local files. On Windows, use a Windows path such as C:\\Users\\you\\ProtonDrive-AI in the JSON
configs (backslashes doubled).
Claude Code, for all your projects:
claude mcp add --scope user ProtonDrive -- protondrive mcp --local-dir ~/ProtonDrive-AI
Claude Desktop: Settings → Developer → Edit Config opens claude_desktop_config.json. Add the server, then restart
Claude Desktop:
{
"mcpServers": {
"Proton Drive": {
"command": "protondrive",
"args": ["mcp", "--local-dir", "/home/you/ProtonDrive-AI"]
}
}
}
If the file already has an mcpServers section, add only the "Proton Drive" entry to it.
No Developer section in Settings? Turn on Developer Mode: open the app menu (☰ in the top-left on Windows and Linux, the menu bar on macOS), then Help → Troubleshooting → Enable Developer Mode. Instead of restarting, you can then choose Developer → Reload MCP Configuration after each edit.
Windows only: if Claude Desktop was installed as an MSIX package, the app reads its config from a virtualized
location, while Edit Config opens the real %APPDATA%\Claude\claude_desktop_config.json, and the two
files never sync.
Codex, VS Code / GitHub Copilot, Cursor, Windsurf and others: most take the same mcpServers entry as Claude
Desktop, in their own config file; Setting it up has the command or file for each.
Then restart or reload the client and ask: "What's in my Proton Drive?"
Safeguards
Each of these only takes power away:
--no-content: the model can never read a file's contents;read_text_fileis not offered at all.--root <path>: the model sees only that folder of your Proton Drive, and cannot leave it.--read-only: no tool that changes Proton Drive is offered.--local-dir <folder>: the only local folder it may upload from or download into. Without it, no local files at all.- Always: nothing is overwritten, and nothing can be deleted permanently. There is no tool for it;
trashmoves items to the Proton Drive trash, and is marked destructive so your client can ask you first.
MCP.md lists every tool and option, what reaches the model, and how to set up and check each client.
The server is also listed in the MCP Registry as
io.github.NSky/protondrive.
Building from source
On Linux, with the prerequisites in BUILDING.md (the .NET 10 SDK, and a GitHub token for the Proton packages):
make # as your user
sudo make install # PREFIX=/usr/local by default; DESTDIR is supported for packaging
BUILDING.md has the rest: the Proton packages, Windows and macOS builds, releases, and the projects.
Commands
| Command | Also | What it does |
|---|---|---|
login [--browser], logout | Sign in, on Proton's page with --browser or in the terminal; or end the session | |
whoami | status | Show the signed-in account |
session status|encrypt|decrypt | Show how the saved login is stored, or encrypt it (systemd-creds on Linux, DPAPI on Windows, the keychain on macOS) | |
ls [path] | list | List a folder in My files |
info <path>... | stat | Show everything Proton Drive knows about a file or folder |
download <path> <local-folder> | get | Download a file or folder |
upload <local-path> [folder] | put | Upload a file or folder, never overwriting |
mkdir [-p] <path>... | Create folders | |
move <source>... <destination> | mv | Move or rename, never overwriting |
rename <path> <new-name> | ren | Rename in the same folder |
delete [-r] [--permanent] <path>... | rm | Move to the Proton Drive trash, or delete permanently |
sync add|remove|list|status | Choose which folders to sync (see Sync) | |
sync [--watch] | Sync once, or continuously | |
service enable|disable|status | Sync in the background: a systemd user service on Linux, a scheduled task on Windows, a launch agent on macOS | |
mcp | Let an AI assistant use Proton Drive (see AI assistants MCP) | |
version, help | Show the version, or the help |
Remote paths are relative to My files: Docs/2024 and /Docs/2024 are the same. Every option, the progress display
and each command's rules (what is checked first, exit codes) are in COMMANDS.md.
Update
Each user's logins, settings and synced folders are kept: there is nothing to set up again.
On Linux, install the new version the way you installed the old one. Background sync restarts on the new version by itself once no synchronization pass is running.
sudo apt install ./nsky-protondrive-client_0.4.2-1_amd64.deb # Debian, Ubuntu, Linux Mint
sudo dnf install ./nsky-protondrive-client-0.4.2-1.x86_64.rpm # Fedora, RHEL (openSUSE: sudo zypper install ./...)
yay -S nsky-protondrive-client-bin # Arch Linux, or yay -Syu with everything else
sudo protondrive-0.4.2-linux-x64/install.sh # release archive, from the new unpacked folder
On Windows, stop background sync first: Windows does not let a running program be replaced.
protondrive service disable # if background sync is on
npm update -g @nskylabs/protondrive-cli # with npm
protondrive service enable # turn background sync on again
With the release archive, between those two service commands:
Expand-Archive protondrive-0.4.2-win-x64.zip $env:TEMP\protondrive -Force
Copy-Item $env:TEMP\protondrive\protondrive-0.4.2-win-x64\* $env:LOCALAPPDATA\Programs\protondrive -Recurse -Force
On macOS, update, then restart background sync on the new version:
npm update -g @nskylabs/protondrive-cli # with npm
protondrive service enable # if background sync is on
With the release archive, instead of npm update:
tar -xzf protondrive-0.4.2-osx-arm64.tar.gz
xattr -dr com.apple.quarantine protondrive-0.4.2-osx-arm64
rm -rf ~/Applications/protondrive && mv protondrive-0.4.2-osx-arm64 ~/Applications/protondrive
If service status then reports "Operation not permitted", give the new version Full Disk Access again (see
Running it in the background).
Uninstall
First, each user who used it stops background sync and signs out, as themselves:
protondrive service disable # if background sync was enabled
protondrive logout # ends the session on Proton's servers and deletes the saved login
Then remove the program the way it was installed, with one of these:
Debian, Ubuntu, Linux Mint (.deb package)
sudo apt remove nsky-protondrive-client
Fedora, RHEL, openSUSE (.rpm package)
sudo dnf remove nsky-protondrive-client # openSUSE: sudo zypper remove nsky-protondrive-client
Arch Linux (AUR)
yay -R nsky-protondrive-client-bin # or: sudo pacman -R nsky-protondrive-client-bin
Linux release archive, from its unpacked folder
sudo ./install.sh --uninstall
npm, on any platform
npm uninstall -g @nskylabs/protondrive-cli
Windows or macOS release archive: delete the program's folder (%LOCALAPPDATA%\Programs\protondrive, or
~/Applications/protondrive and the link /usr/local/bin/protondrive), and on Windows take it out of your PATH.
Built from source, from the source folder
sudo make uninstall
Users' logins, settings and sync state in their home folders are left in place, and synced files are never touched. On macOS the session key also stays in your login keychain; to remove it:
security delete-generic-password -s io.github.nsky.protondrive -a session-key
Where data is stored
| What | Linux | Windows | macOS |
|---|---|---|---|
| Saved login (session) | ~/.config/protondrive/session.cred (encrypted) or session.json | %LOCALAPPDATA%\protondrive\session.cred (encrypted) | ~/Library/Application Support/protondrive/session.cred (encrypted) |
| Synced folder pairs | ~/.config/protondrive/sync.json | %LOCALAPPDATA%\protondrive\sync.json | ~/Library/Application Support/protondrive/sync.json |
| Sync state databases and locks | ~/.local/state/protondrive/sync/ | %LOCALAPPDATA%\protondrive\state\sync\ | ~/Library/Application Support/protondrive/state/sync/ |
| Background sync log | the user journal | %LOCALAPPDATA%\protondrive\state\logs\ | ~/Library/Application Support/protondrive/state/logs/ |
| Downloads in progress, local trash | <synced folder>/.protondrive/ | the same | the same |
On Linux, $XDG_CONFIG_HOME and $XDG_STATE_HOME move the first three. Every file is readable only by you.
Your password itself is never stored. The saved login, however, is as good as a login: its tokens give access to
the account, and the key passphrases derived from your password decrypt your files. Keep the protondrive folder
above out of backups and dotfile repositories, and if the file is ever copied or shared, run protondrive logout
(which ends the session on the server) and log in again.
On Windows the saved login is encrypted with DPAPI by default, bound to your Windows user: a copy is useless to another user or on another computer.
On macOS it is encrypted by default with a random key kept in your login
keychain (as "protondrive-session-key"), which macOS unlocks when you log in: a copy of the file is useless without
your keychain. Over SSH, with no one logged in to the Mac, the keychain is usually locked: log in to the Mac first,
or run security unlock-keychain. A login saved as a plain file by an older version stays plain until you run
protondrive session encrypt. protondrive session status shows how yours is stored.
On Linux, with systemd 256 or newer, a new login is saved encrypted with systemd-creds by
default, using a key held by the system, and by the TPM when the computer has one, and bound to your user. If
encrypting fails, the login is saved as a plain file instead. A login saved as a plain file before (by an older
version, or on an older systemd) stays plain until you run protondrive session encrypt. A copy of
session.cred cannot be decrypted on another computer or by another user. Background sync keeps working, also
after logging out and after a reboot, because no desktop keyring is involved. Decrypting takes about 1.5 seconds,
so with encryption on every command starts that much later (the watch service only at startup). Logging out and in
again keeps it encrypted. protondrive session decrypt turns it off, also for later logins, after a warning and a
y/N question (--yes skips them), and protondrive session status shows which it is.
Encryption, on every platform, protects copies of the file, not your running account: programs running as you
can still decrypt it, as they could read the plain file. If the key changes (a new TPM or motherboard, a reinstalled
system), the session cannot be decrypted any more: protondrive logout still removes it, then log in again.
Several processes can use the session at once, for example the sync service and a command run by hand. Proton
refresh tokens can only be used once, so token refreshes are coordinated through a lock file
(session.lock): a process that finds the tokens already refreshed by another one uses those instead of
refreshing again.
Application identification
Requests carry x-pm-appversion: external-drive-nsky_protondrive@<version>-stable, as required by
Proton's third-party usage guidelines.
The User-Agent is protondrive/<version> (<os>; <architecture>), for example protondrive/0.4.0 (linux; x64).
Disclaimer
- It is an unofficial, third-party client. It is not affiliated with, endorsed by, sponsored by or supported by Proton AG. "Proton" and "Proton Drive" are trademarks of Proton AG and are used here only to describe what the software works with. Do not contact Proton support about problems with it.
- It is provided "as is", without warranty of any kind, express or implied, as stated in the MIT License. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, including loss or corruption of data and problems with your Proton account, arising from its use.
sync,uploadanddownloadcreate, change, move and delete files on your computer and in your Proton Drive. Try them on unimportant folders first, usesync --dry-runto preview, and keep independent backups.- You are responsible for using it in line with Proton's terms of service and its guidelines for third-party clients.
@nskylabs/protondrive-clinpm install @nskylabs/protondrive-cli