Skip to content
Gubarz edited this page May 30, 2026 · 6 revisions

CheatMD

Executable Markdown cheatsheets. Write readable docs, run interactive commands.

Install

go install github.com/cheatmd-dev/cheatmd/cmd/cheatmd@latest

Quick Start

cheatmd                    # Browse current directory
cheatmd ~/cheats           # Browse specific directory
cheatmd -q "docker"        # Start with search query
cheatmd --history          # Re-run from execution history
cheatmd --lint ~/cheats    # Check cheats for syntax/reference issues
cheatmd dump ~/cheats      # Dump parsed cheat metadata as JSON
cheatmd compose "command"  # Compose a new cheat template from a raw command
cheatmd convert tldr tar.md -o tar.md

Editor Extensions

  • VS Code - syntax highlighting, completion, and CodeLens execution.
  • Neovim - syntax highlighting, completion, and :CheatMDRun.
  • Obsidian - inline run buttons, lint status, execution results, and variable autocomplete.

Documentation

Page Description
Writing Cheats How to write your first cheat - headings, code blocks, and the <!-- cheat --> metadata block
Variables Prompt, shell, and literal variables - the three var forms and how they drive the picker
Selector Options --header, --delimiter, --column, --select-column, --map - controlling the picker display and return value
Conditionals if / fi blocks for branching variable definitions based on earlier choices
Modules export / import for reusable variable definitions shared across cheats
Chains Multi-step ordered workflows that advance one cheat per launch
Tags Five sources of tags and how they fold into search
Path Completion Tab-driven filesystem completion while resolving variables
Configuration cheatmd.yaml reference - output modes, key bindings, variable syntax
Shell Integration Shell widget, tmux split, and Zellij floating pane setups
Linting --lint validation of DSL syntax, references, chains, and variables
Dump dump subcommand for exporting cheat metadata as JSON or CSV
Compose compose subcommand to templatize raw commands into cheats
Convert convert subcommand to import navi, tldr, and cheat/cheatsheets collections
Headless Mode --headless programmatic interface using JSON-RPC over stdio
Recipes Copy-pasteable patterns for common use cases

Clone this wiki locally