tldart 1.0.3 copy "tldart: ^1.0.3" to clipboard
tldart: ^1.0.3 copied to clipboard

Fast tldr client written in dart

tldart #

CI Pub Package

Fast tldr client written in dart.

screenie

Installation #

  • Installing it through the Dart SDK [Recommended]
$ dart pub global activate tldart

This will add the tldr executable to your path.

  • Manual installation

Simple binaries for windows, macos and linux are available in zip files in the release section. You can download the zip file, extract the tldr.exe (or tldr depending on your platform) and add the directory to your path.

Usage #

Tldart follows the tldr client specifications, so it should be the same as any other tldr client if you've used any before.

tldart stores a local copy of tldr-pages in your ~/.tldr directory. If its missing, the app will prompt you to update the cache directory.

Search for a page #

$ tldr man # to search for `man`

$ tldr git log # to search for `git-log`

$ tldr -p linux mv # to search for `mv` for linux platform

$ tldr -l ar chrome # to search for `chrome` in arabic lang

You can specify the language with the --language or -l flag.

Platform can be specified with --platform or -p flag. (One of 'linux', 'macos', 'windows', 'sunos', 'osx', 'android'). By default the platform used is the user's current platform, if the query is not available for the platform, the app switches to the common platform. You can view the raw markdown using the --raw or -r flag.

Render custom file #

To render a custom markdown file not within the cache directory, use the --render or -f flag.

$ tldr -f path/to/file.md

The -l and -p flag are completely useless in this case but the -r (raw) flag will work. If the markdown contains any line that does not match the tldr format, it is silently ignored.

Listing all commands #

$ tldr --list

Lists all the available command in your local cache

Updating local cache #

$ tldr --update
# or
$ tldr -u

This downloads the tldr archive, unzips it and stores it in your ~/.tldr/cache directory. This might take a few seconds or minutes as the archive file is big and unzipping it takes a bit of time.

The app emits some debug logs internally. This can be viewed by setting the DEBUG env variable to anything, as long as its not empty. For example in bash:

$ DEBUG=1 tldr -u

To see a short help, run

$ tldr tldr

For any problems, queries or bugs, feel free to open a new issue.

Credits #

This project was heavily inspired by dbrgn's tealdeer.

Author #

tldart © Yakiyo. Authored and maintained by Yakiyo.

Released under MIT License

0
likes
110
pub points
0%
popularity

Publisher

unverified uploader

Fast tldr client written in dart

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

ansi, archive, args, http, path

More

Packages that depend on tldart