proton-authenticator-cli
v0.1.0
Published
Unofficial Proton Authenticator CLI with cloud sync (Ink TUI)
Maintainers
Readme
proton-authenticator-cli
Unofficial Proton Authenticator command-line client with cloud sync.
Authenticates with Proton, unlocks your Authenticator Key, syncs encrypted TOTP/Steam entries, and generates codes from the CLI. Includes an interactive TUI.
Not an official Proton product. For the supported apps, use Proton Authenticator. Not affiliated with Proton AG.
Install
Requires Bun ≥ 1.1 at runtime (including when you install with npm).
Bun
bun add -g proton-authenticator-cliOr from GitHub:
bun install -g github:brandonkramer/proton-authenticator-clinpm
npm install -g proton-authenticator-cliRun
protonauth # interactive TUI (TTY only)
protonauth status --output json # agent / scripting
protonauth --helpFrom a clone
git clone https://github.com/brandonkramer/proton-authenticator-cli.git
cd proton-authenticator-cli
bun install
bun link # optional: puts `protonauth` on your PATHRequirements
- Bun ≥ 1.1
- Proton account in Single Password Mode
- TOTP if you use 2FA (FIDO2/security keys are not supported)
- Optional: Proton Pass CLI for account password injection
- macOS for interactive CAPTCHA (native WKWebView helper; built on
postinstallwhen possible)
Usage
Interactive TUI
protonauth
# or
protonauth tui↑↓ + Enter to choose · number shortcuts · q / Esc to quit.
Commands
protonauth signin [username]
protonauth signin --pass "pass://Personal/Proton Account"
protonauth signout
protonauth sync
protonauth list
protonauth list --type totp
protonauth code github
protonauth statusProton Pass (recommended)
# Option A: Pass item ref
protonauth signin --pass 'pass://Personal/Proton Account'
# Option B: pass-cli run
export PROTON_PASSWORD='pass://Personal/Proton Account/password'
export PROTON_TOTP='pass://Personal/Proton Account/totp' # optional
pass-cli run -- protonauth signinEnv aliases: PROTONAUTH_PASS, PROTON_USERNAME, PROTON_PASSWORD, PROTON_TOTP.
Agents / automation
export PROTONAUTH_AGENT=1 # or CI=1 — no TUI, default --output json
# Human once (CAPTCHA / first 2FA):
protonauth signin --pass 'pass://Personal/Proton Account'
# Then:
pass-cli run -- protonauth sync --output json
protonauth list --type totp --output json
pass-cli run -- protonauth code github --output json
protonauth status --output json--output json|plain|ink(orPROTONAUTH_OUTPUT)- Non-interactive: no Ink prompts; missing password/TOTP/query → structured error codes
- CAPTCHA: never opens a window in agent mode (
captcha_required— sign in interactively once) - No-args /
tuirefused whenPROTONAUTH_AGENT,CI, or non-TTY stdin (exit 2)
Security
- Honest client headers:
{macos|linux|windows}-authenticator@…(no android/ios spoofing) - Config dir
~/.config/proton-authenticator-cliis0700, files0600 - Account password is never persisted — use Proton Pass or a prompt
- Authenticator entry secrets stay encrypted on disk; decrypted only in memory for
code/sync
CAPTCHA
Proton may require a CAPTCHA on /auth (API code 9001). On macOS, protonauth signin opens a floating native WKWebView window.
Solve the CAPTCHA in that native window — not in Safari/verify.proton.me. Completing verification in a normal browser does not return a token to the CLI.
bun run build:captcha # if postinstall skipped it; needs Xcode CLT
protonauth signinLicense
GPL-3.0-or-later — see LICENSE.
