LinuxCommandLibrary

gpg-tui

Manage GPG keys in a text user interface

TLDR

Start gpg-tui

$ gpg-tui
copy

Start gpg-tui with color and ASCII armored output
$ gpg-tui --style [colored] --armor
copy

Quit gpg-tui
$ <q>
copy

Interactively generate a new key
$ <g>
copy

Export the selected key
$ <x>
copy

Set the detail level for the selected key
$ <1>|<2>|<3>
copy

Refresh gpg-tui
$ <r>
copy

Display help in gpg-tui
$ <?>
copy

SYNOPSIS

gpg-tui [OPTIONS] [PATH ...]

PARAMETERS

--help
    Print help information

--version
    Print version information

--version-info, -V
    Print detailed version info

--gpg-binary <PATH>
    Path to custom gpg binary

--gnupg-home <DIR>
    Custom GnuPG home directory

--keyserver <URL>
    Custom keyserver URL

--tofu-default <POLICY>
    Default ToFu policy (auto|good|unknown|ask|warn)

--tofu-policy <KEY:FINGERPRINT:POLICY>
    Set ToFu policy for specific key

--fpr-mode <MODE>
    Fingerprint display mode (full|compact|mixed)

--full-fingerprint
    Force full fingerprints everywhere

--compact-fingerprint
    Force compact fingerprints everywhere

--mixed-fingerprint
    Use mixed fingerprint mode (default)

--no-color
    Disable colored output

--no-emoji
    Disable emoji icons

--no-wrap
    Disable text wrapping

--read-only
    Open keys in read-only mode

--quit-if-no-keys
    Exit if no keys available

--config <FILE>
    Custom config file path

--log <FILE>
    Log output to file

DESCRIPTION

gpg-tui is a modern, intuitive terminal user interface (TUI) for GnuPG (GNU Privacy Guard), simplifying PGP operations like key management, encryption, decryption, signing, and verification. Written in Rust using the Ratatui crate, it offers a responsive, keyboard-navigable interface with optional mouse support, searchable key lists, and interactive editors for keys and user IDs.

Users can browse public/private keys, edit details (add photos, subkeys, revoke), generate new keys, export/import, and perform file operations on multiple items. It integrates seamlessly with GPG's backend, handling ToFu policies, keyservers, and fingerprints. No need for memorizing gpg commands—everything is menu-driven with clear prompts and status bars.

Perfect for terminal enthusiasts seeking visual efficiency without leaving the CLI environment. Supports batch file processing and read-only mode for safety.

CAVEATS

Requires GnuPG 2.1+, UTF-8 terminal, and ideally 256-color support. Mouse optional but keyboard primary. Some advanced GPG features may need manual config. Not for headless scripting.

HISTORY

Developed by Michael Murphy starting in 2020 as a Rust-based TUI for GPG. First stable release v0.1.0 in 2021; now at v0.25+ with active GitHub maintenance. Gained popularity for bridging CLI and GUI gaps in key management.

SEE ALSO

gpg(1), gpg-agent(1), pinentry(1), ratatui(7)

Copied to clipboard