Skip to main content

Secure QR CLI

About

Secure QR CLI allows you to easily encrypt any text, encode it into QR code and later decrypt it


License

Licensed under the PolyForm Noncommercial License 1.0.0. Commercial use requires a separate written commercial license agreement from the licensor — contact alex@vir-tec.net.


Key features

  • Encrypt text: Encrypt your text with the password of your choice and encode it into QR
  • Decrypt QR: Decode the QR and decrypt the text using the same password you used when encrypting it

How to run

This is the recommended way for most users.

Requirements

  • Node.js (v22)

Run

npx @extra-wallet/secure-qr

This will:

  • download the CLI on demand,
  • start the interactive terminal UI

Option 2: Run locally from the repository (development)

Use this if you want to:

  • inspect the code,
  • modify the CLI,
  • contribute or debug.

Requirements

  • Node.js (v22)
  • pnpm

1. Install dependencies

From the repository root:

pnpm install

2. Build shared code

cd shared/sdk
pnpm build

3. Return to the root of the repository

cd ../..

4. Build the CLI

cd packages/secure-qr-cli
pnpm build

5. Run locally

npx secure-qr

How to use

The CLI can be run in two modes: interactive and non-interactive

To run the program in interactive mode you just have to follow the instructions of the previous step. In this mode you will be asked for needed inputs step by step.

To run the program in non-interactive mode you have to also specify the command (encode or decode) and arguments using flags like this:

npx secure-qr encode --password="password" --input="text" output="./file.txt"

To get information about every argument and command, you can use help command:

npx secure-qr help
npx secure-qr encode help
npx secure-qr decode help

Encode Arguments

FlagRequiredDescriptionAliases
inputtrueInput text to be encoded in QR or a path to the QR filei
passwordtruePassword which will be used to encode the input. Has to be at least 4 characters longp
outputtrueOutput file for the QR or texto

Encode Output

If encryption and encoding were successful, the QR code will be written to output. If not, you will see a message about the error that occurred.

Decode Arguments

FlagRequiredDescriptionAliases
inputtrueFile with the QR code of encoded texti
passwordtruePassword that was used to encode the text into QR. Has to be at least 4 characters longp
outputfalseThe path to the file where to put the decoded texto

Decode Output

if QR decoding and text decryption are successful, the decrypted text will either be written to output if specified or printed to stdout