First commands
Sign in once, then read your mail, move files in and out of Drive, check your calendar and pull a two-factor code. This is the five minutes from a fresh install to a useful command.
Sign in
Section titled “Sign in”$ proton account loginEmail: you@proton.mePassword:Two-factor code: 123456
✓ Signed in as you@proton.me.That is the whole setup. Signing in saves the session and unlocks your keys, so your password is needed once on this machine and not again.
If there is no terminal to answer the prompts, name the account and point at a file holding the password. A password is never a flag value:
proton account login --user you@proton.me --password-file /run/secrets/protonCheck where you stand
Section titled “Check where you stand”$ proton account getEmail: you@proton.meName: RomanStorage: ━━━━━─────────────── 26% 128.4 GB of 500.0 GBMax Upload: 5.0 GBProfile: defaultSession: validUnlocked: yesID: Kd91mQxT…Run your first commands
Section titled “Run your first commands”proton mail messages list --unreadproton mail messages get "Invoice #2291"proton drive items list /Documentsproton calendar events listproton pass items get github.comproton contacts listEvery command reads the same way, proton <app> <collection> <verb>, and anywhere one wants an ID, a subject, name, path or address works too.
That grammar is the whole trick: learn it once and you can guess the rest.
Turn on completion
Section titled “Turn on completion”Package installs come with it. For a script or manual install, run the line for your shell from Shell completions. Tab then offers folder names, item types, and the IDs and subjects your last listing showed.
Preview a change before making it
Section titled “Preview a change before making it”Every command that changes something takes --dry-run. It resolves references, applies filters, and shows you the rows it would touch:
proton mail messages trash --from newsletter@example.com --older-than 90d --dry-runAnything that removes permanently, or removes what a filter picked out rather than what you named, shows those rows and asks first. See Dry runs and confirmations.
Sign out
Section titled “Sign out”proton account logout # forget the session on this machineproton account logout --revoke # and invalidate it at ProtonRevoking also makes the credentials saved on this machine useless, even to someone who already copied them.
Where to go next
Section titled “Where to go next”| Page | What it covers |
|---|---|
| How a command is built | The grammar, and the verbs |
| Mail · Drive · Calendar · Pass · Contacts | One guide per app, task by task |
| Account | Two accounts side by side, unattended sign-in, revoking a device |
| Scripting | Pipelines, jq, cron and systemd |
| All commands | Every command in one table |
| FAQ | Is this official? How does it differ from Bridge? Is my password safe? |