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

gpg-tui

> 开发工具
Open source

Manage your GnuPG keys with ease!

1.7K stars0 likes0 views
WebsiteGitHub

About

Manage your GnuPG keys with ease!

## About **gpg-tui** is a [Terminal User Interface](https://en.wikipedia.org/wiki/Text-based_user_interface) for [GnuPG](https://gnupg.org/). 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](https://linux.die.net/man/1/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](#requirements) - [Installation](#installation) - [Cargo](#cargo) - [Arch Linux](#arch-linux) - [Community](#community) - [AUR](#aur) - [Alpine Linux](#alpine-linux) - [Gentoo](#gentoo) - [Homebrew](#homebrew) - [Docker](#docker) - [Docker Hub](#docker-hub) - [Using the Dockerfile](#using-the-dockerfile) - [FreeBSD](#freebsd) - [Building from source](#building-from-source) - [Binary releases](#binary-releases) - [NetBSD](#netbsd) - [Install using the package manager](#install-using-the-package-manager) - [Building from source](#building-from-source-1) - [Manually](#manually) - [Building from source](#building-from-source-2) - [Binary releases](#binary-releases-1) - [Usage](#usage) - [Configuration](#configuration) - [Key Bindings](#key-bindings) - [User Interface](#user-interface) - [Key Management](#key-management) - [Customization](#customization) - [Approach](#approach) - [Detail Levels](#detail-levels) - [Key Information](#key-information) - [User Information](#user-information) - [Features](#features) - [User Interface](#user-interface-1) - [Scrolling](#scrolling) - [Options Menu](#options-menu) - [Copy / Paste](#copy--paste) - [Selection Mode](#selection-mode) - [Detailed View](#detailed-view) - [Search](#search) - [File explorer](#file-explorer) - [Show logs](#show-logs) - [Running commands](#running-commands) - [Key Management](#key-management-1) - [List](#list) - [Export](#export) - [Sign](#sign) - [Edit](#edit) - [Import/Receive](#importreceive) - [Send](#send) - [Generate](#generate) - [Delete](#delete) - [Refresh](#refresh) - [Styling](#styling) - [Colors](#colors) - [Splash screen](#splash-screen) - [Roadmap](#roadmap) - [Platforms](#platforms) - [Packaging](#packaging) - [Command-Line Fallback](#command-line-fallback) - [Key Management Only](#key-management-only) - [Resources](#resources) - [About the project](#about-the-project) - [External links](#external-links) - [In the media](#in-the-media) - [Contact](#contact) - [Funding](#funding) - [License](#license) - [Copyright](#copyright) ## Requirements - [Rust](https://www.rust-lang.org/): `>=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.([\*](https://github.com/orhun/gpg-tui/issues/10)) 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](https://crates.io/crates/gpg-tui/): ```sh cargo install gpg-tui ``` ### Arch Linux #### Community **gpg-tui** can be installed from the [extra repository](https://archlinux.org/packages/extra/x86_64/gpg-tui/) using [Pacman](https://wiki.archlinux.org/title/Pacman): ```sh pacman -S gpg-tui ``` #### AUR **gpg-tui** is also available on [AUR](https://aur.archlinux.org/packages/?O=0&SeB=b&K=gpg-tui&outdated=&SB=n&SO=a&PP=50&do_Search=Go) and it can be installed with an [AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers): ```sh paru -S gpg-tui-git ``` Or if you prefer, you can clone the [AUR packages](https://aur.archlinux.org/packages/?O=0&SeB=b&K=gpg-tui&outdated=&SB=n&SO=a&PP=50&do_Search=Go) and compile them with [makepkg](https://wiki.archlinux.org/index.php/Makepkg): ```sh # 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](https://pkgs.alpinelinux.org/packages?name=gpg-tui&branch=edge). It can be installed via [apk](https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper) after enabling the [community repository](https://wiki.alpinelinux.org/wiki/Repositories). ```sh apk add gpg-tui ``` ### Gentoo Available in [dm9pZCAq overlay](https://github.com/gentoo-mirror/dm9pZCAq) ```sh eselect repository enable dm9pZCAq emerge --sync dm9pZCAq emerge app-crypt/gpg-tui::dm9pZCAq ``` ### Homebrew To install the [Homebrew package](https://formulae.brew.sh/formula/gpg-tui), run: ```sh brew install gpg-tui ``` To update, run: ```sh brew upgrade gpg-tui ``` ### Docker #### Docker Hub See available [tags](https://hub.docker.com/r/orhunp/gpg-tui/tags). ```sh docker pull orhunp/gpg-tui:[tag] ``` You can also use the following command for a quick launch: ```sh docker run --rm -it -v "$HOME/.gnupg":/app/.gnupg --user 1000:1000 orhunp/gpg-tui --homedir /app/.gnupg ``` #### Using the Dockerfile ```sh # 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 ```sh # using a port cd /usr/ports/security/gpg-tui make install ``` ```sh # alternative method using portmaster portmaster security/gpg-tui ``` #### Binary releases ```sh # 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](https://pkgsrc.se/security/gpg-tui). #### Install using the package manager ```sh pkgin install gpg-tui ``` #### Building from source ```sh cd /usr/pkgsrc/security/gpg-tui make install ``` ### Manually #### Building from source ```sh # 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](https://github.com/orhun/gpg-tui/releases) that are automated by [Continuous Deployment](.github/workflows/cd.yml) workflow. ## Usage ``` gpg-tui [OPTIONS] ``` ``` … ``` ## Configuration It is possible to override the command line arguments with a configuration file. See [gpg-tui.toml](config/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: - `` `/` `gpg-tui.toml` - `` `/` `gpg-tui/gpg-tui.toml` - `` `/` `gpg-tui/config` `` 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](#configuration). 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](https://docs.rs/crossterm/latest/crossterm/event/enum.KeyCode.html). Also, see the [list of commands](./COMMANDS.md). ## 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](#key-information) and [user information](#user-information). The level of detail that an individual table row shows is determined by [detail levels](#detail-levels). ### Detail Levels 1. **Minimum**: shows only the primary key and user ID. ``` [sc--] rsa3072/B14085A20355B74DE0CE0FA1E19F76D037BD65B6 │ [u] Example Key ``` 2. **Standard**: shows all the subkeys and user IDs. ``` [sc--] rsa3072/B14085A20355B74DE0CE0FA1E19F76D037BD65B6 │ [u] Example Key | └─(2021-05-14) │ └─[u] Other User ID [--e-] rsa3072/E56CAC142AE5A979BEECB00FB4F68595CAD4E7E5 │ └─(2021-05-14) ``` 3. **Full**: shows signatures and notations. ``` … ``` Detail level can be set using `--detail-level` argument or `detail_level` entry in the [configuration file](#configuration). ### 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

GitHub Issues· 0 open

View all on GitHub

No open issues yet, or sync has not completed.

Highlights

  • •Requirements
  • •Installation
  • •Arch Linux
  • •Community
  • •Alpine Linux
  • •Homebrew
  • •Docker Hub
  • •Using the Dockerfile
  • •Building from source
  • •Binary releases

> 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
下一代前端构建工具