Skip to main content

Command line shell for GnuPG

Project description

Introduction

gpgkeys is a Python program that allows to conveniently manage GnuPG keys and keyrings.

While probably not very interesting in itself, it serves as example application and testbed for the development of the rl library. In particular, gpgkeys contains a sophisticated implementation of filename completion which may one day find its way into a standalone package or rl add-on.

Repository Access

gpgkeys development is hosted on github.

Installation

gpgkeys depends on the rl library. Since rl contains a C extension it is a good idea to install it independently first.

Once rl is installed, type:

easy_install gpgkeys

to install the gpgkeys script. Then put it on your system PATH by e.g. symlinking it to /usr/local/bin.

Example Session

Everything in gpgkeys can be tab-completed: commands, help topics, userids, option flags, keyids, filenames, shell commands, and keyserver URLs (not shown).

$ gpgkeys
gpgkeys 1.7 (type help for help)

gpgkeys> help

Available commands (type help <topic>):
=======================================
EOF       del   export  genkey     import   lsign  refresh  shell
checksig  dump  fdump   genrevoke  list     quit   search   sign
clear     edit  fetch   help       listsig  recv   send     version

Shortcut commands (type help <topic>):
======================================
e  ll  ls

gpgkeys> help export
Usage: export <keyspec>
Options: --armor --clean --minimal --output --secret

Export keys to stdout or to a file

gpgkeys> ls Stefan
pub   1024R/E1F438AD 1995-10-03
uid                  Stefan H. Holek (RSA) <stefan@epy.co.at>

pub   1024D/355A2D28 2001-11-04
uid                  Stefan H. Holek <stefan@epy.co.at>
sub   2048g/A27E0DBC 2004-10-27

gpgkeys> export --armor E1F438AD > stefan.asc
gpgkeys> .ls
alice.asc             stefan.asc

gpgkeys understands shell pipes and input/output redirects. This allows things like:

gpgkeys> export E1F438AD | pgpdump | less

Changelog

1.7.1 - 2010-02-13

  • Depend on rl >= 1.4.1 explicitly so setuptools does not forget to upgrade it as well. [stefan]

1.7 - 2010-02-13

  • Change license to GPL. [stefan]

1.6 - 2010-01-31

  • Add –clean and –minimal import/export options to respective commands. [stefan]

  • Fix –merge-only import option of keyserver commands. [stefan]

  • Remove the –yes option again since it has no apparent effect. [stefan]

1.5 - 2010-01-26

  • Remove obsolete –secret option from the import command. [stefan]

  • Userid completion is now triggered by any kind of quoting. [stefan]

  • Allow to specifiy command line options after the argument. [stefan]

1.4 - 2010-01-20

  • Extend the quoting and dequoting API to make it more (re)usable. [stefan]

  • Dequoting didn’t work right when the default quoting character was single quote. [stefan]

  • Tildes in quoted filenames could cause quotes to be closed even if the tilde-expanded name matched a directory. [stefan]

1.3 - 2010-01-03

  • Cut down on infrastructure slack in filename completion. The individual strategies are very small. [stefan]

  • Remove logging as it clutters up the code. [stefan]

  • Add an example session to the README. [stefan]

1.2 - 2009-11-24

  • Extend keyid completion to also complete userids and names. [stefan]

  • Extract filename completion functionality into functions, as it is useful in other places as well. [stefan]

1.1 - 2009-11-16

  • Allow to specify the filename quoting style on the command line to ease experimentation. [stefan]

  • Filename completion: By dequoting early on we can skip a problematic hook and regain control over tilde expansion. Also see rl issue/3. [stefan]

1.0 - 2009-11-08

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpgkeys-1.7.1.zip (26.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page