---
type: Attested Computation
title: qr
identifier: image/qr
description: 'Make a QR code (PNG or SVG) for a link or any text, computed locally with segno and no network: what it encodes never leaves the container. Text that is a secret (an invite link, a Wi-Fi password) goes on stdin, not in text=: params are written into every receipt in plain text, stdin only as a hash. Prints the code''s version and size, and with show=true the code itself, drawn in the terminal.'
pack: image
tags:
- media
runtime: fragletc
image: ofthemachine/python3@sha256:1a6a8e9cd91c93359794245e2a36b883ee54dfef06356ff8be1d4d863ee3823a
network: none
stdin: buffer
execution_class: hermetic
procedure_hash: sha256:2082c311e3391775ec7c9bacb86b7c8a6254d044f6861b3b00f524e390c590e2
parameters:
- name: text
  type: string
  required: false
  description: What the code encodes (or pipe it on stdin, which a secret must use)
- name: format
  type: string
  required: false
  default: png
  description: png (raster) or svg (vector)
- name: scale
  type: string
  required: false
  default: '8'
  description: Pixels per module (the code's smallest square)
- name: border
  type: string
  required: false
  default: '4'
  description: Quiet zone around the code, in modules (scanners want 4)
- name: error
  type: string
  required: false
  default: M
  description: 'Error correction: L 7%, M 15%, Q 25%, H 30% of the code may be lost and still scan'
- name: show
  type: string
  required: false
  default: 'false'
  description: Also draw the code on stdout with text blocks, to scan from a terminal
computation: https://tools.ofthemachine.com/image/qr.py
executor:
  resource: https://github.com/ofthemachine/fraglet
  receipt:
  - schema
  - fragletc
  - procedure
  - procedure_hash
  - image
  - image_digest
  - network
  - stdin_mode
  - params
  - inputs
  - argv
  - env
  - memo_key
  - started
  - finished
  - exit_code
  - stdout
  - outputs
  format: fraglet-receipt/2 (fragletc --receipt <path>, or FRAGLETC_RECEIPT_DIR)
attester:
  resource: https://tools.ofthemachine.com/receipt/attest.py
  method: 'deterministic, no re-execution: procedure_hash equals sha256 of computation; memo_key recomputes from the receipt''s own fields; claimed params and any artifact hash match the receipt'
generated:
  by: process:tools/catalog/compile.py
  at: '2026-11-13T18:27:40Z'
outputs:
- qr.png:optional
- qr.svg:optional
---

# qr

Make a QR code (PNG or SVG) for a link or any text, computed locally with segno and no network: what it encodes never leaves the container. Text that is a secret (an invite link, a Wi-Fi password) goes on stdin, not in text=: params are written into every receipt in plain text, stdin only as a hash. Prints the code's version and size, and with show=true the code itself, drawn in the terminal.

Use when the user wants a QR code, a scannable link, or a printable code for a URL, an invite, Wi-Fi details or any short text.

# Schema

## Parameters
- `text` (string, optional) — What the code encodes (or pipe it on stdin, which a secret must use)
- `format` (string, optional, default `png`) — png (raster) or svg (vector)
- `scale` (string, optional, default `8`) — Pixels per module (the code's smallest square)
- `border` (string, optional, default `4`) — Quiet zone around the code, in modules (scanners want 4)
- `error` (string, optional, default `M`) — Error correction: L 7%, M 15%, Q 25%, H 30% of the code may be lost and still scan
- `show` (string, optional, default `false`) — Also draw the code on stdout with text blocks, to scan from a terminal
- stdin (optional) — piped input is read in full and hashed into the run's receipt

## Outputs
- `qr.png:optional` (declared file under /output)
- `qr.svg:optional` (declared file under /output)

# Execution

The computation is [`image/qr.py`](https://tools.ofthemachine.com/image/qr.py) (frontmatter `computation`; in `tools.tar.gz` the same file sits at `image/qr.py` beside this bundle), run by `fragletc` in `ofthemachine/python3@sha256:1a6a8e9cd91c93359794245e2a36b883ee54dfef06356ff8be1d4d863ee3823a` with network `none`. Its identity is `procedure_hash` = sha256 of that file, shebang included — the same value every receipt records. Parameters are passed as `-p name=value`; `--receipt run.json` (or `FRAGLETC_RECEIPT_DIR`) writes the receipt, a `fraglet-receipt/2` JSON document with the fields listed under `executor.receipt`.

# Attestation

A run's receipt is attested with [`receipt/attest.py`](https://tools.ofthemachine.com/receipt/attest.py): the computation that ran is this script (`procedure_hash`), the receipt is internally consistent (`memo_key` recomputes from its own fields), the claimed parameters are the ones that ran, and an artifact claimed as an output hashes to what the receipt recorded. No re-execution: attestation is provenance fidelity, not reproduction.

Hermetic: no network, so `memo_key` also fully determines the outputs — a re-run with the same inputs must reproduce them, which makes results from this tool safely memoizable.

Skill: [SKILL.md](https://tools.ofthemachine.com/image/SKILL.md)
