tldr

簡化版 man pages,快速查詢命令用法

安裝

# macOS
brew install tldr

# npm
npm install -g tldr

# pip
pip install tldr

# Arch Linux
sudo pacman -S tldr

基本用法

# 查詢命令
tldr tar
tldr git-commit
tldr docker-run

# 更新本地快取
tldr --update

指定平台

# Linux 專用命令
tldr -p linux apt

# macOS 專用命令
tldr -p osx brew

# Windows 專用命令
tldr -p windows choco

# 通用命令
tldr -p common git

輸出範例

$ tldr tar

  tar

  Archiving utility.
  Often combined with a compression method, such as gzip or bzip2.
  More information: https://www.gnu.org/software/tar

  - [c]reate an archive and write it to a [f]ile:
    tar cf target.tar file1 file2 file3

  - [c]reate a g[z]ipped archive and write it to a [f]ile:
    tar czf target.tar.gz file1 file2 file3

  - E[x]tract a (compressed) archive [f]ile:
    tar xf source.tar[.gz|.bz2|.xz]

其他用戶端

tealdeer (Rust 實現)

更快速的替代品

# 安裝
brew install tealdeer
cargo install tealdeer

# 使用
tldr tar

線上版本

貢獻頁面

tldr 是社群驅動的專案,可以貢獻新頁面:

  1. Fork tldr-pages/tldr
  2. pages/ 目錄新增頁面
  3. 提交 Pull Request

頁面格式

# command-name

> Short description.
> More information: <https://example.com>.

- Description of first example:

`command --option`

- Description of second example:

`command --option {{argument}}`

與 man 比較

特性tldrman
長度簡短實用完整詳細
範例常見用法較少
更新社群維護系統附帶
離線需下載快取已安裝