qrcode-terminal
Render QR codes as ASCII art directly in a terminal or console
Repository Health
Technical Analysis
qrcode-terminal is a small Node.js library that generates a QR code and prints it as ASCII/ANSI art straight to standard output, so a URL or piece of text can be scanned directly off a terminal window instead of being rendered to an image file. It exposes a simple qrcode.generate(text) call for programmatic use plus a globally-installable CLI binary for ad-hoc use from the command line.
It’s most widely known as the library behind the QR code shown by tools like the npm CLI’s web-based login flow, and is commonly reached for by CLI tools and dev servers (Expo, ngrok-style tunnels, pairing flows) that need to hand a URL to a phone without leaving the terminal.
What You Get
- A
generate(text, [opts], [callback])function that prints (or returns via callback) a QR code as terminal text - A
qrcode-terminalCLI binary usable directly or via stdin (echo url | qrcode-terminal) - Configurable error-correction level via
setErrorLevel() - A
smalloption for a more compact QR rendering suited to narrower terminals - Cross-platform support for macOS, Linux, and Windows terminals
Common Use Cases
- CLI tools and dev servers that display a URL as a scannable QR code for mobile pairing (e.g. Expo, local dev servers, auth flows)
- Authentication flows like npm’s web-based login that show a QR code in the terminal instead of opening a browser
- Quick ad-hoc sharing of a URL or short text from the command line via the bundled CLI
- Embedding QR output inside larger CLI tools’ terminal UIs
Under The Hood
Architecture: The library is a thin wrapper (lib/main.js) around a bundled QR-encoding implementation in vendor/, converting the encoded QR matrix into terminal block characters; the bin/qrcode-terminal.js script is a small CLI wrapper around that same generate() call, reading from process.argv or stdin. Tech Stack: Plain JavaScript with zero runtime dependencies, tested with mocha/expect.js/sinon and linted with jshint. Code Quality: The test/ directory covers the core generation and error-level API; the project has been stable and dependency-free since its last release in 2018, reflecting a finished, low-churn utility rather than actively evolving software. API Design: The API is intentionally tiny — one generate() call with an optional callback and options object — which is why it’s frequently pulled into much larger CLIs (npm, Expo, tunneling tools) as a one-off dependency for a single feature.
Used by 4 apps in this directory
AionUi
AI Agents · Productivity
Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.
NemoClaw
AI Agents · AI Development
Run AI coding agents like OpenClaw and Hermes securely inside NVIDIA OpenShell sandboxes with a hardened blueprint, routed inference, and lifecycle management through a single CLI.
OpenViking
Databases · AI Development
An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.
SurfSense
Search · AI Assistants
The open-source, unlimited NotebookLM alternative with real-time collaboration, a desktop app, and no vendor lock-in.