Command Line Interface (CLI)

$ pyage --help
Usage: pyage [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  decrypt   Decrypt a file encrypted with 'age encrypt'.
  encrypt   Encrypt data for the given recipients.
  generate  Generate a new age private/public key pair.

Encryption

$ pyage encrypt --help
Usage: pyage encrypt [OPTIONS] [RECIPIENTS]...

  Encrypt data for the given recipients.

  RECIPIENTS can be a list of either:
  - aliases (from ~/.config/age/aliases.txt)
  - age public keys (starting with "age1...")
  - SSH public keys (starting with "ssh-rsa" or "ssh-ed25519")
  - Files with one key per line (no aliases allowed)
  - URLs to files with one key per line (no aliases allowed)
  - GitHub usernames (will fetch SSH public keys from https://github.com/USERNAME.keys)

  Plaintext data can be passed via the standard input stream or from a file.
  Encryption to the standard output stream is only allowed if the stream is
  not bound to a TTY, in any case an output file can be used.

  A password recipient can be added with the '-p' option. age will prompt
  for the password.

  Note that in this case, anyone in possession of the password can tamper
  with the message, therefore it is recommended to not mix password- and
  public key recipients.

Options:
  -i, --infile FILENAME
  -o, --outfile FILENAME
  -p, --password
  -a, --ascii
  --help                  Show this message and exit.

Decryption

$ pyage decrypt --help
Usage: pyage decrypt [OPTIONS] [KEYFILES]...

  Decrypt a file encrypted with 'age encrypt'.

  Ciphertext can be passed from the standard input stream and from a file.
  Plaintext will by default be written to the standard output stream, but a
  filename can be specified.

  Decryption is attempted with keys from the following locations:
  - Age private keys from 'age generate' in file ~/.config/age/keys.txt
  - Private SSH keys at ~/.ssh/id_*
  - Age private keys in files passed via KEYFILES.

  If the '-p' switch is provided, age will prompt for a password and also
  attempt to decrypt the message with the given password.

Options:
  -i, --infile FILENAME
  -o, --outfile FILENAME
  -p, --password
  -a, --ascii
  --help                  Show this message and exit.

Key Generation

$ pyage generate --help
Usage: pyage generate [OPTIONS]

  Generate a new age private/public key pair.

  If no FILENAME is given, the command outputs the key pair to the standard
  output stream.

  If FILENAME exists, age will warn if the file permissions allow others to
  read, write or execute the file.

Options:
  -o, --outfile FILENAME  Keypair destination
  --help                  Show this message and exit.