Many CLI tools split their functionality across subcommands —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tldr-pages/tldr/llms.txt
Use this file to discover all available pages before exploring further.
git commit, git push, docker container ls, and so on. tldr-pages handles these with a simple dash-separated naming convention that lets clients resolve multi-word invocations transparently, and a set of patterns for cross-referencing the base page with its subcommand pages.
Naming convention
Subcommand pages use a dash-separated filename: spaces in the command are replaced with dashes, and the whole name is lowercased..md):
tldr git commit is equivalent to tldr git-commit because clients replace spaces with dashes and lowercase the result before resolving the page.
Always create a base page
Every program that has subcommand pages must also have a base page for the top-level command itself. The base page should describe the program at a high level and document fundamental flags such as--version and --help. It should also signal to users that subcommand-specific pages exist.
The git.md page is the canonical example:
git.md covers the most common top-level operations, and the description block’s subcommand notice (Some subcommands such as …) points readers toward the dedicated subcommand pages.
Referencing subcommands
There are three accepted patterns for connecting the base page to its subcommand pages:Subcommand notice in the description block
Add a line to the description block noting that subcommand-specific pages exist. Only the subcommand name is listed (e.g. This is the pattern used by
commit, not git commit):git.md and is the most common approach for large tools with many subcommands.See also reference
Use the This works well when the base page and its subcommand pages are closely paired or when the subcommand set is small.
See also: template in the description block to link to closely related commands, aliases, or subcommands:Convert the base page into a subcommand index
When the top-level command has no useful behaviour on its own, convert the entire base page into a directory that points users to the subcommand pages:Each example uses
tldr command-subcommand as the command itself, directing users to the appropriate page.Full subcommand page example
A complete template for a subcommand page that uses the index pattern:pages/common/git.md in the repository, as well as pages/linux/nmcli.md.
Name collisions
When two completely different programs share the same command name, they cannot both be stored ascommand.md. The solution is to:
- Rename both pages using an appropriate suffix — a number (
command.1.md,command.2.md) or a language/ecosystem identifier (command.js.md). - Create (or repurpose) the bare
command.mdas a disambiguation page that lists both and points users to the correct one.
just.md page in pages/common/ is the reference example for this pattern:
just.1.md and just.js.md respectively.