LearnCard CLI is an easy to use node REPL that instantiates a Learn Card wallet for you and gives you all the tools you need to easily play around with the Learn Card SDK!
Usage
npx@learncard/cli# Optionally specify a deterministic seed to instantiate the wallet withnpx@learncard/cli1b498556081a298261313657c32d5d0a9ce8285dc4d659e6787392207e4a7ac2
Holder Continuity Export
The CLI also provides REPL helpers from @learncard/holder-continuity for holder-controlled continuity exports. These helpers create a standard ZIP with a readable manifest and encrypted payload files for keys, credentials, presentations, consent records, and status-list snapshots.
getLearnCardBundlePassword() prompts without echoing the password into the REPL, which avoids saving it in REPL history. You can still pass a password string directly for local scripts.
restoreLearnCardFromBundle(...) decrypts the exported seed and returns a wallet with the original DID. It does not upload bundle payloads or recreate index records; use importLearnCardBundle(...) when copying credentials into another wallet.
If you omit the first argument, the CLI exports the default learnCard wallet it created at startup:
Lower-level helpers are also available in the REPL:
For the data model and portability caveats, see Holder Continuity and the @learncard/holder-continuity package BUNDLE_SPEC.md.
Getting Started
Run npx @learncard/cli to boot up the CLI - you should see this screen in your terminal!
From within the CLI, you should be able to start playing around with a basic LearnCard. When the CLI boots up, it creates a default LearnCard called learnCard that you can interact with.
Basic Usage
View your wallet's DID
One of the easiest ways to interact with your LearnCard is to get its DID:
If your LearnCard is initialized to support more DID methods, such as did:web, you could retrieve the corresponding DID through this function.
Now, take the signedVerifiableCredential you created in the VC issuance flow above, and try wrapping it into a Verifiable Presentation, and verifying it.
Initialize more LearnCards
At any point, you can initialize additional LearnCards in the CLI, which can be helpful for testing cross-wallet flows: