tealdeer logo

tealdeer Danilo Bargen

Use this command to install tealdeer:
winget install --id=dbrgn.tealdeer -e

A very fast implementation of tldr in Rust.

Tealdeer is a high-performance CLI tool designed to provide quick access to community-driven documentation and examples for command-line tools. Built using Rust, it offers a fast and efficient way to simplify complex commands through concise, example-based explanations.

Key Features:

  • Exceptional speed and performance
  • Offline functionality after initial setup
  • Cross-platform support
  • Adherence to the tldr client specification

Audience & Benefit: Ideal for developers and CLI enthusiasts seeking streamlined access to command-line tool documentation. Tealdeer enhances productivity by delivering clear, actionable examples instantly.

Tealdeer can be installed via winget, ensuring a seamless setup process for users across different platforms.

README

tealdeer

teal deer

CrateCI (Linux/macOS/Windows)
Crates.ioGitHub CI

A very fast implementation of tldr in Rust: Simplified, example based and community-driven man pages.

If you pronounce "tldr" in English, it sounds somewhat like "tealdeer". Hence the project name :)

In case you're in a hurry and just want to quickly try tealdeer, you can find static binaries on the GitHub releases page!

Docs (Installing, Usage, Configuration)

User documentation is available at !

The docs are generated using mdbook. They can be edited through the markdown files in the docs/src/ directory.

Goals

High level project goals:

  • Download and cache pages
  • Don't require a network connection for anything besides updating the cache
  • Command line interface similar or equivalent to the NodeJS client
  • Comply with the tldr client specification
  • Advanced highlighting and configuration
  • Be fast

A tool like tldr should be as frictionless as possible to use and show the output as fast as possible.

We think that tealdeer reaches these goals. We put together a (more or less) reproducible benchmark that compiles a handful of clients from source and measures the execution times on a cold disk cache. The benchmarking is run in a Docker container using sharkdp's hyperfine (Dockerfile).

Client (50 runs, 17.10.2021)Programming LanguageMean in msDeviation in msComments
outfieldrZig9.10.5no user configuration
tealdeerRust13.20.5
fast-tldrHaskell17.00.6no example highlighting
tldr-hsHaskell25.10.5no example highlighting
tldr-bashBash30.00.8
tldr-cC38.41.0
tldr-python-clientPython87.02.4
tldr-node-clientJavaScript / NodeJS407.112.9

As you can see, tealdeer is one of the fastest of the tested clients. However, we strive for useful features and code quality over raw performance, even if that means that we don't come out on top in this friendly competition. That said, we are still optimizing the code, for example when the outfieldr developers suggested to switch to a native TLS implementation instead of the native libraries.

Development

Creating a debug build with logging enabled:

$ cargo build --features logging

Release build without logging:

$ cargo build --release

To enable the log output, set the RUST_LOG env variable:

$ export RUST_LOG=tldr=debug

To run tests:

$ cargo test

To run lints:

$ rustup component add clippy
$ cargo clean && cargo clippy

MSRV (Minimally Supported Rust Version)

When publishing a tealdeer release, the Rust version required to build it should be stable for at least a month.

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Thanks to @severen for coming up with the name "tealdeer"!

Versions
1.7.2
1.6.1
Website
License