It’s assumed a Python 3 environment with pip is installed. Additionally, the project uses poetry as its build tool; install that as well.
Make sure the swig executable is in your PATH.
brew install swig
sudo apt install swig libu2f-udev pcscd libpcsclite-dev
Clone the repository:
git clone https://github.com/Yubico/yubikey-manager.git cd yubikey-manager
Install via poetry:
Show available commands:
poetry run ykman --help
Show information about inserted YubiKey:
poetry run ykman info
Run ykman in DEBUG mode:
poetry run ykman --log-level DEBUG info
To use these:
pip install pre-commit black flake8 bandit mypy pre-commit install
To run unit tests:
poetry run pytest
|ONLY run these on dedicated developer keys, as it will permanently delete data on the device(s)!|
To run integration tests, indicate the serial number (given by
ykman list) of
the YubiKey to test with. Make sure no other YubiKey is connected when running
poetry run pytest --device 123456
To run the tests over NFC, place the YubiKey to test on an NFC reader, and indicate both the reader and the serial number of the YubiKey:
poetry run pytest --reader HID --device 123456
The integration test suite will automatically identify which test cases can be run with the attached YubiKey.
For third-party packaging, use the source releases and signatures available here.