---
type: Attested Computation
title: caption
identifier: meme/caption
description: Render a caption onto a meme-cli template. lines is a single "|"-delimited string, one caption per box in order, whatever the box count -- a 1-box template is just "one caption", a 2-box is "top|bottom", an 8-box is "a|b|c|d|e|f|g|h". Run templates.sh show <id> first to check the real box count/order.
pack: meme
tags:
- media
runtime: fragletc
image: ofthemachine/meme@sha256:8a3ac29b110b9471e7688bf8d7bdc12fe83fd49da63a084a3db1a41549b6c57f
network: none
stdin: none
execution_class: hermetic
procedure_hash: sha256:d59b1f6500a589062af0b0f744ac3fc94f85b1d6640c1a44541042baa5e152af
parameters:
- name: template
  type: string
  required: true
  description: meme-cli template id (find with templates.sh search/show)
- name: lines
  type: string
  required: true
  description: Captions joined by |, one per box in template order
computation: https://tools.ofthemachine.com/meme/caption.sh
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:
- meme.png
---

# caption

Render a caption onto a meme-cli template. lines is a single "|"-delimited string, one caption per box in order, whatever the box count -- a 1-box template is just "one caption", a 2-box is "top|bottom", an 8-box is "a|b|c|d|e|f|g|h". Run templates.sh show <id> first to check the real box count/order.

Use when the user wants a meme rendered from a known template with specific captions.

# Schema

## Parameters
- `template` (string, required) — meme-cli template id (find with templates.sh search/show)
- `lines` (string, required) — Captions joined by |, one per box in template order

## Outputs
- `meme.png` (declared file under /output)

# Execution

The computation is [`meme/caption.sh`](https://tools.ofthemachine.com/meme/caption.sh) (frontmatter `computation`; in `tools.tar.gz` the same file sits at `meme/caption.sh` beside this bundle), run by `fragletc` in `ofthemachine/meme@sha256:8a3ac29b110b9471e7688bf8d7bdc12fe83fd49da63a084a3db1a41549b6c57f` 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/meme/SKILL.md)
