create-fumapress-typeset
v0.1.0
Published
Scaffold a Fumapress (Fumadocs + Waku) docs site with shadcn/typeset typography, customized like the builder at ui.shadcn.com/typeset.
Downloads
7
Maintainers
Readme
create-fumapress-typeset
Scaffold a Fumapress (Fumadocs + Waku) docs site with typography by shadcn/typeset — and customize the typeset the same way the builder at ui.shadcn.com/typeset does.
npm create fumapress-typeset@latest
npx create-fumapress-typeset
pnpm create fumapress-typeset
bunx create-fumapress-typeset
yarn create fumapress-typesetThe interactive flow asks where to create the project, whether to keep the builder's defaults, customize (fonts, size, leading, flow, measure), or shuffle, and whether to install dependencies and init git.
Non-interactive usage
Every prompt has a flag; --yes accepts defaults for the rest:
npx create-fumapress-typeset my-docs \
--heading lora --body inter --mono jetbrains-mono \
--size 16px --leading loose --flow airy --measure 70ch \
--yes --install --git| Flag | Values |
| ---- | ------ |
| --heading, --body, --mono | Any builder font, by slug or name: geist, inter, noto-sans, nunito-sans, figtree, roboto, raleway, dm-sans, public-sans, outfit, oxanium, manrope, space-grotesk, montserrat, ibm-plex-sans, source-sans-3, instrument-sans, noto-serif, roboto-slab, merriweather, lora, jetbrains-mono, geist-mono |
| --size | 14px, 15px, 16px, 18px |
| --leading | tight (1.6), regular (1.75), loose (1.9) — name or value |
| --flow | compact (1em), regular (1.25em), airy (2em) — name or value |
| --measure | 60ch, 70ch, 80ch, 90ch |
| --shuffle | Randomize the typeset, like the builder's Shuffle button |
| --prompt | Print an agent-ready prompt (see below) and exit — no scaffold |
| -y, --yes / --overwrite / --install / --no-install / --git / --no-git / --pm <npm\|pnpm\|yarn\|bun> | General behavior |
What the choices produce
The scaffolder mirrors the builder's output for Vite-based frameworks:
src/typeset.css— the typeset stylesheet, byte-identical to ui.shadcn.com/typeset.css. One CSS file you own; the file itself is the same for every configuration.src/app.css— Fontsource variable-font imports and:rootfont variables for your picks, plus a.typeset-docspreset carrying the six choices, a.typeset-compactpreset, and a.typeset-measureclass with the builder's measure→max-widthmapping (60ch→28em, 70ch→33em, 80ch→37em, 90ch→42em).package.json—@fontsource-variable/*dependencies for exactly the fonts you picked (deduplicated).typeset-prompt.md— the builder's Prompt tab, adapted for Fumapress: one prompt with your picks baked in, to paste into a coding agent. It walks the agent through verifying the install and wiringtypeset typeset-docsinto the surfaces that render markdown (including the Fumadocs docs body viacreateDocsLayoutPageinpress.config.tsx).
--prompt prints that same prompt to stdout without scaffolding, so you can
use it in an existing Fumapress project:
npx create-fumapress-typeset --prompt --heading merriweather --pm bun | pbcopyThe scaffolded project
├── waku.config.ts # Waku/Vite plugins: press(), mdx(), tailwindcss()
├── source.config.ts # Fumadocs MDX content source (content/docs)
├── press.config.tsx # Site config, adapters, plugins
├── typeset-prompt.md # Agent prompt with your typeset picks baked in
├── content/docs/ # Your MDX pages
└── src/
├── app.css # Tailwind + presets + your typeset presets
└── typeset.css # shadcn/typeset — yours to editScaffolded projects require Node.js 22+ (Waku). dev, build, start,
and types:check scripts are preconfigured; flexsearch and llms.txt plugins
are enabled out of the box.
Development
bun install # or npm/pnpm
npm test # node --test — unit + integration (runs the real bin)
node index.js ./tmp-app --yes --no-install --no-git # local runThe template lives in template/ and is published inside the package
(_gitignore is renamed to .gitignore at scaffold time because npm strips
dotfiles). src/typeset.js is the single source of truth for the builder's
data model — fonts, sizes, leadings, flows, measures — and for every
generated file; template/'s static defaults are generated from it too.
