Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gpg-tui

> 开发工具
Open source

Manage your GnuPG keys with ease!

1.7K stars0 likes5 views
WebsiteGitHub

About

Manage your GnuPG keys with ease!

About

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
Table of Contents
  • Requirements
  • Installation
    • Cargo
    • Arch Linux
      • Community
      • AUR
    • Alpine Linux
    • Gentoo
    • Homebrew
    • Docker
      • Docker Hub
      • Using the Dockerfile
    • FreeBSD
      • Building from source
      • Binary releases
    • NetBSD
      • Install using the package manager
      • Building from source
    • Manually
      • Building from source
      • Binary releases
  • Usage
  • Configuration
  • Key Bindings
    • User Interface
    • Key Management
    • Customization
  • Approach
    • Detail Levels
    • Key Information
    • User Information
  • Features
    • User Interface
      • Scrolling
      • Options Menu
      • Copy / Paste
      • Selection Mode
      • Detailed View
      • Search
      • File explorer
      • Show logs
      • Running commands
    • Key Management
      • List
      • Export
      • Sign
      • Edit
      • Import/Receive
      • Send
      • Generate
      • Delete
      • Refresh
    • Styling
      • Colors
      • Splash screen
  • Roadmap
    • Platforms
    • Packaging
    • Command-Line Fallback
    • Key Management Only
  • Resources
    • About the project
    • External links
    • In the media
  • Contact
  • Funding
  • License
  • Copyright

Requirements

  • Rust: >=1.87.0
  • Core dependencies: gnupg, gpgme>=1.12.0, libgpg-error
  • Other dependencies: libxcb

Please note that the name of these dependencies (packages) might change depending on the distribution/platform.(*)

For installing these dependencies:

  • on Arch Linux, run pacman -S gpgme libx11
  • on Debian/Ubuntu, run apt-get install libgpgme-dev libx11-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
  • on Fedora, run dnf install gpgme-devel libX11-devel
  • on Void Linux, run xbps-install -S gpgme-devel libxcb-devel libgpg-error-devel gnupg

Installation

Packaging status

Cargo

gpg-tui is available on crates.io:

bash
cargo install gpg-tui

Arch Linux

Community

gpg-tui can be installed from the extra repository using Pacman:

bash
pacman -S gpg-tui

AUR

gpg-tui is also available on AUR and it can be installed with an AUR helper:

bash
paru -S gpg-tui-git

Or if you prefer, you can clone the AUR packages and compile them with makepkg:

bash
# clone the AUR repository
git clone https://aur.archlinux.org/gpg-tui-git.git && cd gpg-tui-git/

# build the package
makepkg -si

Alpine Linux

gpg-tui is available for Alpine Edge. It can be installed via apk after enabling the community repository.

bash
apk add gpg-tui

Gentoo

Available in dm9pZCAq overlay

bash
eselect repository enable dm9pZCAq
emerge --sync dm9pZCAq
emerge app-crypt/gpg-tui::dm9pZCAq

Homebrew

To install the Homebrew package, run:

bash
brew install gpg-tui

To update, run:

bash
brew upgrade gpg-tui

Docker

Docker Hub

See available tags.

bash
docker pull orhunp/gpg-tui:[tag]

You can also use the following command for a quick launch:

bash
docker run --rm -it -v "$HOME/.gnupg":/app/.gnupg --user 1000:1000 orhunp/gpg-tui --homedir /app/.gnupg

Using the Dockerfile

bash
# 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-tui

FreeBSD

All required dependencies are automatically fetched and installed independently of the installation method chosen.

Building from source

bash
# using a port
cd /usr/ports/security/gpg-tui
make install
bash
# alternative method using portmaster
portmaster security/gpg-tui

Binary releases

bash
# update repository catalogue (if outdated)
pkg update

# fetch and install the package
pkg install gpg-tui

NetBSD

gpg-tui is available from the main pkgsrc branch.

Install using the package manager

bash
pkgin install gpg-tui

Building from source

bash
cd /usr/pkgsrc/security/gpg-tui
make install

Manually

Building from source

bash
# clone the repository
git clone https://github.com/orhun/gpg-tui.git && cd gpg-tui/

# build and install
cargo install --root "$HOME/.cargo" --path .

Binary releases

See available releases that are automated by Continuous Deployment workflow.

Usage

gpg-tui [OPTIONS]
…

Configuration

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 Bindings

User Interface

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 Management

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

Customization

Key bindings can be overridden/customized via using general.key_bindings setting in the configuration file. For example,

toml
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.

Approach

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.

Detail Levels

  1. Minimum: shows only the primary key and user ID.
[sc--] rsa3072/B14085A20355B74DE0CE0FA1E19F76D037BD65B6  │  [u] Example Key <example@key>
  1. Standard: shows all the subkeys and user IDs.
[sc--] rsa3072/B14085A20355B74DE0CE0FA1E19F76D037BD65B6  │  [u] Example Key <example@key>
|      └─(2021-05-14)                                    │   └─[u] Other User ID <example@key>
[--e-] rsa3072/E56CAC142AE5A979BEECB00FB4F68595CAD4E7E5  │
       └─(2021-05-14)
  1. Full: shows signatures and notations.
…

Detail level can be set using --detail-level argument or detail_level entry in the configuration file.

Key Information

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-0

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustclignupggpggpg-configuration

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具