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

lfm

module
v0.0.1 Latest Latest
Warning

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

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

README

lfm

Looking for more. Looking for money.

lfm compiles sales pages built by AI agents into fast, checked, standalone static output. The agent writes one HTML template, a little config and its assets; lfm bundles and packs everything into a folder that deploys anywhere, and refuses to ship pages that are 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.

Install

Prebuilt binaries for macOS and Linux (amd64 and arm64) are attached to every release. With Go 1.26 or newer:

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

Use

lfm init my-page        # a starter project that compiles cleanly
cd my-page
lfm serve --open        # live preview, recompiles on every save
lfm compile             # check everything and write output/
lfm compile --release   # also measure in headless Chrome and Lighthouse
lfm rules               # every check; lfm rules <id> explains one

output/ is the finished page: upload it to any static host at the URL configured in lfm.json.

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; preview image sizes are filled in from the real files.
  • Usable: controls have names, labels and focus order work, forms and disclosures behave.
  • Distinct: typical generated-design defaults (stock palettes, eyebrow labels, emoji bullets, icon-card grids and more) are reported, with an explicit way to keep one deliberately.
  • 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
check
Package validate analyzes generated HTML without modifying it or fetching URLs.
Package validate 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.
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.
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.
diagnostic
Package diagnostic defines the shared compiler diagnostic format.
Package diagnostic defines the shared compiler diagnostic format.
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.
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.
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.
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.
serve
Package serve previews compiled pages and recompiles them on every change.
Package serve previews compiled pages and recompiles them on every change.
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.
urlcheck
Package urlcheck supplies shared, offline URL policy for config and HTML.
Package urlcheck supplies shared, offline URL policy for config and HTML.

Jump to

Keyboard shortcuts

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