/yubikey-manager

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

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

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.

Note
This project is in BETA. Any part of the application may change before the next release, and some functionality and documentation is missing at this point.

Usage

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

  Configure your YubiKey via the command line.

Options:
  -v, --version
  -h, --help     Show this message and exit.

Commands:
  info     Show general information.
  mode     Manage connection modes.
  oath     Manage YubiKey OATH credentials.
  openpgp  Manage YubiKey OpenPGP functionality.
  piv      Manage YubiKey PIV functionality.
  slot     Manage YubiKey Slots.

Installation

Ubuntu

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

macOS

$ brew install ykman

Or from source:

$ brew install swig ykpers libu2f-host libusb
$ pip install --user yubikey-manager

Pip

$ pip install yubikey-manager

In order for the pip package to work libu2f-host, ykpers and libusb need to be installed on your system as well.

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)