Skip to content

Python library and command line tool for configuring any YubiKey over all USB interfaces.

License

Notifications You must be signed in to change notification settings

jmyreen/yubikey-manager

 
 

Repository files navigation

YubiKey Manager CLI

Build Status Appveyor Status

Python library and command line tool for configuring a YubiKey. If you’re looking for the full graphical application, which also includes the command line tool, it’s here.

Usage

For more usage information and examples, see the YubiKey Manager CLI User Manual.

Usage: ykman [OPTIONS] COMMAND [ARGS]...

  Configure your YubiKey via the command line.

  Examples:

    List connected YubiKeys, only output serial number:
    $ ykman list --serials

    Show information about YubiKey with serial number 0123456:
    $ ykman --device 0123456 info

Options:
  -v, --version
  -d, --device SERIAL
  -l, --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
                                  Enable logging at given verbosity level.
  --log-file FILE                 Write logs to the given FILE instead of standard error; ignored unless --log-level is also set.
  -r, --reader NAME               Use an external smart card reader. Conflicts with --device and list.
  -h, --help                      Show this message and exit.

Commands:
  config   Enable/Disable applications.
  fido     Manage FIDO applications.
  info     Show general information.
  list     List connected YubiKeys.
  mode     Manage connection modes (USB Interfaces).
  oath     Manage OATH Application.
  openpgp  Manage OpenPGP Application.
  otp      Manage OTP Application.
  piv      Manage PIV Application.

Installation

Ubuntu

$ sudo apt-add-repository ppa:yubico/stable
$ sudo apt update
$ sudo apt install yubikey-manager

macOS

$ brew install ykman

Windows

The command line tool is installed together with the GUI version of YubiKey Manager.

Pip

$ pip install yubikey-manager

In order for the pip package to work, ykpers and libusb need to be installed on your system as well. Pyscard is also needed in some form, and if it’s not installed pip builds it using swig and potentially PCSC lite.

Source

To install from source, see the development instructions.

Bash completion

Experimental Bash completion for the command line tool is available, but not enabled by default. To enable it, run this command once:

$ source <(_YKMAN_COMPLETE=source ykman | sudo tee /etc/bash_completion.d/ykman)

About

Python library and command line tool for configuring any YubiKey over all USB interfaces.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.6%
  • Dockerfile 0.4%