{"content":"# aux4/otp\n\nOne-time password (OTP/TOTP) manager for aux4. Create, store, generate, and verify time-based one-time passwords following RFC 6238. OTPs are stored locally in a JSON file and can be imported/exported via standard otpauth:// URLs.\n\n## Installation\n\n``bash\naux4 aux4 pkger install aux4/otp\n`\n\n## Quick Start\n\n`bash\n# Create a new OTP\naux4 otp create --name myapp --issuer \"My App\"\n\n# Generate a code\naux4 otp generate myapp\n\n# Verify a code\naux4 otp verify --name myapp --code 123456\n`\n\n## Commands\n\n### Create a new OTP\n\n`bash\naux4 otp create --name <name> --issuer <issuer> [--otpSecret <secret>] [--algorithm <algorithm>] [--digits <digits>] [--period <period>]\n`\n\nCreates a new TOTP entry. If no secret is provided, one is generated automatically.\n\n### Import from URL\n\n`bash\naux4 otp import <otpauth-url> [--name <name>]\n`\n\nImports an OTP from a standard otpauth://totp/... URL. Optionally override the name.\n\n### Generate a code\n\n`bash\naux4 otp generate <name> [--noCopy true]\n`\n\nGenerates the current TOTP code and copies it to the clipboard. Use --noCopy true to skip the clipboard copy.\n\n### Verify a code\n\n`bash\naux4 otp verify --name <name> --code <code>\n`\n\nVerifies a TOTP code. Succeeds if valid, fails with an error if invalid.\n\n### Get OTP URL\n\n`bash\naux4 otp url <name>\n`\n\nOutputs the otpauth:// URL for the named OTP. Useful for exporting or sharing.\n\n### Display QR code\n\n`bash\naux4 otp qrcode <name> [--large true]\n`\n\nDisplays a QR code in the terminal for the named OTP. Use --large true for a larger QR code.\n\n### List all OTPs\n\n`bash\naux4 otp list\n`\n\nLists all stored OTP names.\n\n### Delete an OTP\n\n`bash\naux4 otp delete <name>\n`\n\nDeletes the named OTP from the storage file.\n\n## Storage\n\nOTPs are stored in ~/.aux4.config/otp by default. Use the --file flag on any command to specify a different location. The file contains a JSON object mapping OTP names to their otpauth:// URLs.\n\n## TOTP Parameters\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| algorithm | SHA1 | HMAC algorithm |\n| digits | 6 | Length of generated code |\n| period | 30 | Time interval in seconds |\n| window | 0` | Verification window tolerance |\n"}