Skip to content

cuere

QR codes in your terminal — the way Claude Code CLI draws its remote-connection codes: Unicode half-blocks, low error correction so the code stays small, a proper quiet zone. Plus a Rich renderable and helpers for crypto-wallet URIs.

    █▀▀▀▀▀█  ▀▀█▄█  ▄▄▀ ▄ █▀▀▀▀▀█    
    █ ███ █ ▄▀██ ▄ ▀█ ▀ ▄ █ ███ █    
    █ ▀▀▀ █ ▀▄█ ▀ ▄ █ █▀▀ █ ▀▀▀ █    
    ▀▀▀▀▀▀▀ ▀▄▀ █ █ █ ▀▄█ ▀▀▀▀▀▀▀    
    ▀█▄  █▀█ ▀█ ▀ ▄█▀█▄▄▀▄ ▄█▀▄▄     
    ▄█▄▀ █▀▄█▀▄█▀  █▀▀▄ ▀▄  ▀▄       
    ▀▄ ▄▄▄▀▄▀██ ▄█▀██▄▄ █ ██▄  ▄█    
     ▄█▄▄█▀▄▀▄▀ ▄███▀ ▀▄▀▀ ▄█▀█ ▄    
    ▄   ▀ ▀▄ ▄▀ ▀ ▀▄ ▀ █ ▀▄█▄▀█▄▄    
    █▀  █▄▀▀ ▀▄▄▀▀██  ▀▀▄ ▄ ▀▀  ▀    
    ▀ ▀ ▀▀▀ ██ ▀▄▄ ▄ █▄▀█▀▀▀█▄▀▀▀    
    █▀▀▀▀▀█ █▀▄ ▄█▀▀█ ███ ▀ █▀▀ ▄    
    █ ███ █  ▄▀▀▀▀ █▄ ▄███▀▀▀█▄ █    
    █ ▀▀▀ █ ▄ ▀█▀  ▀▄▀▀▀▀▀██▀██▀▄    
    ▀▀▀▀▀▀▀ ▀▀▀▀     ▀ ▀  ▀▀▀ ▀      

Install

uv add cuere            # core
uv add 'cuere[image]'   # + PNG export (pulls in Pillow)

Requires Python 3.13+. The core install is pure-Python and depends only on segno, typer, and Rich.

A first code

from cuere import render, show, fits

show("HELLO")                                   # print to stdout
text = render("HELLO", mode="block", invert=True)  # returns a str
if fits("a long payload..."):                   # fits the terminal?
    show("a long payload...")
cuere "HELLO"                 # render to the terminal
cuere "HELLO" --mode ansi     # colored half-blocks
cuere "HELLO" --output png:qr.png # needs cuere[image]

Scanning

cuere defaults to error-correction level L and a 4-module quiet zone so the code stays compact on screen. If a renderer's contrast fights your terminal theme, try --invert, or --mode ansi with explicit --dark/--light colors. See Terminal colors.

Where to go next