Executable Markdown cheatsheets. Write readable docs, run interactive commands.
go install github.com/cheatmd-dev/cheatmd/cmd/cheatmd@v1.0.0-rc.3Requires Go 1.26+.
cheatmd # Browse current directory
cheatmd ~/cheats # Browse a cheats directory
cheatmd -q "docker" # Start with a search query
cheatmd init # Initialize default config
cheatmd --lint ~/cheats # Check cheats for syntax/reference issues
cheatmd packs install # Install starter cheat packsAny Markdown heading with a code block can become a cheat:
## Docker: exec into container
```sh title:"Execute shell in container"
docker exec -it $container /bin/sh
```
<!-- cheat
var container = docker ps --format "{{.Names}}" --- --header "Select container"
-->- Fuzzy-search cheats by title, command, tags, and description
- Prompt for variables using shell output, editable defaults, or pickers
- Reuse variable definitions with modules
- Run ordered multi-step workflows with chains
- Lint cheat syntax, imports, chains, and variables
- Export parsed metadata as JSON or CSV
- Convert existing
navi,tldr, andcheat/cheatsheetscollections - Run headless over JSON-RPC for editor integrations
- VS Code - syntax highlighting, diagnostics, completion, and CodeLens execution
- Neovim - syntax highlighting, async diagnostics, completion, and
:CheatMDRun - Obsidian - inline run buttons, lint status, execution results, and variable autocomplete
Full documentation lives in the Wiki:
- Getting Started
- Writing Cheats
- Variables
- Selector Options
- Configuration
- Convert
- Headless Mode
- Recipes
See CONTRIBUTING.md.
If CheatMD saves you time, you can support the project on Ko-fi.
