{"id":13680814,"url":"https://github.com/Yubico/yubikey-manager","last_synced_at":"2025-04-30T00:30:50.527Z","repository":{"id":39601116,"uuid":"62567919","full_name":"Yubico/yubikey-manager","owner":"Yubico","description":"Python library and command line tool for configuring any YubiKey over all USB interfaces.","archived":false,"fork":false,"pushed_at":"2025-04-29T07:55:18.000Z","size":5150,"stargazers_count":935,"open_issues_count":46,"forks_count":134,"subscribers_count":63,"default_branch":"main","last_synced_at":"2025-04-29T23:38:19.949Z","etag":null,"topics":["fido2","oath","openpgp","otp","piv","python","u2f","webauthn","yubikey"],"latest_commit_sha":null,"homepage":"https://developers.yubico.com/yubikey-manager/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yubico.png","metadata":{"files":{"readme":"README.adoc","changelog":"NEWS","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-07-04T14:23:53.000Z","updated_at":"2025-04-28T15:29:01.000Z","dependencies_parsed_at":"2023-11-23T11:27:24.928Z","dependency_job_id":"6af62520-7b0e-4346-bf72-22aaab76ee9b","html_url":"https://github.com/Yubico/yubikey-manager","commit_stats":{"total_commits":2216,"total_committers":37,"mean_commits":"59.891891891891895","dds":0.5681407942238268,"last_synced_commit":"e83d13d7fecc80aca8e8b8aa99cedf7663a06b83"},"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yubico%2Fyubikey-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yubico%2Fyubikey-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yubico%2Fyubikey-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yubico%2Fyubikey-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yubico","download_url":"https://codeload.github.com/Yubico/yubikey-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251607410,"owners_count":21616753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fido2","oath","openpgp","otp","piv","python","u2f","webauthn","yubikey"],"created_at":"2024-08-02T13:01:22.303Z","updated_at":"2025-04-30T00:30:50.511Z","avatar_url":"https://github.com/Yubico.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"== YubiKey Manager CLI\nimage:https://github.com/Yubico/yubikey-manager/actions/workflows/source-package.yml/badge.svg[\"Source package build\", link=\"https://github.com/Yubico/yubikey-manager/actions/workflows/source-package.yml\"]\nimage:https://github.com/Yubico/yubikey-manager/actions/workflows/windows.yml/badge.svg[\"Windows build\", link=\"https://github.com/Yubico/yubikey-manager/actions/workflows/windows.yml\"]\nimage:https://github.com/Yubico/yubikey-manager/actions/workflows/macOS.yml/badge.svg[\"MacOS build\", link=\"https://github.com/Yubico/yubikey-manager/actions/workflows/macOS.yml\"]\nimage:https://github.com/Yubico/yubikey-manager/actions/workflows/ubuntu.yml/badge.svg[\"Ubuntu build\", link=\"https://github.com/Yubico/yubikey-manager/actions/workflows/ubuntu.yml\"]\n\nPython 3.8 (or later) library and command line tool for configuring a YubiKey.\nIf you're looking for a graphical application, check out  https://developers.yubico.com/yubioath-flutter/[Yubico Authenticator].\n\n=== Usage\nFor more usage information and examples, see the https://docs.yubico.com/software/yubikey/tools/ykman/Using_the_ykman_CLI.html[YubiKey Manager CLI User Manual].\n\n....\nUsage: ykman [OPTIONS] COMMAND [ARGS]...\n\n  Configure your YubiKey via the command line.\n\n  Examples:\n\n    List connected YubiKeys, only output serial number:\n    $ ykman list --serials\n\n    Show information about YubiKey with serial number 0123456:\n    $ ykman --device 0123456 info\n\nOptions:\n  -d, --device SERIAL             specify which YubiKey to interact with by serial number\n  -r, --reader NAME               specify a YubiKey by smart card reader name (can't be used with --device or list)\n  -l, --log-level [ERROR|WARNING|INFO|DEBUG|TRAFFIC]\n                                  enable logging at given verbosity level\n  --log-file FILE                 write log to FILE instead of printing to stderr (requires --log-level)\n  --diagnose                      show diagnostics information useful for troubleshooting\n  -v, --version                   show version information about the app\n  --full-help                     show --help output, including hidden commands\n  -h, --help                      show this message and exit\n\nCommands:\n  info     show general information\n  list     list connected YubiKeys\n  config   enable or disable applications\n  fido     manage the FIDO applications\n  oath     manage the OATH application\n  openpgp  manage the OpenPGP application\n  otp      manage the YubiOTP application\n  piv      manage the PIV application\n....\n\nThe `--help` argument can also be used to get detailed information about specific\nsubcommands:\n\n    ykman oath --help\n\n=== Versioning/Compatibility\nThis project follows https://semver.org/[Semantic Versioning]. Any project\ndepending on yubikey-manager should take care when specifying version ranges to\nnot include any untested major version, as it is likely to have backwards\nincompatible changes. For example, you should NOT depend on \"\u003e=5\", as it has no\nupper bound. Instead, depend on \"\u003e=5, \u003c6\", as any release before 6 will be\ncompatible.\n\nNote that any private variables (names starting with '_') are not part of the\npublic API, and may be changed between versions at any time.\n\n=== Installation\nYubiKey Manager can be installed independently of platform by using pip (or\nequivalent):\n\n  pip install --user yubikey-manager\n\nOn Linux platforms you will need `pcscd` installed and running to be able to\ncommunicate with a YubiKey over the SmartCard interface. Additionally, you may\nneed to set permissions for your user to access YubiKeys via the HID interfaces.\nMore information available link:doc/Device_Permissions.adoc[here].\n\nSome of the libraries used by yubikey-manager have C-extensions, and may require\nadditional dependencies to build, such as http://www.swig.org/[swig] and\npotentially https://pcsclite.apdu.fr/[PCSC lite].\n\n=== Pre-built packages\nPre-built packages specific to your platform may be available from Yubico or\nthird parties. Please refer to your platforms native package manager for\ndetailed instructions on how to install, if available.\n\n==== Windows\nA Windows installer is available to download from the\nhttps://github.com/Yubico/yubikey-manager/releases/latest[Releases page].\n\n==== MacOS\nA MacOS installer is available to download from the\nhttps://github.com/Yubico/yubikey-manager/releases/latest[Releases page].\n\nAdditionally, packages are available from Homebrew and MacPorts.\n\n===== Input Monitoring access on MacOS\nWhen running one of the `ykman otp` commands you may run into an error such as:\n`Failed to open device for communication: -536870174`. This indicates a problem\nwith the permission to access the OTP (keyboard) USB interface.\n\nTo access a YubiKey over this interface the application needs the `Input\nMonitoring` permission. If you are not automatically prompted to grant this\npermission, you may have to do so manually. Note that it is the _terminal_ you\nare using that needs the permission, not the ykman executable.\n\nTo add your terminal application to the `Input Monitoring` permission list, go\nto `System Preferences -\u003e Security \u0026 Privacy -\u003e Privacy -\u003e Input Monitoring` to\nresolve this.\n\n===== Uninstallation of the MacOS .pkg\nTo uninstall yubikey-manager when installed via the pgk installer, run:\n\n  $ sudo rm -rf /usr/local/bin/ykman /usr/local/ykman\n\n==== Linux\nPackages are available for several Linux distributions by third party package\nmaintainers.\nYubico also provides packages for Ubuntu in the yubico/stable PPA:\n\n  $ sudo apt-add-repository ppa:yubico/stable\n  $ sudo apt update\n  $ sudo apt install yubikey-manager\n\n==== FreeBSD\nAlthough not being officially supported on this platform, YubiKey Manager can be\ninstalled on FreeBSD. It's available via its ports tree or as pre-built package.\nShould you opt to install and use YubiKey Manager on this platform, please be aware\nthat it's **NOT** maintained by Yubico.\n\nTo install the binary package, use `pkg install pyXY-yubikey-manager`, with `pyXY`\nspecifying the version of Python the package was built for, so in order to install\nYubiKey Manager for Python 3.8, use:\n\n  # pkg install py38-yubikey-manager\n\nFor more information about how to install packages or ports on FreeBSD, please refer\nto its official documentation: https://docs.freebsd.org/en/books/handbook/ports[FreeBSD Handbook].\n\nIn order to use `ykman otp` commands, you need to make sure the _uhid(4)_ driver\nattaches to the USB device:\n\n  # usbconfig ugenX.Y add_quirk UQ_KBD_IGNORE\n  # usbconfig ugenX.Y reset\n\nThe correct device to operate on _(ugenX.Y)_ can be determined using\n`usbconfig list`.\n\nWhen using FreeBSD 13 or higher, you can switch to the more modern _hidraw(4)_\ndriver. This allows YubiKey Manager to access OTP HID in a non-exclusive way,\nso that the key will still function as a USB keyboard:\n\n  # sysrc kld_list+=\"hidraw hkbd\"\n  # cat \u003e\u003e/boot/loader.conf\u003c\u003cEOF\n  hw.usb.usbhid.enable=\"1\"\n  hw.usb.quirk.0=\"0x1050 0x0010 0 0xffff UQ_KBD_IGNORE\"  # YKS_OTP\n  hw.usb.quirk.1=\"0x1050 0x0110 0 0xffff UQ_KBD_IGNORE\"  # NEO_OTP\n  hw.usb.quirk.2=\"0x1050 0x0111 0 0xffff UQ_KBD_IGNORE\"  # NEO_OTP_CCID\n  hw.usb.quirk.3=\"0x1050 0x0114 0 0xffff UQ_KBD_IGNORE\"  # NEO_OTP_FIDO\n  hw.usb.quirk.4=\"0x1050 0x0116 0 0xffff UQ_KBD_IGNORE\"  # NEO_OTP_FIDO_CCID\n  hw.usb.quirk.5=\"0x1050 0x0401 0 0xffff UQ_KBD_IGNORE\"  # YK4_OTP\n  hw.usb.quirk.6=\"0x1050 0x0403 0 0xffff UQ_KBD_IGNORE\"  # YK4_OTP_FIDO\n  hw.usb.quirk.7=\"0x1050 0x0405 0 0xffff UQ_KBD_IGNORE\"  # YK4_OTP_CCID\n  hw.usb.quirk.8=\"0x1050 0x0407 0 0xffff UQ_KBD_IGNORE\"  # YK4_OTP_FIDO_CCID\n  hw.usb.quirk.9=\"0x1050 0x0410 0 0xffff UQ_KBD_IGNORE\"  # YKP_OTP_FIDO\n  EOF\n  # reboot\n\n==== From source (for development)\nTo install from source, see the link:doc/Development.adoc[development]\ninstructions.\n\n=== Shell completion\n\nExperimental shell completion for the command line tool is available, provided\nby the underlying CLI library (`click`) but it is not enabled by default. To\nenable it, run this command once (for Bash):\n\n  $ source \u003c(_YKMAN_COMPLETE=bash_source ykman | sudo tee /etc/bash_completion.d/ykman)\n\nMore information on shell completion (including instructions for other shells) is\navailable at:\nhttps://click.palletsprojects.com/en/stable/shell-completion/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYubico%2Fyubikey-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYubico%2Fyubikey-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYubico%2Fyubikey-manager/lists"}