Manage your GnuPG keys with ease!
gpg-tui is a Terminal User Interface for GnuPG.
It aims to ease the key management operations such as listing/exporting/signing by providing an interface along with the command-line fallback for more complex operations. It is not trying to be a full-fledged interface for all the features that gpg provides but it tries to bring a more interactive approach to key management.
Demo
gpg-tui --style colored --splash --homedir /etc/pacman.d/gnupg
>=1.87.0gnupg, gpgme>=1.12.0, libgpg-errorlibxcbPlease note that the name of these dependencies (packages) might change depending on the distribution/platform.(*)
For installing these dependencies:
pacman -S gpgme libx11apt-get install libgpgme-dev libx11-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-devdnf install gpgme-devel libX11-develxbps-install -S gpgme-devel libxcb-devel libgpg-error-devel gnupggpg-tui is available on crates.io:
cargo install gpg-tuigpg-tui can be installed from the extra repository using Pacman:
pacman -S gpg-tuigpg-tui is also available on AUR and it can be installed with an AUR helper:
paru -S gpg-tui-gitOr if you prefer, you can clone the AUR packages and compile them with makepkg:
# clone the AUR repository
git clone https://aur.archlinux.org/gpg-tui-git.git && cd gpg-tui-git/
# build the package
makepkg -sigpg-tui is available for Alpine Edge. It can be installed via apk after enabling the community repository.
apk add gpg-tuiAvailable in dm9pZCAq overlay
eselect repository enable dm9pZCAq
emerge --sync dm9pZCAq
emerge app-crypt/gpg-tui::dm9pZCAqTo install the Homebrew package, run:
brew install gpg-tuiTo update, run:
brew upgrade gpg-tuiSee available tags.
docker pull orhunp/gpg-tui:[tag]You can also use the following command for a quick launch:
docker run --rm -it -v "$HOME/.gnupg":/app/.gnupg --user 1000:1000 orhunp/gpg-tui --homedir /app/.gnupg# clone the repository
git clone https://github.com/orhun/gpg-tui.git && cd gpg-tui/
# build the image
docker build -t gpg-tui .
# run the container
docker run -it gpg-tuiAll required dependencies are automatically fetched and installed independently of the installation method chosen.
# using a port
cd /usr/ports/security/gpg-tui
make install# alternative method using portmaster
portmaster security/gpg-tui# update repository catalogue (if outdated)
pkg update
# fetch and install the package
pkg install gpg-tuigpg-tui is available from the main pkgsrc branch.
pkgin install gpg-tuicd /usr/pkgsrc/security/gpg-tui
make install# clone the repository
git clone https://github.com/orhun/gpg-tui.git && cd gpg-tui/
# build and install
cargo install --root "$HOME/.cargo" --path .See available releases that are automated by Continuous Deployment workflow.
gpg-tui [OPTIONS]…It is possible to override the command line arguments with a configuration file.
See gpg-tui.toml for the default configuration values.
The configuration file can be specified via --config argument or GPG_TUI_CONFIG environment variable. Also, it can be placed to a location where gpg-tui looks for:
<config_dir> / gpg-tui.toml<config_dir> / gpg-tui/gpg-tui.toml<config_dir> / gpg-tui/config<config_dir> depends on the platform as shown in the following table:
| Platform | Value | Example |
|---|---|---|
| Linux | $XDG_CONFIG_HOME or $HOME/.config |
/home/alice/.config |
| macOS | $HOME/Library/Application Support |
/Users/Alice/Library/Application Support |
| Windows | {FOLDERID_RoamingAppData} |
C:\Users\Alice\AppData\Roaming |
| Key Binding | Action |
|---|---|
? |
show help |
o,space,enter |
show options |
hjkl,arrows,pgkeys |
navigate |
n |
switch to normal mode |
v |
switch to visual mode |
c |
switch to copy mode |
p,C-v |
paste from clipboard |
a |
toggle armored output |
1,2,3 |
set detail level |
t,tab |
toggle detail (all/selected) |
` |
toggle table margin |
m |
toggle table size |
C-s |
toggle style |
/ |
search |
: |
run command |
C-l,f2 |
show logs |
r,f5 |
refresh application |
q,C-c/d,escape |
quit application |
| Key Binding | Action |
|---|---|
x |
export key |
s |
sign key |
e |
edit key |
i |
import key(s) |
f |
receive key |
u |
send key |
g |
generate key |
d,backspace |
delete key |
C-r |
refresh keys |
Key bindings can be overridden/customized via using general.key_bindings setting in the configuration file. For example,
key_bindings = [
{ keys = [ "?", "h", "f1" ], command = ":help" },
{ keys = [ "C-s", "s" ], command = ":style colored" },
{ keys = [ "C-d", "C-c", "q" ], command = ":quit" },
]keys array contains the keycodes which is either a single key (e.g. a), a key combination (e.g. Control-C: C-c, Alt-C: A-c), or a special key (e.g. Backspace, Enter). Available key codes can be found in the crossterm documentation.
Also, see the list of commands.
Available keys in the keyring (which can be specified via --homedir argument) are showed on a table. This table consists of 2 columns which are key information and user information.
The level of detail that an individual table row shows is determined by detail levels.
[sc--] rsa3072/B14085A20355B74DE0CE0FA1E19F76D037BD65B6 │ [u] Example Key <example@key>[sc--] rsa3072/B14085A20355B74DE0CE0FA1E19F76D037BD65B6 │ [u] Example Key <example@key>
| └─(2021-05-14) │ └─[u] Other User ID <example@key>
[--e-] rsa3072/E56CAC142AE5A979BEECB00FB4F68595CAD4E7E5 │
└─(2021-05-14)…Detail level can be set using --detail-level argument or detail_level entry in the configuration file.
An example table entry for the detail level full (which includes subkeys) is explained via reference numbers below.
[sc--]⁰ rsa3072¹/B14085A20355B74DE0CE0FA1E19F76D037BD65B6²
|³ └─(2021-05-14)⁴
[--e-]⁰*⁶rsa3072¹/E56CAC142AE5A979BEECB00FB4F68595CAD4E7E5²
└─(2021-0No open issues yet, or sync has not completed.