Convert

The convert subcommand imports cheatsheets from other command cheat tools and writes CheatMD Markdown.

Usage

cheatmd convert navi ~/navi-cheats -o ~/cheats
cheatmd convert tldr ~/tldr/pages/common/tar.md -o ~/cheats/tar.md
cheatmd convert cheat ~/cheat/cheatsheets -o ~/cheats

Formats

FormatInputNotes
navi.cheat filesTags, variables, selectors, and @extends
tldrtldr-pages MarkdownExample descriptions and {{placeholder}} values
cheatcheat/cheatsheets plaintext# comments as descriptions, commands as snippets

Output

The output path defaults to the current directory.

  • If the input is a file, -o may be a file path or an existing directory.
  • If the input is a directory, -o is treated as an output directory.
  • Directory conversion preserves the source tree shape and writes .md files.

navi

cheatmd convert navi ~/navi-cheats -o ~/cheats

The navi converter handles .cheat files, section tags, variable definitions, shell-backed selectors, and @extends relationships across files.

Variables written as <name> become CheatMD $name references.

tldr

cheatmd convert tldr ~/tldr/pages/common/curl.md -o ~/cheats/curl.md

The tldr converter reads each example description and command. It turns {{value}} placeholders into CheatMD variables with editable defaults.

Option forms become pickers:

{{[-k|--insecure]}}
{{GET|POST|PUT|DELETE}}

cheat/cheatsheets

cheatmd convert cheat ~/cheat/cheatsheets -o ~/cheats

The cheat converter reads comments as descriptions and command lines as executable snippets.

Common placeholder forms become prompts:

<url>
${pool}
${failed-device}

Notes

Converters are intentionally conservative. They preserve source examples where possible, add CheatMD variable blocks for recognized placeholders, and leave literal shell syntax alone when it is not clearly a cheatsheet placeholder.

See also

  • [Writing Cheats](/docs/writing cheats) - cheat structure
  • Variables - variable declaration forms
  • Compose - creating a cheat from one raw command