Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yakiyo/tilde
Fast and easy-to-use terminal client for tldr
https://github.com/yakiyo/tilde
cli cobra go man-page tldr tldr-client tldr-pages
Last synced: 29 days ago
JSON representation
Fast and easy-to-use terminal client for tldr
- Host: GitHub
- URL: https://github.com/yakiyo/tilde
- Owner: Yakiyo
- License: mit
- Created: 2023-08-22T13:30:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-13T10:47:03.000Z (over 1 year ago)
- Last Synced: 2024-12-09T19:46:27.276Z (about 1 month ago)
- Topics: cli, cobra, go, man-page, tldr, tldr-client, tldr-pages
- Language: Go
- Homepage:
- Size: 77.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tilde
[![ci](https://github.com/Yakiyo/tilde/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Yakiyo/tilde/actions/workflows/ci.yml) ![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/Yakiyo/tilde) ![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Yakiyo/tilde?label=version)![image](https://github.com/Yakiyo/tilde/assets/91675932/963644cc-2152-401e-b05b-bfe6d4485e6e)
An easy to use and fast console client for [tldr](https://github.com/tldr-pages/tldr)
This was inspired by the amazing [tealdeer](https://github.com/dbrgn/tealdeer). My original goal was to see wether I could write something that has the same performance as tealdeer, but alas, I couldn't achive it. It just shows that tealdeer is that good! Nevertheless it was a fun project to do, and I managed to learn more Go.
## Installation
Download binaries from the [release](https://github.com/Yakiyo/tilde/releases/latest) section
### Scoop
```shell
$ scoop install https://github.com/Yakiyo/tilde/raw/main/pkg/scoop/tilde.json
```
*More methods TBA*
## Usage
Tilde follows the [tldr client specifications](https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md). The version of the spec followed can be viewed by running the `tldr --version` flag.Tilde stores a local cache of tldr pages in `~/.tilde/cache` directory. If it's missing, the app will warn you and you can add it with the `tldr --update` command
### Basics
```shell
$ tldr git # search for git$ tldr git commit # search for git-log
$ tldr --platform=windows cmd # search for `cmd` in windows
$ tldr --language=bn zsh # search for `zsh` in Bangla language
$ tldr -l cn -p osx tldr # combine `language` and `platform`
$ tldr -f /path/to/some/file.md # render a custom markdown file
$ tldr --raw gh # render without any formatting
```
You can customize the outputs with more flags such as `--color`, `--log-level` etc.
The color flag takes one of `always` (always shows colors), `never` (disable colors) and `auto` (default). When set to auto, it tries to check if the output is a terminal and the env var `NO_COLOR` is not set.
The log-level flag can be used to customize log filters. Default is warn. You can set it to `info` to get some additional but not-necessary logs.
View the entire list by running `tldr --help`.
## Configuration
Tilde supports configuration via a [toml](https://toml.io) file. The default location of the file is `~/.tilde/tilde.toml`. This can specified using the command line `--config` flag. The config flag can be used to specify a custom config file to use. When the config flag is used, an error is thrown if the file does not exist in the mentioned path. If left unspecified, tilde tries to use the default file, if it is present, else uses defaults.Supported config values
```toml
log_level = "warn" # set log level (one of info, warn, error, fatal)
color = "always" # set color (one of always, auto, never)
root_dir = "/path/to/tilde/root/dir" # tilde's root dir. Caches and other things are stored here. defaults to ~/.tilde
platform = "windows" # set default platform to use, default is user platform
language = "cn" # default language to use
custom_pages = "/path/to/dir" # set a dir containing custom pages. This are prioritized before the main cache files
```
The custom pages directory can be used to specify your own custom commands. This is given more priority. For example, if your custom directory contains a `zsh.md`, when using `tldr zsh`, the one in the custom directory is shown over the one in the tldr cache.You can create a new config file by running `tldr --seed-config`. This creates a config file at `~/.tilde/tilde.toml`. **WARNING**: This will overwrite any existing configuration. `seed-config` uses the current config values. That is if used `tldr --log-level info --seed-config`, the newly created file will fill the `log_level` key with `info` instead of the default `warn`.
## Author**tilde** © [Yakiyo](https://github.com/Yakiyo). Authored and maintained by Yakiyo.
Released under [MIT](https://opensource.org/licenses/MIT) License