• Stars
    star
    139
  • Rank 256,747 (Top 6 %)
  • Language
    Rust
  • License
    MIT License
  • Created about 1 year ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tldr client written in Rust

tlrc

A tldr client written in Rust.

CI release crates.io license
github downloads matrix

screenshot

Installation

Packaging status

Linux/macOS using Homebrew

Install tlrc with Homebrew:

brew install tlrc

Linux/macOS using Nix

Install tlrc from nixpkgs.

Arch Linux

Install tlrc (from source) or tlrc-bin (prebuilt) from the AUR.

openSUSE

Install tlrc with Zypper:

zypper install tlrc

Windows

Install tlrc with Winget:

winget install tldr-pages.tlrc

macOS using MacPorts

Install tlrc with MacPorts:

port install tlrc

NetBSD

Install tlrc with pkgin:

pkgin install tlrc

From crates.io

To build tlrc from a source tarball, run:

cargo install tlrc

Note

Shell completion files and the man page will not be installed that way.

From GitHub Releases

You can find prebuilt binaries here.

Usage

See man tldr or the online manpage. For a brief description, you can also run:

tldr --help

Configuration

Tlrc can be customized with a TOML configuration file. To get the default path for your system, run:

tldr --config-path

To generate a default config file, run:

tldr --gen-config > "$(tldr --config-path)"

or copy the below example.

Configuration options

[cache]
# Override the cache directory.
dir = "/path/to/cache"
# Override the base URL used for downloading tldr pages.
# The mirror must provide files with the same names as the official tldr pages repository:
# mirror/tldr.sha256sums            must point to the SHA256 checksums of all assets
# mirror/tldr-pages.LANGUAGE.zip    must point to a zip archive that contains platform directories with pages in LANGUAGE
mirror = "https://github.com/tldr-pages/tldr/releases/latest/download"
# Automatically update the cache if it's older than max_age hours.
auto_update = true
max_age = 336 # 336 hours = 2 weeks
# Specify a list of desired page languages. If it's empty, languages specified in
# the LANG and LANGUAGE environment variables are downloaded.
# English is implied and will always be downloaded.
# You can see a list of language codes here: https://github.com/tldr-pages/tldr
# Example: ["de", "pl"]
languages = []

[output]
# Show the title in the rendered page.
show_title = true
# Show the platform name ('common', 'linux', etc.) in the title.
platform_title = false
# Prefix descriptions of examples with hyphens.
show_hyphens = false
# Use a custom string instead of a hyphen.
example_prefix = "- "
# Strip empty lines from output.
compact = false
# Print pages in raw markdown.
raw_markdown = false

# Number of spaces to put before each line of the page.
[indent]
# Command name.
title = 2
# Command description.
description = 2
# Descriptions of examples.
bullet = 2
# Example command invocations.
example = 4

# Style for the title of the page (command name).
[style.title]
# Fixed colors:       "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "default"
# 256color ANSI code: { color256 = 50 }
# RGB:                { rgb = [0, 255, 255] }
color = "magenta"
background = "default"
bold = true
underline = false
italic = false
dim = false
strikethrough = false

# Style for the description of the page.
[style.description]
color = "magenta"
background = "default"
bold = false
underline = false
italic = false
dim = false
strikethrough = false

# Style for descriptions of examples.
[style.bullet]
color = "green"
background = "default"
bold = false
underline = false
italic = false
dim = false
strikethrough = false

# Style for command examples.
[style.example]
color = "cyan"
background = "default"
bold = false
underline = false
italic = false
dim = false
strikethrough = false

# Style for URLs inside the description.
[style.url]
color = "red"
background = "default"
bold = false
underline = false
italic = true
dim = false
strikethrough = false

# Style for text surrounded by backticks (`).
[style.inline_code]
color = "yellow"
background = "default"
bold = false
underline = false
italic = true
dim = false
strikethrough = false

# Style for placeholders inside command examples.
[style.placeholder]
color = "red"
background = "default"
bold = false
underline = false
italic = true
dim = false
strikethrough = false

More Repositories

1

tldr

πŸ“š Collaborative cheatsheets for console commands
Markdown
49,026
star
2

tldr-python-client

Python command-line client for tldr pages
Python
569
star
3

tldr-node-client

Node.js command-line client for tldr pages
JavaScript
425
star
4

tldr-c-client

C command-line client for tldr pages
C
281
star
5

tldr-pages.github.io

The website for the tldr pages project
HTML
70
star
6

tldr-lint

A linting tool to validate tldr pages
JavaScript
33
star
7

tldr-bot

A simple bot that performs automation tasks on the main tldr repo
Python
28
star
8

extldr

Elixir command-line client for tldr pages
Elixir
14
star
9

tldr-maintenance

This repository runs a Bash script that calculates metrics about the current state of the tldr pages
Shell
6
star
10

tldr-neovim-extension

TLDR Neovim Extension is a plugin that integrates TLDR pages directly into Neovim.
Lua
5
star
11

homebrew-tldr

!!! DEPRECATED !!!
Ruby
4
star
12

tldr.jsx-fork

πŸ“š A Reactive web client for tldr-pages
JavaScript
4
star
13

tldr-translation-pairs-gen

Generates a structured dataset in various formats derived from tldr-pages.
TypeScript
4
star
14

tldr-labeler-action

Action to handle automatic PR labeling
TypeScript
4
star
15

tldr-pages-test-harness

A Bats test-suite that validates if a tldr-client is compatible with the client specifications set out in the tldr repository.
Shell
3
star
16

tldr-emacs-extension

Emacs extension for TlDr.
Emacs Lisp
1
star
17

tldr-json-schemas

JSON schemas to describe command syntax and enable example parsing easily.
1
star
18

.github

1
star
19

tldr-code-extension

1
star
20

tldr-bash-framework

Framework for handling errors gracefully, colorize text and parse options in a readable manner.
Shell
1
star
21

tldr-editor-configs

Editor configs for TlDr for editors without plugin support.
1
star
22

chatroom

Redirect to the tldr-pages chatroom.
HTML
1
star