Skip to main content

A cross-platform CLI tool to generate QR codes from your terminal

Project description

QRGen — CLI QR Code Generator

A cross-platform command-line tool to generate QR codes directly from your terminal. Works on Windows, macOS, and Linux.

   ██████╗ ██████╗  ██████╗ ███████╗███╗   ██╗
  ██╔═══██╗██╔══██╗██╔════╝ ██╔════╝████╗  ██║
  ██║   ██║██████╔╝██║  ███╗█████╗  ██╔██╗ ██║
  ██║▄▄ ██║██╔══██╗██║   ██║██╔══╝  ██║╚██╗██║
  ╚██████╔╝██║  ██║╚██████╔╝███████╗██║ ╚████║
   ╚══▀▀═╝ ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝

Features

  • 🚀 One commandqrgen <url> and you're done
  • 🎨 Custom colors — set fill and background colors
  • 📐 Adjustable size — control box size and border width
  • 🛡️ Error correction — choose from L, M, Q, H levels
  • 🖥️ Cross-platform — Windows, macOS, Linux
  • 🎯 Zero config — works out of the box

Installation

Prerequisites

  • Python 3.9+ installed on your system
  • pip (comes with Python)

Windows

# Clone the repository
git clone https://github.com/koshal50/Qrcode-Generator.git
cd Qrcode-Generator

# Create virtual environment (optional but recommended)
python -m venv venv
venv\Scripts\activate

# Install the CLI tool
pip install .

macOS / Linux

# Clone the repository
git clone https://github.com/koshal50/Qrcode-Generator.git
cd Qrcode-Generator

# Create virtual environment (optional but recommended)
python3 -m venv venv
source venv/bin/activate

# Install the CLI tool
pip install .

After installation, the qrgen command is available globally in your terminal (or within the active virtual environment).


Usage

Basic Usage

# Generate a QR code for a URL
qrgen https://example.com

# Generate a QR code for any text
qrgen "Hello, World!"

Custom Output

# Save with a custom filename
qrgen https://example.com -o mycode.png

# Save to a specific directory
qrgen https://example.com -d ~/Desktop

Styling

# Custom colors
qrgen https://example.com --fill blue --bg yellow

# Custom size and border
qrgen https://example.com --size 15 --border 2

# High error correction (good for printing)
qrgen https://example.com --ec H

All Options

# Combine everything
qrgen https://example.com -o logo.png -d ~/Desktop --fill darkblue --bg lightyellow --size 12 --border 3 --ec H

CLI Reference

qrgen <data> [options]
Option Short Description Default
data URL or text to encode (required)
--output -o Custom output filename qrcodeN.png
--dir -d Output directory ./output
--fill QR code color black
--bg Background color white
--size Box size in pixels 10
--border Border width in boxes 4
--ec Error correction: L, M, Q, H M
--version -v Show version info
--help -h Show help message

Error Correction Levels

Level Recovery Best For
L ~7% Clean digital displays
M ~15% General purpose (default)
Q ~25% Slightly damaged codes
H ~30% Printed materials, logos

Uninstall

pip uninstall qrcode-generator

License

This project is licensed under the MIT License — see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qrgen_cli-1.0.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qrgen_cli-1.0.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file qrgen_cli-1.0.1.tar.gz.

File metadata

  • Download URL: qrgen_cli-1.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for qrgen_cli-1.0.1.tar.gz
Algorithm Hash digest
SHA256 988fd5a7ed5eb096c22897106034dea21b7865048e81fe18232c64fb8ea19dff
MD5 6e63911291e825889f3472974e34b4de
BLAKE2b-256 8bbb926273916e5378964f48837891e418f9ed753480639c7fac68c6d5a0f0bb

See more details on using hashes here.

File details

Details for the file qrgen_cli-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: qrgen_cli-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for qrgen_cli-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbb9e8357881312209abe16d37f0c5c05efadebc9a79662cc838f6b368bb6ac3
MD5 49ae65efa712d7fdc06b360e95f9e95b
BLAKE2b-256 f3b91b056e5c219be766fa953a3f0b3384f36b0c4b8c44078e48ed300f72f611

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page