Articles
Published · November 18, 2026

Keep a Personal Command Cheat Sheet in the tldr Page Style

Borrow the tldr page format for a personal command cheat sheet in Markdown: a short description, about five examples, and placeholders for what changes.

Also in: Español中文हिन्दी

Keep one Markdown file where each command gets a short description and about five example lines, written the way tldr pages are written. It takes minutes to start, and it ends the monthly search for the same flags.

tldr pages are a community collection of simplified man pages built from practical examples. Their format is small enough to copy for your own notes, and this guide shows how.

What a tldr page looks like

According to the project's contributing guide, the basic format of a page is a set of concrete usage examples, stored in Markdown. Each page follows a template like this:

# command-name

> Short, snappy description.
> More information: <https://url-to-upstream.tld>.

- Example description:

`command --option`

The title is the command name. The description is short, with two lines as the suggested limit. Then come pairs of a description ending in a colon and the command itself in backticks. That's the whole format, and it's why the pages are quick to scan.

Why examples beat a full manual

A manual answers every question about a command. A cheat sheet answers the few you actually ask. The tldr guide says it plainly: it's fine if a page doesn't cover everything, because that is what man is for.

Your sheet is a how-to document sitting next to the reference material, a split explained in the Diataxis framework for how-to and reference docs. Keep to that split and the sheet stays short.

The project aims for about five examples per page and says never to go past eight. Use the same ceiling. If an entry grows beyond eight lines, split it by subcommand or drop the lines you never use.

Write each example in the imperative

The tldr style guide asks for descriptions in the imperative mood: "List all files:" rather than "Listing all files:". It works for a personal sheet too: every line reads as an instruction you can act on.

A few more habits from the same guidelines carry over well:

  • Prefer long options, or spell out a short option in the description, so you can read the line a year from now.
  • Start with the simple invocation and add options gradually.
  • If a command needs sudo, write it into the example.
  • Skip general concepts such as paths and globs. Stick to what is specific to the command.

The style guide also asks for plain pages with no italics or bold. For notes you will search and copy from, that restraint helps.

Mark the parts that change with placeholders

tldr writes user-chosen values as tokens in double curly brackets, in snake_case, with paths as path/to/file. Two rules from the style guide matter most:

  • Use a placeholder for anything you will change each time.
  • Don't use a placeholder when the description names the value. Placeholders mean user choice.

Here is a sample entry:

# tar

> Archive and extract files.

- Create a gzip-compressed archive from a directory:

`tar -czf {{path/to/archive.tar.gz}} {{path/to/directory}}`

- Extract a gzip-compressed archive into the current directory:

`tar -xzf {{path/to/archive.tar.gz}}`

- List the contents of an archive without extracting it:

`tar -tf {{path/to/archive.tar.gz}}`

If you also use an editor with snippets, the same idea appears there as snippet placeholders, where the fields you fill in are marked for you.

Handle risky commands carefully

For commands that cannot be undone, the style guide suggests placeholders such as {{/dev/sdX}}, so an example cannot be copy-pasted thoughtlessly. Do the same in your sheet. A line that deletes or overwrites something should fail until you fill in the target yourself.

The guide also puts the help and version commands last on a page, in that order. It's a tidy habit. When you forget everything else, the last two lines tell you how to ask the command itself.

Keep the sheet in one file you can search

One file named cheatsheet.md is enough to start. Give each command its own H1 or H2 heading, and write the commands in code spans or fenced blocks. The GitHub Flavored Markdown spec treats the content of a fenced block as literal text, so your flags and placeholders come through untouched.

Searching is plain text work. Use grep -n "tar" cheatsheet.md in a terminal, or your editor's search. When you find the line, copy it. On a Mac, pbcopy and pbpaste move text between the terminal and the clipboard without a mouse.

Start small. Add an entry the next time you look something up, and put only the lines you used into it. After a month you will have a sheet made entirely of commands you needed.

Doing this with Carets

A cheat sheet is only useful if it is within reach when you are at the terminal, on a Mac, or checking something from an iPad. Carets is a fast, native notes and code editor for iPhone, iPad, and Mac, and it suits this job for a few specific reasons:

  • Markdown, plain text, and code in one editor. Your cheatsheet.md stays a plain file, portable and future-proof.
  • Syntax highlighting for code and config files. Command lines and fenced blocks are easy to tell apart from your prose.
  • Files, projects, and tags. Keep one file per tool, tag them by topic, and group the sheets in a project.

It is the best fit we know for a notes-plus-code sheet like this, because the same native app handles the Markdown and the commands. Get Carets on the App Store for iPhone, iPad, and Mac.

Frequently Asked Questions

How many examples should one cheat sheet entry have?

The tldr project aims for about five examples per page and never more than eight. The same limit works for a personal sheet. If an entry grows past eight, split it by subcommand or drop the lines you rarely use.

Do I need to install the tldr client to use this format?

No. The format is plain Markdown, so you can write entries in any text editor. The client only displays the community pages; your own sheet is just a file.

Should I copy the community pages into my own sheet?

Copy only what you actually use. The point of a personal sheet is that every line is a command you have needed, with the flags you prefer.