-
Notifications
You must be signed in to change notification settings - Fork 0
JSON Output
Cristhian Melo edited this page Jul 20, 2026
·
1 revision
All read commands accept --json. Use this for scripts, launchers (Raycast, Vicinae), and CI pipelines.
{
"entry": "email/work",
"password": "s3cr3t",
"fields": [
{ "name": "username", "value": "alice" },
{ "name": "url", "value": "https://mail.example.com" }
],
"otp": null,
"extra_lines": []
}| Field | Description |
|---|---|
password |
First line of the decrypted entry |
fields |
name: value lines |
otp |
Present if the entry has an otpauth:// URI |
extra_lines |
Lines that are not name: value and not otpauth://
|
{
"entry": "email/work",
"otp": "123456",
"period": 30,
"expires_in": 14
}{
"entries": [
"email/work",
"email/personal",
"bank/checking"
]
}{
"path": ".gpg-id",
"recipients": ["you@example.com"],
"removed": false
}{
"path": ".gpg-id",
"recipients": ["you@example.com", "teammate@example.com"]
}On failure, rpass exits with a non-zero code and writes to stderr:
{
"error": {
"code": "gpg_decrypt_failed",
"message": "gpg: decryption failed: No secret key"
}
}| Code | Meaning |
|---|---|
store_not_found |
Store directory does not exist |
entry_not_found |
Requested entry does not exist |
gpg_not_found |
gpg binary not found |
gpg_passphrase_required |
GPG needs a passphrase; use --passphrase-stdin
|
gpg_decrypt_failed |
GPG decryption failed (wrong key, corrupt file) |
gpg_encrypt_failed |
GPG encryption failed |
gpg_id_not_found |
No .gpg-id file found for the entry |
recipient_not_found |
Recipient not in .gpg-id
|
otp_not_found |
Entry has no otpauth:// line |
entry_already_exists |
Use --force to overwrite |
invalid_entry_name |
Entry name contains invalid characters |
printf 'my-passphrase\n' | rpass show email/work --json --passphrase-stdin
printf 'my-passphrase\n' | rpass otp email/work --json --passphrase-stdinThe passphrase is read from stdin before GPG is invoked. Combine with jq for scripting:
PASSWORD=$(printf 'passphrase\n' | rpass show email/work --json --passphrase-stdin | jq -r '.password')