cheat md

Write readable docs.
Run interactive commands.

$ go install github.com/gubarz/cheatmd/cmd/cheatmd@latest
or
$ curl -fsSL cheatmd.dev/install.sh | sh
cheatmd
CheatMD TUI demo
Features

Built for the terminal

Plain-text source, modern terminal ergonomics.

Write in Markdown

Any heading with a code block is a cheat. No schemas, no databases, just files you can read, diff, and share.

Fuzzy search & frecency

Search titles, commands, tags, and descriptions. Frequently-used cheats float to the top automatically.

Shell-expanded variables

Variables evaluate live in your shell and present a scrollable picker, with prompt fallback.

Linting & DSL checks

cheatmd --lint catches syntax errors, broken imports, and undeclared variables before they run.

Reusable modules

Define variables and selectors once, import them anywhere. Keep cheatsheets DRY across files.

Metadata portability

Dump cheats to JSON or CSV with cheatmd dump. Pipe into your search, indexes, or tooling.

Widgets

Fits your workspace

Run it as a floating pane, tmux overlay, or shell keybinding.

zellij --floating-pane
zellij gif
Coming Soon

Zellij Floating Pane Mode

Launches CheatMD in a floating terminal overlay on top of your current layouts. Pressing Enter auto-injects the resolved command directly into your active workspace.

# Bind key in ~/.config/zellij/config.kdl
bind "Ctrl n" {
    Run "sh" "-c" "content=$(cheatmd --print); zellij action toggle-floating-panes; zellij action write-chars \\"$content\\"" {
        floating true
        close_on_exit true
    };
}
tmux --split-pane
tmux gif
Coming Soon

Tmux Split-Pane Mode

Pops CheatMD open inside a fast sidebar split pane. Selecting a command will load tmux's paste buffers and insert the output directly into the adjacent pane.

# Add key binding in ~/.tmux.conf
bind-key -n C-n split-window "$SHELL --login -i -c 'cheatmd --print | tr -d \"\\r\\n\" | tmux load-buffer -b tmp - ; tmux paste-buffer -t {last} -b tmp -d'"
๐Ÿš

Bash & Zsh Readline Widget

Simply evaluate the widget inside your shell startup script to unlock instant `Ctrl+G` selections.

# Append to ~/.bashrc or ~/.zshrc eval "$(cheatmd widget $SHELL)"