A C-based utility that can read and manage the databases of "tl;dr" pages for other cli tools
  • C 94%
  • Shell 5.3%
  • Makefile 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-31 21:24:34 -07:00
completions Added --curl to force curl usage 2026-10-22 21:36:41 -07:00
packaging Update packaging/RPM-GPG-KEY 2026-09-30 19:07:57 -07:00
src Turned some config functions to macros 2026-10-31 21:22:25 -07:00
.gitignore Changed gitignore slightly 2026-09-30 18:22:34 -07:00
AI_POLICY.md Update AI_POLICY.md 2026-09-28 23:47:01 -07:00
CODE_OF_CONDUCT.md Added CoC 2026-09-26 00:06:29 -07:00
CONTRIBUTING.md Added contributing guide 2026-10-08 11:51:18 -07:00
LICENSE.md Added gpl3 license 2026-09-20 12:47:47 -07:00
Makefile Changed make rpm to make package 2026-10-20 21:16:13 -07:00
README.md Updated README and help text 2026-10-29 16:42:00 -07:00

cldr

Quillx Trans rights Sponsored by the Gay Agenda

image

image

cldr is a cli utility that can read and manage the databases of "tl;dr" pages for other cli tools. These community maintained help pages are known as tl;dr (too long; didn't read) pages, because they provide a simplification of the full man pages, showing off the most used options and giving examples on how to use them.

This specific project is an alternative anti-ai ethical-tldr client written in C (hence the name cldr). The official ethical-tldr client is written in Python, and for most operations is over 20 times slower than this client. (Actually, depending on the system, it can be up to 150 times slower, but I've chosen the "worst" comparison so as to not overexaggerate)

By default, this client maintains a local database of tldr pages at "$HOME/.local/share/cldr/", but this can be changed with paramaters and environment variables.

Dependencies

[Required] gcc is used by the provided Makefile to build this project from source. Note, this is only a requirement for those building this from source.

[Optional] wget can be installed for less reliance on other projects using ai, if wget is not found, curl will be used instead

Usage

For detailed usage information about any option, run cldr -h --example-option.

Usage: cldr [options] <query>

Prints the tldr page for the given query.

Options:
  -h, --help          print this help page
  -h <option>, --help <option>
                      print usage information for another argument
  -o, --options <parameter>
                      print the allowed values for another parameter
  --                  option delimiter, all arguments after this
                      ╰ will be parsed as the query
  --dry               make no changes to the disk
  --script            enables general scripting optimizations
  -e, --edit          edits the queried page with $EDITOR
╭ -v, --version       print program and database version
├ -l, --list          list all pages
│                     ╰ or search the database for the given query
╰ --colors            print the list of colors usable with the
                      ╰ TLDR_COLOR_* environment variables
╭ -p <platform>, --platform <platform>
│                     select which platform to try first
├ -L <language>, --language <language>
│                     specify which language to use
╰ -P, --plain         print the query in plain text
╭ -u, --update        update the local database
├ --curl              force curl when updating the database
├ -d, --delete        deletes the local database
├ --storage-path <path>
│                     specify the path to the local database, the default is:
│                     ╰ ~/.local/share/cldr/
├ -S <url>, --source <url>
│                     specify the url to download archives from
╰ --no-auto           disable automatic updates
╭ -c, --color never   minimizes the amount of colors printed
╰ -r, --render </path/to/file>
                      parses and reads from a specific markdown file
  -C, --config [get, set, edit, store, clear]
                      manipulates the configuration file
                      ╰ try cldr --help --config to learn more
  -n, --note [write, read, edit, list, remove]
                      manages your custom notes
                      ╰ try cldr --help --note to learn more
╭ --short, --short-options
│                     show only short options in pages (when available)
╰ --long, --long-options
                      show only long options in pages (when available)

Environment Variables

DEBUG_LEVEL=-1         # Use any integer, values less than 0 are counted as infinity # default=0
LANGUAGE=es:fr:ja      # Specify the order of languages to try # default=""
TLDR_LANGUAGE=         # Same as LANGUAGE, but cldr specific # default=""
TLDR_HOME=             # Configures the home directory, is separate from HOME to have cldr specific paths
TLDR_LANG=             # Same as the -L parameter # default="" 
TLDR_COLOR_NAME=     # This and the following 4 will change the colors of printed pages # default=purple bold
TLDR_COLOR_DESCRIPTION= # default=cyan italic
TLDR_COLOR_EXAMPLE= # default=green
TLDR_COLOR_COMMAND= # default=red
TLDR_COLOR_PARAMETER= # default=blue italic
TLDR_DOWNLOAD_CACHE_LOCATION=   # Same as -S # default="https://codeberg.org/ethical-foss/ethical-tldr/archive/main.zip"
TLDR_STORAGE_PATH=$HOME/.local/share/cldr/            # Same as --storage-path
TLDR_CACHE_MAX_AGE=168      # The number of hours before trying to automatically update the database
TLDR_DISABLE_AUTO_UPDATE=true|false   # Same as --no-auto
TLDR_NOTE_ACTION=ask|overwrite|append|cancel|edit # Specifies what happens when a note already exists # default=ask
TLDR_OPTIONS=short|both|long       # Same as --short and --long # default=both
TLDR_PLATFORM=linux                # Same as the -p parameter # defaults to your system

Installation

Check out the installation guide to install cldr, or to build from source.