{
  "id": "gnupg",
  "name": "GnuPG",
  "homepage": "https://gnupg.org",
  "description": "A free implementation of the OpenPGP standard: signing, encryption and key management.",
  "icon": "theSVG:gnupg",
  "executables": [
    "gpg",
    "gpg2",
    "gpgconf"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "~/.gnupg/gpg.conf",
      "~/.gnupg/gpg-agent.conf",
      "~/.gnupg/dirmngr.conf",
      "~/.gnupg/scdaemon.conf",
      "~/.gnupg/sshcontrol"
    ],
    "exclude": [
      "~/.gnupg/random_seed",
      "~/.gnupg/S.*",
      "~/.gnupg/*.lock",
      "~/.gnupg/crls.d/",
      "~/.gnupg/public-keys.d/",
      "~/.gnupg/openpgp-revocs.d/",
      "~/.gnupg/pubring.kbx~"
    ],
    "secret": [
      "~/.gnupg/private-keys-v1.d/",
      "~/.gnupg/secring.gpg"
    ],
    "machine_lines": [
      {
        "file": "~/.gnupg/gpg-agent.conf",
        "match": {
          "prefix": [
            "pinentry-program"
          ]
        },
        "scope": "platform"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "GnuPG keys",
    "description": "List, export, import and fetch keys and decrypt files with gpg. Encrypting and signing are not covered because the completion data lacks their file arguments.",
    "quality": "ai-draft",
    "base": "fig:gpg",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/gpg.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "--list-keys"
        ],
        "label": "List public keys",
        "description": "List keys from the public keyrings.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gpg.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "names",
            "label": "Key IDs or names",
            "type": "string",
            "position": 0,
            "multiple": true,
            "description": "Leave empty for all keys.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "with_colons",
            "label": "Machine-readable",
            "type": "boolean",
            "option": [
              "--with-colons"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "fingerprint",
            "label": "Show fingerprints",
            "type": "boolean",
            "option": [
              "--with-fingerprint"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "homedir",
            "label": "GnuPG home",
            "type": "path",
            "option": [
              "--homedir"
            ],
            "path": {
              "kind": "directory",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List keys",
            "fields": [
              "names",
              "fingerprint"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "names",
              "fingerprint"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "with_colons",
              "homedir"
            ]
          }
        ]
      },
      {
        "path": [
          "--export"
        ],
        "label": "Export keys",
        "description": "Export public keys to the terminal or a file.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gpg.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "names",
            "label": "Key IDs or names",
            "type": "string",
            "position": 0,
            "multiple": true,
            "description": "Leave empty for all keys.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "armour",
            "label": "ASCII armour",
            "type": "boolean",
            "option": [
              "--armour",
              "-a"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "output",
            "label": "Output file",
            "type": "path",
            "option": [
              "--output",
              "-o"
            ],
            "path": {
              "kind": "file",
              "role": "output"
            },
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "export",
            "label": "Export armoured",
            "fields": [
              "names",
              "armour",
              "output"
            ],
            "required": [
              "names"
            ],
            "set": {
              "armour": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "names",
              "armour",
              "output"
            ]
          }
        ]
      },
      {
        "path": [
          "--import"
        ],
        "label": "Import keys",
        "description": "Import and merge keys from files.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gpg.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "files",
            "label": "Key files",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "merge_only",
            "label": "Merge only",
            "description": "Do not add new keys to the keyrings.",
            "type": "boolean",
            "option": [
              "--merge-only"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "import",
            "label": "Import",
            "fields": [
              "files"
            ],
            "required": [
              "files"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "files",
              "merge_only"
            ]
          }
        ]
      },
      {
        "path": [
          "--recv-keys"
        ],
        "label": "Fetch keys",
        "description": "Download keys by ID from a keyserver.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gpg.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "ids",
            "label": "Key IDs",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "keyserver",
            "label": "Keyserver",
            "type": "string",
            "option": [
              "--keyserver"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "recv",
            "label": "Fetch",
            "fields": [
              "ids",
              "keyserver"
            ],
            "required": [
              "ids"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "ids",
              "keyserver"
            ]
          }
        ]
      },
      {
        "path": [
          "--decrypt"
        ],
        "label": "Decrypt",
        "description": "Decrypt a file, or stdin when no file is given.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gpg.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "file",
            "label": "Encrypted file",
            "type": "path",
            "path": {
              "kind": "file",
              "role": "input"
            },
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "output",
            "label": "Output file",
            "description": "Defaults to the terminal.",
            "type": "path",
            "option": [
              "--output",
              "-o"
            ],
            "path": {
              "kind": "file",
              "role": "output"
            },
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "decrypt",
            "label": "Decrypt",
            "fields": [
              "file",
              "output"
            ],
            "required": [
              "file"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "file",
              "output"
            ]
          }
        ]
      }
    ]
  }
}
