Help us shape the future of Go! Take the 2026 Go Developer Survey

lfm

module
v0.1.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT

README

lfm

CI codecov Release Go Reference

Sell before you build: one binary and a skill that make your coding agent research real buyers and ship one checked, fast landing page with a payment link.

curl -fsSL https://lfm.cash/install.sh | sh

lfm is an agent-first page compiler. Your coding agent researches real buyers, writes a design concept from what they say, and builds one HTML template with its config and assets. lfm compiles that into a standalone static folder and refuses to ship a page that is broken, slow, inaccessible, invisible to search or full of generic AI design defaults. Every finding says how to fix it.

No framework, no platform, no runtime: one binary, one page, one folder you upload anywhere. No MCP server either: a CLI with --json plus one SKILL.md is the whole agent interface.

Ask your agent

Give any coding agent (Claude Code, Codex, Cursor, OpenCode, Gemini CLI and others) this request:

Make a landing page for my sourdough course with lfm: https://lfm.cash/SKILL.md

SKILL.md tells the agent how to install lfm, set up a project and follow the process. To have every agent session pick it up by itself for requests like "generate me a landing page", install it once as a user skill:

for d in ~/.agents/skills/lfm ~/.claude/skills/lfm; do mkdir -p "$d" && curl -fsSL https://lfm.cash/SKILL.md -o "$d/SKILL.md"; done

~/.agents/skills is read by Codex, Cursor, OpenCode, Gemini CLI and GitHub Copilot; ~/.claude/skills by Claude Code. Keep only the one your agents need.

On Grok Bot, add the lfm.cash bot: it installs lfm on its own computer and runs the same process, asking you only what you decide. Its setup is in docs/grok-bot.md.

Install

The script at the top downloads the release for macOS or Linux (amd64 or arm64), checks it against the release checksums and puts lfm in ~/.local/bin, without sudo. LFM_VERSION=v0.0.2 pins a release and LFM_INSTALL_DIR changes the folder. With Homebrew:

brew install anonyfox/tap/lfm

With Go 1.26 or newer:

go install github.com/Anonyfox/lfm/cmd/lfm@latest

Optional: Chrome or Chromium for lfm compile --release, and Lighthouse for its scores. Missing tools are reported and skipped, never installed.

Start a page

lfm init sourdough-course   # a starter project that compiles cleanly
cd sourdough-course
lfm skills install          # the process skills, where your agent loads them
lfm compile                 # findings, output/ and the next step

Then ask your agent for the page. It works in three phases, each with its own skill:

  1. research: real buyer voices and competitor pages, verbatim and dated, into research/.
  2. design: concept.md from the research: buyer, mechanism, direction, palette, type, imagery, motion and copy, every decision cited to a source.
  3. implementation: the page from concept.md, until lfm compile --release is clean and every saved frame holds up on phone and desktop.

The compiler checks each handover: missing research, an uncited concept or a page that ignores the concept's palette, type and imagery show up as findings. Every report ends with the next step, such as Next (design): write concept.md from the research., and names the skill for it, so an agent working unattended stays on the path. When it says deploy, upload output/ to the URL in lfm.json.

For agents

Command Use
lfm What lfm is, how to start, every command
lfm <command> -h Usage, flags and behaviour of one command
lfm skills The process skills in the order a page needs them
lfm skills <topic> One SKILL.md, rendered for the installed version
lfm skills install All skills into the project's .agents/skills or .claude/skills
lfm compile [--release] [--json] Check and build; the last line is the next step
lfm check <url|folder|file> [--release] [--json] Check any built page from a URL or disk
lfm serve --open Live preview that recompiles on every save
lfm rules [id] Every check, or what one means and how to fix it

lfm skills install updates the folders that already hold lfm skills. Otherwise it writes to .claude/skills when Claude Code runs it or the project has only a .claude folder, and to .agents/skills in every other case; --agents, --claude and --global choose explicitly. Each installed SKILL.md records the lfm version and a digest of its text, so running it again after an update replaces untouched copies and keeps copies the project changed (--force replaces them too). lfm compile never writes skill files. After an upgrade, run the printed lfm skills install command to update each folder with older copies.

lfm compile --json prints the result as one object with errors, warnings, the findings under validation, next (phase, do, skill) and the installed skills. Exit status is 0 when output/ was written, 1 when errors kept it unchanged or there is no project, and 2 for a mistake in the command line.

Made with lfm

lfm.cash is an lfm project in site/, built by an agent through the same three phases: 120 buyer posts and 20 competitor pages, a concept that chose one of ten directions with every decision cited, and a page that compiles with 0 errors and 0 warnings. Its proof section compiles the page an agent wrote from one sentence without lfm; that page and its report are there too.

What a compile guarantees

  • Correct: every template value exists and has the right shape; config mistakes point at their JSON key; links match the declared URLs; HTML parses without browser repairs.
  • Fast: CSS and JS are bundled and minified, small assets inlined, large ones emitted as content-named files, images sized against layout shift, HTML compacted without touching text.
  • Findable and shareable: canonical URL, metadata, headings, structured data and social previews are checked; sitemap and root robots files are generated; preview image sizes come from the real files.
  • Usable: controls have names, labels and focus order work, forms and disclosures behave, text keeps its contrast.
  • Distinct: typical generated-design defaults (stock palettes, eyebrow labels, emoji bullets, icon-card grids and more) and stock phrases of generated copy are reported, with an explicit way to keep one deliberately; the page is held to the palette, typefaces, imagery and phrases its concept.md decided.
  • Sellable: a Stripe Payment Link or Checkout offer shows its price, and the page links the legal pages a purchase needs.
  • Seen whole: --release scrolls the page at phone and desktop sizes, saves every frame and reports empty stretches, sideways scrolling, covered or unreadable text, split values and missing glyphs.
  • Safe to ship: nothing is written until all checks pass, and a failed compile keeps the last good output.

Docs

License

MIT · lfm.cash

Directories

Path Synopsis
cmd
lfm command
Command lfm compiles agent-built sales pages into fast, checked, static output.
Command lfm compiles agent-built sales pages into fast, checked, static output.
internal
aitext
Package aitext estimates whether text-detection tools would flag prose as written by a language model, and says why.
Package aitext estimates whether text-detection tools would flag prose as written by a language model, and says why.
book
Package book checks and builds the book deliverable of an lfm project: a researched concept in deliverables/book/concept.md, chapters written one at a time from it, and the finished EPUB and PDF that buyers download from a page at an unlisted path.
Package book checks and builds the book deliverable of an lfm project: a researched concept in deliverables/book/concept.md, chapters written one at a time from it, and the finished EPUB and PDF that buyers download from a page at an unlisted path.
buildid
Package buildid names the lfm binary that is running, for the keys of the files it writes: a file built by another lfm, whose writer may differ, is never taken for one this lfm would write.
Package buildid names the lfm binary that is running, for the keys of the files it writes: a file built by another lfm, whose writer may differ, is never taken for one this lfm would write.
bundle
Package bundle sells two or more of the project's deliverables together, such as a deck with its handouts or a book with its workbook: one name, one listing, one download page or shop listing with every file of each.
Package bundle sells two or more of the project's deliverables together, such as a deck with its handouts or a book with its workbook: one name, one listing, one download page or shop listing with every file of each.
cache
Package cache bounds persistent lfm artifacts in the user cache.
Package cache bounds persistent lfm artifacts in the user cache.
check
Package check analyzes generated HTML without modifying it or fetching URLs.
Package check analyzes generated HTML without modifying it or fetching URLs.
cli
Package cli implements the lfm command line: argument handling, the commands and how their results read in a terminal.
Package cli implements the lfm command line: argument handling, the commands and how their results read in a terminal.
color
Package color parses CSS colors and compares them perceptually in OKLab, with exact WCAG 2 contrast ratios.
Package color parses CSS colors and compares them perceptually in OKLab, with exact WCAG 2 contrast ratios.
commercecheck
Package commercecheck checks public offer snapshots without contacting Stripe.
Package commercecheck checks public offer snapshots without contacting Stripe.
compile
Package compile turns an lfm project into a deployable output folder.
Package compile turns an lfm project into a deployable output folder.
concept
Package concept reads concept.md, the handover from the design phase to implementation, and checks it against the research it must stand on.
Package concept reads concept.md, the handover from the design phase to implementation, and checks it against the research it must stand on.
dataurl
Package dataurl encodes resources as data URLs, choosing the representation that compresses best for SVG and base64 for everything else.
Package dataurl encodes resources as data URLs, choosing the representation that compresses best for SVG and base64 for everything else.
deck
Package deck is the slide deck deliverable: decks a buyer presents from PowerPoint, Keynote or Google Slides, such as a yearly safety briefing, a workshop or a quiz night, sold for what they say as much as how they look.
Package deck is the slide deck deliverable: decks a buyer presents from PowerPoint, Keynote or Google Slides, such as a yearly safety briefing, a workshop or a quiz night, sold for what they say as much as how they look.
deliver
Package deliver holds what every deliverable a page sells shares: the unlisted folder its files are served from, file names, and the download page buyers land on after paying.
Package deliver holds what every deliverable a page sells shares: the unlisted folder its files are served from, file names, and the download page buyers land on after paying.
diagnostic
Package diagnostic defines the shared compiler diagnostic format.
Package diagnostic defines the shared compiler diagnostic format.
document
Package document is the editable document deliverable: letters, invoices, minutes, programs, binders, contracts and any other document a buyer fills in Word, Google Docs, Pages or LibreOffice, and slide decks with speaker notes for PowerPoint, Keynote and Google Slides.
Package document is the editable document deliverable: letters, invoices, minutes, programs, binders, contracts and any other document a buyer fills in Word, Google Docs, Pages or LibreOffice, and slide decks with speaker notes for PowerPoint, Keynote and Google Slides.
fontcheck
Package fontcheck inspects font containers and CSS without loading glyphs, decompressing font payloads, executing code, or accessing the network.
Package fontcheck inspects font containers and CSS without loading glyphs, decompressing font payloads, executing code, or accessing the network.
formula
Package formula parses, prints and evaluates the spreadsheet formulas lfm builds: the portable subset Excel 2019+, Google Sheets and LibreOffice all compute the same way.
Package formula parses, prints and evaluates the spreadsheet formulas lfm builds: the portable subset Excel 2019+, Google Sheets and LibreOffice all compute the same way.
golden
Package golden holds tests to the exact output they produced before: a manifest of every file, and of every entry inside an archive, with its size and content hash, or a text as it reads, kept in testdata/golden.
Package golden holds tests to the exact output they produced before: a manifest of every file, and of every entry inside an archive, with its size and content hash, or a text as it reads, kept in testdata/golden.
htmlcompact
Package htmlcompact shrinks serialized HTML syntax without touching text, comments or raw content, and proves every result by comparing parsed trees.
Package htmlcompact shrinks serialized HTML syntax without touching text, comments or raw content, and proves every result by comparing parsed trees.
htmlx
Package htmlx holds the small x/net/html node operations shared by the compiler, the document checks and the release audits.
Package htmlx holds the small x/net/html node operations shared by the compiler, the document checks and the release audits.
imaging
Package imaging reads bounded image metadata, never pixel buffers or networks.
Package imaging reads bounded image metadata, never pixel buffers or networks.
jsonldcheck
Package jsonldcheck delegates JSON-LD expansion to JSON-goLD.
Package jsonldcheck delegates JSON-LD expansion to JSON-goLD.
jsonsrc
Package jsonsrc indexes authored JSON documents by field path so diagnostics can point at the exact key that caused them.
Package jsonsrc indexes authored JSON documents by field path so diagnostics can point at the exact key that caused them.
markup
Package markup is the Markdown every editable deliverable is written in: front matter, blocks, the ::: directives, ==fields== the buyer replaces, and the language's typography, so authors type plain text and documents and decks read the same source the same way.
Package markup is the Markdown every editable deliverable is written in: front matter, blocks, the ::: directives, ==fields== the buyer replaces, and the language's typography, so authors type plain text and documents and decks read the same source the same way.
office
Package office runs LibreOffice headless to see a file the way another office app does: one soffice run converts a batch of files.
Package office runs LibreOffice headless to see a file the way another office app does: one soffice run converts a batch of files.
ooxml
Package ooxml puts Office Open XML parts into the order the schemas require.
Package ooxml puts Office Open XML parts into the order the schemas require.
paper
Package paper holds the paper sizes editable files print on, and which a language prints on by default.
Package paper holds the paper sizes editable files print on, and which a language prints on by default.
pdfx
Package pdfx reads and stamps the PDFs Chrome prints for lfm: page counts, outline targets, transparency and the provenance stamp that lets a later compile reuse a print.
Package pdfx reads and stamps the PDFs Chrome prints for lfm: page counts, outline targets, transparency and the provenance stamp that lets a later compile reuse a print.
printable
Package printable is the printable deliverable: a planner, tracker, game or puzzle pack written as one HTML template of fixed-size pages, rendered for every paper size and variant the concept names, checked page by page, and printed to PDFs a buyer prints at home or imports into a note app.
Package printable is the printable deliverable: a planner, tracker, game or puzzle pack written as one HTML template of fixed-size pages, rendered for every paper size and variant the concept names, checked page by page, and printed to PDFs a buyer prints at home or imports into a note app.
project
Package project resolves an lfm project on disk: its fixed layout, the boundary that every source read must stay inside, and its configuration.
Package project resolves an lfm project on disk: its fixed layout, the boundary that every source read must stay inside, and its configuration.
release
Package release performs optional, isolated browser work outside the fast build.
Package release performs optional, isolated browser work outside the fast build.
research
Package research reads a project's research files, checks their format and substance, and summarizes them.
Package research reads a project's research files, checks their format and substance, and summarizes them.
scaffold
Package scaffold creates a new project: the smallest set of files that compiles cleanly and shows an agent where everything goes.
Package scaffold creates a new project: the smallest set of files that compiles cleanly and shows an agent where everything goes.
scratch
Package scratch owns temporary working directories and stale temp cleanup.
Package scratch owns temporary working directories and stale temp cleanup.
serve
Package serve previews compiled pages and recompiles them on every change.
Package serve previews compiled pages and recompiles them on every change.
skills
Package skills holds the process guides lfm hands to agents.
Package skills holds the process guides lfm hands to agents.
spreadsheet
Package spreadsheet is the spreadsheet deliverable: budget, bookkeeping and tracker templates described in workbook.json, built as .xlsx files per edition, computed and checked by lfm's own formula engine on every compile and, when installed, by LibreOffice on a release, and delivered with a Google Sheets copy link the owner creates once.
Package spreadsheet is the spreadsheet deliverable: budget, bookkeeping and tracker templates described in workbook.json, built as .xlsx files per edition, computed and checked by lfm's own formula engine on every compile and, when installed, by LibreOffice on a release, and delivered with a Google Sheets copy link the owner creates once.
stock
Package stock knows the defaults text-to-page generators fall back to: accent colors, house palettes and typefaces.
Package stock knows the defaults text-to-page generators fall back to: accent colors, house palettes and typefaces.
target
Package target reads a built page and its embedded resources for page checks.
Package target reads a built page and its embedded resources for page checks.
templatecheck
Package templatecheck validates JSON/template bindings before HTML rendering.
Package templatecheck validates JSON/template bindings before HTML rendering.
term
Package term renders plain, readable terminal output: optional color, aligned columns, wrapped paragraphs and human units.
Package term renders plain, readable terminal output: optional color, aligned columns, wrapped paragraphs and human units.
testproject
Package testproject builds the small projects lfm's tests compile: one per deliverable, and bundles of them, each in a fresh temp directory.
Package testproject builds the small projects lfm's tests compile: one per deliverable, and bundles of them, each in a fresh temp directory.
testtmp
Package testtmp gives a package's tests a temp directory of their own: working files and caches stay isolated from the user.
Package testtmp gives a package's tests a temp directory of their own: working files and caches stay isolated from the user.
theme
Package theme is the look lfm gives every editable file of a product: the faces, colors and typesetting a concept's Look decides, on a quiet base for what it leaves open, the color math its checks need, and the DrawingML theme part Word and PowerPoint read, so a set's documents and decks match.
Package theme is the look lfm gives every editable file of a product: the faces, colors and typesetting a concept's Look decides, on a quiet base for what it leaves open, the color math its checks need, and the DrawingML theme part Word and PowerPoint read, so a set's documents and decks match.
typeface
Package typeface reads the font files a deliverable ships and embeds: what each face is, how wide its text runs, whether it draws a character, and the forms Word (obfuscated TrueType) and PowerPoint (Embedded OpenType) embed, each compressed once per compile.
Package typeface reads the font files a deliverable ships and embeds: what each face is, how wide its text runs, whether it draws a character, and the forms Word (obfuscated TrueType) and PowerPoint (Embedded OpenType) embed, each compressed once per compile.
urlcheck
Package urlcheck supplies shared, offline URL policy for config and HTML.
Package urlcheck supplies shared, offline URL policy for config and HTML.
zipx
Package zipx writes the ZIP archives lfm ships (EPUB, .docx, .pptx, .xlsx, download and shop ZIPs) the way the strictest readers want them: every entry carries its sizes in its header, no data descriptors, no extra fields, UTF-8 names flagged, one fixed timestamp, so the same input gives the same bytes.
Package zipx writes the ZIP archives lfm ships (EPUB, .docx, .pptx, .xlsx, download and shop ZIPs) the way the strictest readers want them: every entry carries its sizes in its header, no data descriptors, no extra fields, UTF-8 names flagged, one fixed timestamp, so the same input gives the same bytes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL