Generate QR codes in your terminal or save them as PNG files.
- Render QR codes in the terminal
- Read input from arguments or stdin
- Save QR codes as PNG files
- Invert colors or use large rendering
Install directly from the public GitHub repo:
npm install -g github:asharahmed/qr-cliIf you prefer GitHub Packages, configure npm for the @asharahmed scope:
npm config set @asharahmed:registry https://npm.pkg.github.comThen install the CLI (GitHub Packages requires auth):
npm install -g @asharahmed/qr-cliqr "https://example.com"
echo "hello world" | qrOptions:
-i, --invertInvert colors (for light terminals)-l, --largeUse large mode (2 chars per module)-o, --output <file>Save as PNG file
Examples:
qr -l "Hello from the terminal"
qr -o code.png "https://example.com"npm install
npm run build
node dist/index.js "hello"Publishing is handled by GitHub Actions using the built-in GITHUB_TOKEN, so a
PAT is not needed. Create a GitHub Release on the repo and the workflow will
publish to GitHub Packages.
MIT