ElBruno.QRCodeGenerator.CLI 1.1.0

dotnet add package ElBruno.QRCodeGenerator.CLI --version 1.1.0
                    
NuGet\Install-Package ElBruno.QRCodeGenerator.CLI -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ElBruno.QRCodeGenerator.CLI" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ElBruno.QRCodeGenerator.CLI" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ElBruno.QRCodeGenerator.CLI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ElBruno.QRCodeGenerator.CLI --version 1.1.0
                    
#r "nuget: ElBruno.QRCodeGenerator.CLI, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ElBruno.QRCodeGenerator.CLI@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ElBruno.QRCodeGenerator.CLI&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ElBruno.QRCodeGenerator.CLI&version=1.1.0
                    
Install as a Cake Tool

ElBruno.QRCodeGenerator

CI Build Publish to NuGet License: MIT GitHub

A family of .NET libraries for QR code generation 🟦

ElBruno.QRCodeGenerator is a suite of .NET libraries for generating QR codes in various formats — from console rendering to image generation. Built for developers who need flexible, easy-to-use QR code tools.

Packages

Package NuGet Downloads Description
ElBruno.QRCodeGenerator.CLI NuGet Downloads Console QR codes with Unicode blocks
ElBruno.QRCodeGenerator.Payloads NuGet Downloads Fluent payload builders (WiFi, vCard, SMS, Geo, Email, URL)
ElBruno.QRCodeGenerator.Svg NuGet Downloads Resolution-independent SVG QR codes
ElBruno.QRCodeGenerator.Image NuGet Downloads PNG/JPEG/WebP bitmap QR codes (SkiaSharp)
ElBruno.QRCodeGenerator.Ascii NuGet Downloads ASCII art QR codes for text output
ElBruno.QRCodeGenerator.Pdf NuGet Downloads PDF documents with embedded QR codes
ElBruno.QRCodeGenerator.Tool NuGet Downloads qrgen global dotnet tool for all formats

ElBruno.QRCodeGenerator.CLI

Generate and display QR codes in the console using Unicode block characters

The CLI package is a lightweight .NET library that creates beautiful QR codes in your terminal with Unicode block characters. Perfect for CLI tools, server logs, and terminal applications.

Features

  • 🎯 Simple API - Generate QR codes with one line of code: QRCode.Print("your text")
  • 🖥️ Console-Optimized - Uses Unicode block characters for perfect 2:1 aspect ratio in terminals
  • 🎨 Theme Support - Built-in light/dark theme support with color inversion
  • 📦 Multi-Target - .NET 8.0 and .NET 10.0 support
  • Battle-Tested - Built on QRCoder, the most popular .NET QR encoder
  • 🔧 Configurable - Adjust error correction, quiet zone, and rendering options

Installation

dotnet add package ElBruno.QRCodeGenerator.CLI

Quick Start

using ElBruno.QRCodeGenerator.CLI;

// Simplest possible usage
QRCode.Print("https://github.com/elbruno");

Get QR Code as String

using ElBruno.QRCodeGenerator.CLI;

// Generate QR code and capture as string
string qrCode = QRCode.Generate("Hello, World!");
Console.WriteLine(qrCode);

Samples

See src/samples/BasicQRCode for the complete CLI example.


ElBruno.QRCodeGenerator.Payloads

Fluent payload builders for WiFi, vCard, Email, SMS, Geo, and URL QR codes

Zero external dependencies — pure string formatting that works with any QR code renderer.

Installation

dotnet add package ElBruno.QRCodeGenerator.Payloads

Quick Start

using ElBruno.QRCodeGenerator.Payloads;

// WiFi network QR code
var wifi = PayloadBuilder.Wifi("MyNetwork", "MyPassword123");
Console.WriteLine(wifi.GetPayloadString());
// Output: WIFI:T:WPA;S:MyNetwork;P:MyPassword123;;

// vCard contact
var vcard = PayloadBuilder.VCard("Bruno Capuano")
    .WithPhone("+1234567890", VCardPhoneType.Mobile)
    .WithEmail("bruno@example.com", VCardEmailType.Work)
    .WithOrganization("Contoso");
Console.WriteLine(vcard.GetPayloadString());

// Combine with any renderer (e.g., CLI)
QRCode.Print(wifi.GetPayloadString());

📂 Full Payloads sample | 📖 API Reference


ElBruno.QRCodeGenerator.Svg

Generate resolution-independent SVG QR codes

Installation

dotnet add package ElBruno.QRCodeGenerator.Svg

Quick Start

using ElBruno.QRCodeGenerator.Svg;

// Generate an SVG QR code
var svg = SvgQRCode.Generate("https://github.com/elbruno");
File.WriteAllText("qrcode.svg", svg);

// Custom colors and sizing
var customSvg = SvgQRCode.Generate("Hello, World!", svgOptions: new SvgOptions
{
    ForegroundColor = "#003366",
    BackgroundColor = "#f0f0f0",
    ModuleSize = 8
});

📂 Full SVG sample | 📖 API Reference


ElBruno.QRCodeGenerator.Image

Generate PNG, JPEG, and WebP QR code bitmaps using SkiaSharp

Installation

dotnet add package ElBruno.QRCodeGenerator.Image

Quick Start

using ElBruno.QRCodeGenerator.Image;

// Save as PNG
byte[] png = ImageQRCode.ToPng("https://github.com/elbruno");
File.WriteAllBytes("qrcode.png", png);

// Save as JPEG with custom quality
byte[] jpg = ImageQRCode.ToJpeg("Hello, World!", quality: 90);
File.WriteAllBytes("qrcode.jpg", jpg);

📂 Full Image sample | 📖 API Reference


ElBruno.QRCodeGenerator.Ascii

Generate QR codes as ASCII art text

Installation

dotnet add package ElBruno.QRCodeGenerator.Ascii

Quick Start

using ElBruno.QRCodeGenerator.Ascii;

// Default block style
AsciiQRCode.Print("https://github.com/elbruno");

// Hash style for text files
var ascii = AsciiQRCode.Generate("Hello!", asciiOptions: new AsciiOptions
{
    Style = AsciiStyle.Hash
});
File.WriteAllText("qrcode.txt", ascii);

📂 Full ASCII sample | 📖 API Reference


ElBruno.QRCodeGenerator.Pdf

Embed QR codes in PDF documents

Installation

dotnet add package ElBruno.QRCodeGenerator.Pdf

Quick Start

using ElBruno.QRCodeGenerator.Pdf;

// Generate a PDF with a QR code
PdfQRCode.Save("https://github.com/elbruno", "qrcode.pdf");

// With title and custom options
PdfQRCode.Save("https://github.com/elbruno", "styled.pdf", pdfOptions: new PdfOptions
{
    Title = "Scan Me!",
    ModuleSize = 3.0
});

📂 Full PDF sample | 📖 API Reference


ElBruno.QRCodeGenerator.Tool

qrgen — global dotnet tool for all QR code formats

Installation

dotnet tool install -g ElBruno.QRCodeGenerator.Tool

Quick Start

# Console output (default)
qrgen "https://github.com/elbruno"

# Save as SVG
qrgen "Hello World" --format svg --output hello.svg

# Save as PNG with custom colors
qrgen "Hello" --format png --output hello.png --fg "#003366" --bg "#f0f0f0"

# ASCII art
qrgen "Hello" --format ascii --ascii-style dot

# PDF with title
qrgen "https://example.com" --format pdf --output qr.pdf --title "Scan Me"

Building from Source

git clone https://github.com/elbruno/ElBruno.QRCodeGenerator.git
cd ElBruno.QRCodeGenerator
dotnet build
dotnet test

Documentation

  • API Reference - Complete API documentation and configuration examples
  • Publishing Guide - How to publish to NuGet (trusted publishing via OIDC)
  • Changelog - Version history and release notes

License

MIT License - see LICENSE for details.

Author

👤 Bruno Capuano (ElBruno)

Acknowledgments

Built with QRCoder — the most popular .NET QR encoder.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 121 4/1/2026
1.0.1 108 3/26/2026
0.5.2 96 3/26/2026
0.5.1 103 3/26/2026

Initial release with console QR code generation using Unicode block characters.