No description
Find a file
L30n 617cc815f5 Typst Codenames generator: printable board + cover cards from a word list
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 21:33:33 +02:00
examples Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00
template Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00
tests Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00
.gitignore Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00
lib.typ Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00
LICENSE Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00
PUBLISHING.md Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00
README.md Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00
thumbnail.png Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00
typst.toml Typst Codenames generator: printable board + cover cards from a word list 2026-07-23 21:33:33 +02:00

Codenames — Typst edition

Generate a printable Codenames board (player card + solution card) from a word list — no install, no terminal, just edit and export.

Player card preview

Quick start (no install)

  1. Open typst.app, click Start from template, and search for codenames.
  2. You'll get a working board immediately, rendered from example words.
  3. Edit the words list and the settings at the top of the file to your own game.
  4. Export as PDF.

Quick start (local CLI)

typst init @preview/codenames
cd codenames
typst compile main.typ game.pdf

Then edit main.typ and recompile whenever you change something (typst watch main.typ recompiles live as you save).

Settings reference (codenames-board)

All of these are plain variables at the top of main.typ:

Setting Default Description
words Array of at least grid-size × grid-size words
seed 42 Any whole number — change it to get a different board
grid-size 5 5 for a 5×5 grid, 4 for 4×4, etc.
n-blue 10 Number of blue (team) words
n-assassin 1 Number of assassin (instant-loss) words
shuffle-positions true false keeps words in the order you typed them
title "CODENAMES" Player card title — "" hides it
print-friendly false true for a black & white, ink-saving version

Neutral cards fill the remaining slots automatically (grid-size² n-blue n-assassin).

There's no "randomize on every compile" button — Typst deliberately exposes no clock or entropy source finer than the calendar date to keep compiles reproducible, so the only way to get a new board is to change seed to a different number yourself.

Cover cards

A second function, cover-cards, generates double-sided cut-out cover cards that fit over the word cards (e.g. to add a logo or team color to the back of each card):

#import "@preview/codenames:0.1.0": cover-cards

#show: cover-cards.with(
  color1: "blue",             // front color — a name (see below) or a hex code like "#1a5fa8"
  color2: "tan",               // back color
  label: "TEAM",               // optional text printed on every card
  logo: image("logo.png", fit: "contain"),  // optional image — must be built with `image(...)` yourself,
                                              // so it resolves relative to *your* file
  title: "Cover Cards",         // optional page title
  grid-size: 5,
)

Named colors: blue, darkblue, red, darkred, green, tan, beige, black, white, gray, yellow, orange, purple.

License

MIT-0 — use, modify, and print freely.