Top Related Projects
📚 Collaborative cheatsheets for console commands
An interactive cheatsheet tool for the command-line
cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.
the only cheat sheet you need
instant coding answers via the command line
🖥 📊 🕹 🛠 A curated list of command line apps
Quick Overview
Tealdeer is a fast and lightweight command-line utility that provides concise, practical examples for various command-line tools. It's an implementation of the tldr pages project in Rust, offering a more efficient alternative to the official client.
Pros
- Fast performance due to Rust implementation
- Lightweight and minimal dependencies
- Supports offline caching of pages
- Cross-platform compatibility (Linux, macOS, Windows)
Cons
- Limited to tldr-pages content, which may not cover all commands
- Requires separate installation from standard package managers
- May not provide as detailed information as full man pages
Getting Started
To install tealdeer, you can use one of the following methods:
- Using cargo (Rust package manager):
cargo install tealdeer
- On macOS using Homebrew:
brew install tealdeer
- On Arch Linux using pacman:
pacman -S tealdeer
After installation, you can use tealdeer by running the tldr
command followed by the name of the command you want to look up:
tldr tar
tldr git commit
tldr docker run
To update the cache of tldr pages:
tldr --update
For more options and usage information, run:
tldr --help
Competitor Comparisons
📚 Collaborative cheatsheets for console commands
Pros of tldr
- Larger community and more contributors, resulting in a wider range of command examples
- Supports multiple languages, making it accessible to a global audience
- Offers a web interface for easy browsing of commands without installation
Cons of tldr
- Written in Node.js, which may have slower startup times compared to Rust
- Requires more disk space due to the inclusion of all pages in the package
Code Comparison
tldr (JavaScript):
const page = await client.get(command, options);
console.log(page);
tealdeer (Rust):
let page = cache.get_page(&command)?;
print_page(&page, &config);
Summary
tldr is a more established project with a larger community and broader language support. However, tealdeer, being written in Rust, offers faster performance and a smaller footprint. tldr provides a web interface, while tealdeer focuses on command-line efficiency. Both projects aim to simplify command-line usage by providing concise examples, but they cater to slightly different user preferences in terms of language support, performance, and interface options.
An interactive cheatsheet tool for the command-line
Pros of navi
- Interactive and customizable command-line cheatsheet tool
- Supports multiple languages and integrations with various shells
- Allows for easy sharing and collaboration of cheatsheets
Cons of navi
- More complex setup and usage compared to tealdeer
- Requires additional dependencies and configuration
- May have a steeper learning curve for new users
Code comparison
navi:
navi --query "git commit"
navi --tldr git
navi --cheatsh docker
tealdeer:
tldr git commit
tldr --update
tldr --platform=osx tar
Key differences
- navi offers an interactive interface for browsing and searching cheatsheets, while tealdeer provides a simpler, static output of command examples
- navi supports multiple sources for cheatsheets (custom, tldr, cheat.sh), whereas tealdeer focuses solely on tldr pages
- tealdeer is written in Rust, which may offer performance benefits, while navi is written in Bash and utilizes external tools
Use cases
- tealdeer: Quick reference for common command usage examples
- navi: Comprehensive command exploration and customization of personal cheatsheets
Both tools aim to improve command-line productivity, but cater to different user preferences and needs. tealdeer offers simplicity and speed, while navi provides more flexibility and interactivity.
cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.
Pros of cheat
- Supports creating and editing custom cheatsheets
- Offers a more extensive collection of community-contributed cheatsheets
- Provides a search functionality across all cheatsheets
Cons of cheat
- Slower startup time compared to tealdeer
- Requires Python installation and additional dependencies
- More complex setup and configuration process
Code Comparison
tealdeer:
let page = cache.get_page(&name)?;
let mut printer = Printer::new(config, page);
printer.print()?;
cheat:
cheatsheet = cheatsheet_repository.get(cheatsheet)
if cheatsheet:
print(cheatsheet.text)
Summary
tealdeer is a Rust implementation of tldr pages, focusing on speed and simplicity. It offers quick access to concise command-line tool examples. cheat, on the other hand, is a Python-based tool that provides more extensive cheatsheets and allows users to create and edit their own. While tealdeer excels in performance and ease of use, cheat offers more flexibility and a broader range of community-contributed content.
the only cheat sheet you need
Pros of cheat.sh
- Offers a wider range of programming languages and tools
- Provides a web interface for easy access without installation
- Supports community-contributed cheatsheets
Cons of cheat.sh
- Requires an internet connection for usage
- May have slower response times compared to local alternatives
- Less customizable for personal preferences
Code Comparison
cheat.sh:
curl cheat.sh/python/list
tealdeer:
tldr ls
Both tools aim to provide quick access to command-line cheatsheets, but they differ in their approach. cheat.sh offers a more extensive database accessible through various methods, including curl commands and a web interface. tealdeer, on the other hand, focuses on providing a fast, offline experience with a more limited set of commands.
cheat.sh excels in its breadth of coverage and ease of access, making it suitable for users who need information on a wide range of topics and don't mind relying on an internet connection. tealdeer is ideal for users who prioritize speed and offline availability, with a focus on common command-line tools.
The code examples demonstrate the simplicity of both tools, with cheat.sh using a curl command to fetch information and tealdeer using a dedicated command-line interface. While cheat.sh offers more flexibility in querying, tealdeer provides a more streamlined experience for quick lookups of common commands.
instant coding answers via the command line
Pros of howdoi
- Provides answers from Stack Overflow, offering more detailed explanations
- Supports multiple programming languages and technologies
- Allows users to ask questions in natural language
Cons of howdoi
- Requires an internet connection to fetch answers
- May provide outdated or incorrect information if not carefully filtered
- Can be slower to retrieve answers compared to local documentation
Code comparison
tealdeer:
let page = cache.get_page(&name)?;
let lines = page.lines();
for line in lines {
println!("{}", line);
}
howdoi:
def get_answer(query):
url = get_google_url(query)
soup = get_soup(url)
answer = find_best_answer(soup)
return answer
tealdeer is a Rust-based command-line utility that provides quick access to concise command examples from tldr-pages. It focuses on offline usage and fast retrieval of pre-cached information.
howdoi is a Python-based tool that searches the internet for programming-related questions and provides answers from Stack Overflow. It offers more flexibility in terms of query types but requires an internet connection.
Both tools aim to provide quick answers to command-line and programming questions, but they differ in their approach and data sources. tealdeer is better suited for quick command reference, while howdoi is more versatile for general programming queries.
🖥 📊 🕹 🛠 A curated list of command line apps
Pros of awesome-cli-apps
- Comprehensive collection of CLI apps across various categories
- Community-driven with regular updates and contributions
- Serves as a valuable resource for discovering new CLI tools
Cons of awesome-cli-apps
- Not a standalone application, just a curated list
- Requires manual exploration to find specific tools
- May include outdated or deprecated projects
Code comparison
Not applicable, as awesome-cli-apps is a curated list and doesn't contain executable code. tealdeer, on the other hand, is a Rust implementation of tldr pages. Here's a sample of tealdeer's code:
fn main() {
let config = Config::load();
let args = parse_args();
if let Err(e) = run(config, args) {
eprintln!("Error: {}", e);
process::exit(1);
}
}
Summary
awesome-cli-apps is a comprehensive, community-driven list of CLI applications, serving as a valuable resource for discovering new tools. However, it's not a standalone application and requires manual exploration. tealdeer, in contrast, is a specific CLI tool for accessing tldr pages, offering a more focused functionality. While awesome-cli-apps provides a broad overview of available CLI tools, tealdeer offers a practical implementation for quick access to command documentation.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
tealdeer
Crate | CI (Linux/macOS/Windows) |
---|---|
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 https://dbrgn.github.io/tealdeer/!
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 Language | Mean in ms | Deviation in ms | Comments |
---|---|---|---|---|
outfieldr | Zig | 9.1 | 0.5 | no user configuration |
tealdeer | Rust | 13.2 | 0.5 | |
fast-tldr | Haskell | 17.0 | 0.6 | no example highlighting |
tldr-hs | Haskell | 25.1 | 0.5 | no example highlighting |
tldr-bash | Bash | 30.0 | 0.8 | |
tldr-c | C | 38.4 | 1.0 | |
tldr-python-client | Python | 87.0 | 2.4 | |
tldr-node-client | JavaScript / NodeJS | 407.1 | 12.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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
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"!
Top Related Projects
📚 Collaborative cheatsheets for console commands
An interactive cheatsheet tool for the command-line
cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.
the only cheat sheet you need
instant coding answers via the command line
🖥 📊 🕹 🛠 A curated list of command line apps
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot