Quickstart¶
This page takes you from install to a scannable code in a couple of minutes — in both the library and the CLI. For the full option list see the CLI reference and API reference.
Install¶
cuere needs Python 3.13+. The core depends only on segno, typer, and Rich.
Your first QR code¶
show() prints; render() returns the string so you can put it wherever you
like (a log line, a TUI widget, a file).
Rendering modes¶
cuere defaults to compact Unicode half-blocks. Two more modes are available
— block (two full-width chars per module: chunky but maximally robust) and
ansi (half-blocks with theme-proof colors):
See Rendering & scanning for how the modes differ, the error-correction rationale, and how to check a code fits the terminal.
A wallet URI¶
cuere builds validated payment-request URIs and can shrink the bech32 ones so the code stays small:
There are builders for Lightning (lightning_uri) and Ethereum
(ethereum_uri, erc20_transfer_uri) too — see the
Wallet URIs cookbook.
With Rich¶
cuere.rich.QRCode is a Rich renderable, so it composes with panels, tables,
and justify:
from rich.console import Console
from rich.panel import Panel
from cuere.rich import QRCode
Console().print(Panel(QRCode("bitcoin:BC1Q..."), title="scan to pay"), justify="center")
CLI vs API — which to use¶
| You want to… | Use |
|---|---|
| Show a code in a script or a one-off shell command | the CLI (cuere …) |
| Embed a code in your own Python program | render() / show() |
| Lay a code out with panels/tables/centering | cuere.rich.QRCode |
| Build & validate a wallet payment URI | bitcoin_uri() / lightning_uri() / ethereum_uri() |
| Export an SVG or PNG file | save() / render_bytes() |
Next steps¶
- Rendering & scanning — modes, EC level, fit checks, Micro QR.
- Terminal colors — ANSI color customization.
- Wallet URIs and Exporting cookbooks.
- API reference — every public symbol.