[![Logo](assets/logo.jpg)](https://github.com/orhun/gpg-tui)
[![GitHub Release](https://img.shields.io/github/v/release/orhun/gpg-tui?style=flat&labelColor=1d1d1d&color=424242&logo=GitHub&logoColor=white)](https://github.com/orhun/gpg-tui/releases)
[![Crate Release](https://img.shields.io/crates/v/gpg-tui?style=flat&labelColor=1d1d1d&color=424242&logo=Rust&logoColor=white)](https://crates.io/crates/gpg-tui/)
[![Coverage](https://img.shields.io/codecov/c/gh/orhun/gpg-tui?style=flat&labelColor=1d1d1d&color=424242&logo=Codecov&logoColor=white)](https://codecov.io/gh/orhun/gpg-tui)
[![Continuous Integration](https://img.shields.io/github/actions/workflow/status/orhun/gpg-tui/ci.yml?branch=master&style=flat&labelColor=1d1d1d&color=424242&logo=GitHub%20Actions&logoColor=white)](https://github.com/orhun/gpg-tui/actions?query=workflow%3A%22Continuous+Integration%22)
[![Continuous Deployment](https://img.shields.io/github/actions/workflow/status/orhun/gpg-tui/cd.yml?style=flat&labelColor=1d1d1d&color=424242&logo=GitHub%20Actions&logoColor=white&label=deploy)](https://github.com/orhun/gpg-tui/actions?query=workflow%3A%22Continuous+Deployment%22)
[![Docker Builds](https://img.shields.io/github/actions/workflow/status/orhun/gpg-tui/docker.yml?style=flat&labelColor=1d1d1d&color=424242&label=docker&logo=Docker&logoColor=white)](https://hub.docker.com/r/orhunp/gpg-tui)
[![Documentation](https://img.shields.io/docsrs/gpg-tui?style=flat&labelColor=1d1d1d&color=424242&logo=Rust&logoColor=white)](https://docs.rs/gpg-tui/)
## 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
![](demo/gpg-tui-showcase.gif)
Table of Contents
- [About](#about)
- [Requirements](#requirements)
- [Installation](#installation)
- [Cargo](#cargo)
- [Arch Linux](#arch-linux)
- [Community](#community)
- [AUR](#aur)
- [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)
- [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.64.0`
- Core dependencies: `gnupg`, `gpgme>=1.12.0`, `libgpg-error`
- Other dependencies: `libxcb`
Pleases 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
[![Packaging status](https://repology.org/badge/vertical-allrepos/gpg-tui.svg)](https://repology.org/project/gpg-tui/versions)
### 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 [community repository](https://archlinux.org/packages/community/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
```
### 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]
```
```
Options:
-a, --armor Enables ASCII armored output
--splash Shows the splash screen on startup
--config Sets the configuration file [env: GPG_TUI_CONFIG=]
--homedir Sets the GnuPG home directory [env: GNUPGHOME=]
-o, --outdir Sets the output directory [env: OUTDIR=]
--outfile Sets the template for the output file name [env: OUTFILE=] [default: {type}_{query}.{ext}]
-d, --default-key Sets the default key to sign with [env: DEFAULT_KEY=]
-t, --tick-rate Sets the tick rate of the terminal [env: TICK_RATE=] [default: 250]
-c, --color Sets the accent color of the terminal [env: COLOR=] [default: gray]
-s, --style