Skip to main content

irma cli

irma is an IRMA Swiss knife in the form of a command line executable, supporting the following subcommands:

  • irma server: an IRMA server daemon allowing you to perform IRMA sessions with Yivi apps.
  • irma session: Perform an IRMA disclosure, issuance or signature session, using the builtin IRMA server or a remote irma server
  • irma scheme: Manage IRMA schemes, supporting downloading, updating, verifying, and signing schemes, and IRMA key generation
  • irma request: compose an IRMA session request
  • irma meta: Parse an IRMA metadata attribute and print its contents

Pass -h or --help to any of these subcommands to see usage details and examples.

Installation

See the Getting started guide.

Examples

Perform IRMA sessions on the command line. By default, this starts a IRMA server specfically for one session on port 48680, prints the QR, and prints session results when the session is done:

irma session --disclose pbdf.nijmegen.personalData.fullname
irma session --issue irma-demo.MijnOverheid.ageLower=yes,yes,yes,no
irma session --noqr --request '{"type":"disclosing","content":[{"label":"BSN","attributes":["irma-demo.MijnOverheid.ageLower.over18"]}]}'
irma session --server http://localhost:8088 --authmethod token --key mytoken --disclose irma-demo.MijnOverheid.ageLower.over18

Download an IRMA scheme and then verify its authenticity:

irma scheme download . https://schemes.yivi.app/irma-demo
irma scheme verify irma-demo

This should result in:

Verifying scheme irma-demo

Verification was successful.

Generate an IRMA issuer private-public keypair (of 2048 bits and supporting a maximum of 10 attributes):

cd irma-demo/MijnIssuer
irma scheme issuer keygen # takes a while
ls PublicKeys PrivateKeys

This should result in:

PrivateKeys:
0.xml

PublicKeys:
0.xml

Sign an IRMA scheme after having made modifications:

cd irma-demo
# Make modifications (e.g. add a public key to an issuer with irma scheme issuer keygen)
irma scheme sign
irma scheme verify
Verifying scheme irma-demo

Verification was successful.