{
  "id": "google-authenticator-libpam",
  "name": "Google Authenticator PAM module",
  "homepage": "https://github.com/google/google-authenticator-libpam",
  "description": "Example PAM module demonstrating two-factor authentication for logging into servers via SSH, OpenVPN, etc.",
  "executables": [
    "google-authenticator"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.google_authenticator"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Set up one-time passcodes",
    "description": "Create ~/.google_authenticator for the current user with non-interactive options. Rate limit and window tuning beyond the basics are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://raw.githubusercontent.com/google/google-authenticator-libpam/master/man/google-authenticator.1",
        "revision": "master 2026-10-27",
        "evidence": "-c, --counter-based\n-t, --time-based\n-w, --window-size=W\n-W, --minimal-window\n-D, --allow-reuse, -d, --disallow-reuse\n-s, --secret=FILE\n-f, --force\n-l, --label=LABEL\n-i, --issuer=ISSUER\n-Q, --qr-mode=none|ansi|utf8\n-e, --emergency-codes=N\n-q, --quiet\n"
      }
    ],
    "field": [
      {
        "id": "mode",
        "label": "Token type",
        "type": "boolean",
        "option": [
          "--time-based",
          "-t"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "disallow_reuse",
        "label": "Disallow token reuse",
        "type": "boolean",
        "option": [
          "--disallow-reuse",
          "-d"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "force",
        "label": "Write without asking",
        "type": "boolean",
        "option": [
          "--force",
          "-f"
        ],
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      },
      {
        "id": "label",
        "label": "Label",
        "type": "string",
        "option": [
          "--label",
          "-l"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "issuer",
        "label": "Issuer",
        "type": "string",
        "option": [
          "--issuer",
          "-i"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "window_size",
        "label": "Window size",
        "description": "Between 1 and 21.",
        "type": "integer",
        "option": [
          "--window-size",
          "-w"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "secret",
        "label": "Secret file",
        "type": "path",
        "option": [
          "--secret",
          "-s"
        ],
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      },
      {
        "id": "qr_mode",
        "label": "QR code mode",
        "type": "enum",
        "option": [
          "--qr-mode",
          "-Q"
        ],
        "choices": [
          {
            "value": "none",
            "label": "None"
          },
          {
            "value": "ansi",
            "label": "ANSI"
          },
          {
            "value": "utf8",
            "label": "UTF-8"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "emergency_codes",
        "label": "Emergency codes",
        "type": "integer",
        "option": [
          "--emergency-codes",
          "-e"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "totp",
        "label": "Time-based setup",
        "set": {
          "mode": [
            true
          ],
          "disallow_reuse": [
            true
          ]
        },
        "fields": [
          "mode",
          "disallow_reuse",
          "force",
          "label",
          "issuer",
          "window_size",
          "qr_mode",
          "emergency_codes",
          "secret"
        ],
        "required": []
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "mode",
          "disallow_reuse",
          "force",
          "label",
          "issuer",
          "qr_mode"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "window_size",
          "emergency_codes",
          "secret"
        ]
      }
    ]
  }
}
