{
  "id": "stoken",
  "name": "stoken",
  "homepage": "https://github.com/stoken-dev/stoken",
  "description": "RSA SecurID-compatible software token for Linux/UNIX systems.",
  "executables": [
    "stoken"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.stokenrc"
    ],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Software token",
    "description": "Show an RSA SecurID-compatible tokencode or import a token into ~/.stokenrc. PIN and password prompts stay interactive; export, show and issue are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "tokencode"
        ],
        "label": "Show tokencode",
        "description": "Print the current or next tokencode of the imported token.",
        "source": [
          {
            "id": "manual",
            "kind": "manual",
            "url": "https://github.com/stoken-dev/stoken/blob/master/stoken.1",
            "revision": "2026-10-27",
            "evidence": "stoken [tokencode] [--stdin] [--force]\n[--next] [opts]\nstoken tokencode --next\n--next\nGenerate the next tokencode instead of the current tokencode.  For a 60-second\n--stdin, -s\nread the password or PIN as single line from standard input.\n--force, -f\nOverride token expiration date checks (for tokencode) or token\n"
          }
        ],
        "field": [
          {
            "id": "next",
            "label": "Next tokencode",
            "description": "Generate the next tokencode instead of the current one.",
            "type": "boolean",
            "option": [
              "--next"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "stdin",
            "label": "Read password or PIN from stdin",
            "type": "boolean",
            "option": [
              "--stdin",
              "-s"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "force",
            "label": "Ignore token expiration",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "effect": "overwrite",
            "sources": [
              "manual"
            ]
          }
        ],
        "task": [
          {
            "id": "current",
            "label": "Current tokencode",
            "fields": []
          },
          {
            "id": "next",
            "label": "Next tokencode",
            "fields": [
              "next"
            ],
            "required": [
              "next"
            ],
            "set": {
              "next": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "next"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "stdin",
              "force"
            ]
          }
        ]
      },
      {
        "path": [
          "import"
        ],
        "label": "Import token",
        "description": "Decode a token string or sdtid file and write it to ~/.stokenrc. Token strings are secrets; prefer a file.",
        "source": [
          {
            "id": "manual",
            "kind": "manual",
            "url": "https://github.com/stoken-dev/stoken/blob/master/stoken.1",
            "revision": "2026-10-27",
            "evidence": "stoken import\n{--file=file | --token=token_string}\n[--force] [opts]\nstoken import --file mytoken.sdtid\nBy default, stoken import will refuse to overwrite an existing token in\n~/.stokenrc.  The --force switch overrides this check.\n"
          }
        ],
        "field": [
          {
            "id": "file",
            "label": "Token file (sdtid)",
            "type": "path",
            "option": [
              "--file"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "manual"
            ]
          },
          {
            "id": "token",
            "label": "Token string",
            "description": "Appears in shell history; prefer a file.",
            "type": "string",
            "option": [
              "--token"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "force",
            "label": "Overwrite existing token",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "effect": "overwrite",
            "sources": [
              "manual"
            ]
          }
        ],
        "task": [
          {
            "id": "from-file",
            "label": "Import from file",
            "fields": [
              "file",
              "force"
            ],
            "required": [
              "file"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "file",
              "token",
              "force"
            ]
          }
        ]
      }
    ]
  }
}
