Skip to content
/ g Public

GPG shell script for easy encryption, decryption, signing, verification and key management

License

Notifications You must be signed in to change notification settings

brucify/g

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

g

Script for easy interaction with basic gpg commands.

Getting started

$ curl https://raw.githubusercontent.com/brucify/g/main/g -J -o $HOME/.local/bin/g
$ chmod +x $HOME/.local/bin/g
$ g config signer <YOUR KEY ID HERE>
$ g config recipient <THEIR KEY ID HERE>

Usage

Usage: g <command> [filename]
Encrypt, decrypt, sign, verify, or print information about GPG keys. Use quotes for arguments with spaces.

Commands:
  genkey "John Doe <john@doe.com>"    Generate a new key pair with specified GPG user ID text
  addkeys [KEY_ID]                    Add three subkeys (sign, encrypt, auth) to the specified KEY_ID or the signer key ID in ~/.local/.g/gpg_signer
  whoami                              Display information about the signer key in ~/.local/.g/gpg_signer
  recipient                           Display information about the recipient key in ~/.local/.g/gpg_recipient
  encrypt <FILE>                      Encrypt a file with recipient specified in ~/.local/.g/gpg_recipient
  decrypt <FILE>                      Decrypt a file with sender key specified in ~/.local/.g/gpg_signer
  decrypt                             Decrypt all .asc and .gpg files in current directory
  sign <FILE>                         Sign a file using the signer key in ~/.local/.g/gpg_signer
  verify <SIG> [FILE]                 Verify a detached signature of a file or the standard input
  export signer                       Export the signer public key in ASCII format
  export recipient                    Export the recipient public key in ASCII format
  config signer [KEY_ID]              Set or display the signer key ID in ~/.local/.g/gpg_signer
  config recipient [KEY_ID]           Set or display the recipient key ID in ~/.local/.g/gpg_recipient
  keytocard                           Move all subkeys generated by 'g genkey' to Yubikey
  fgr <KEY_ID>                        Get the fingerprint of a GPG key with the specified KEY_ID
  sshcontrol                          Update the SSH control file (~/.gnupg/sshcontrol) with the keygrip of the signer key
  upgrade                             Upgrade g to the latest version from GitHub

About

GPG shell script for easy encryption, decryption, signing, verification and key management

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published