Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Reference

The up-to-date reference is afm --help / afm <subcommand> --help. The pages below mirror the same information for offline browsing.

afm

afm [--encoding utf8|sjis] [--strict] <subcommand> [<args>]

Global flags

FlagDefaultEffect
--encoding <enc>utf8Input encoding. utf8 or sjis.
--strictoffPromote every lexer diagnostic to a hard error.
--helpPrint help and exit.
--versionPrint version and exit.

Exit codes

CodeMeaning
0Success.
1Generic error (I/O, invalid flag, …).
2Lexer / parser diagnostic in --strict mode.

afm render <input>

Parse <input> and write HTML on stdout.

afm render input.md > out.html

<input> may be - to read from stdin.

afm check <input>

Parse <input> without emitting HTML. Useful for CI pre-flight.

afm check --strict input.md

Exits non-zero on parse errors or — under --strict — on any lexer diagnostic.