About Β | Β Demo Β | Β Features Β | Β Technologies Β | Β Requirements Β | Β Installation Β | Β Documentation Β | Β License
Lexy is a lightweight CLI tool that fetches programming tutorials from Learn X in Y Minutes directly into your terminal. Quickly search, learn, and reference code examples without leaving your workflow.
Lexy saves a local copy of the documentation, so you can access it even when you're offline. It also provides syntax highlighting using bat and fuzzy search using fzf.
This project would not be possible without the amazing work of the Learn X in Y Minutes community. A huge thanks to all contributors for making high-quality learning resources freely available!
βοΈ Check documentation from "Learn X in Y minutes" directly from the terminal
βοΈ Syntax highlighting using bat
βοΈ Local copy to speed up the process and avoid too many requests to the "Learn X in Y minutes" server
βοΈ Auto-update every 60 days
βοΈ Searching powered by fzf
The following tools were used in this project:
Before starting π, you need to have bat and fzf installed.
When installing bat via apt
, the executable may be installed as batcat
instead of bat
. In this case, you should follow these steps to create the necessary symlink to make lexy
work properly. Note: creating an alias will not work, as aliases are not visible to subprocesses started by Python.
git clone https://github.com/antoniorodr/lexy
cd lexy
pip install .
brew tap antoniorodr/lexy
brew install antoniorodr/lexy/lexy
yay -S lexy
Installation using uv
uv tool install git+https://github.com/antoniorodr/lexy
First, make sure you have bat and fzf installed. Lexy requires it for syntax highlighting and searching.
You can use the command lexy --help
to see all available options.
lexy --help
Usage: lexy [OPTIONS] <LANGUAGE>
Display <LANGUAGE> documentation using bat.
<LANGUAGE> refers to the language name or the following options:
- Use "list" to view all available languages.
- Use "update" to force update Lexy.
- Use "modified" to view the last modified date of Lexy.
Options:
--version Show the version and exit.
--help Show this message and exit.
Lexy keeps a local copy of the documentation in $HOME/.config/lexy
, which is created automatically the first time you run Lexy, and it will be updated every 60 days. You can force an update using "update" as <LANGUAGE>
.
You can find the full documentation here.
Starting from Lexy v0.4.2, you can customize the appearance of the fzf
interface used in the lexy list
command.
By default, Lexy applies a color palette inspired by Catppuccin Mocha, but you can override it by creating a config.toml
file in your Lexy config directory:
If you want to modify syntax highlighting for file previews powered by bat
, refer to the bat documentation.
[fzf]
preview_percent = "60"
input_label = " Input "
border_label = " Enter: Open with bat β Ctrl-D/U: scroll preview "
[colors]
border = "#aaaaaa"
label = "#cccccc"
preview_border = "#9999cc"
preview_label = "#ccccff"
list_border = "#669966"
list_label = "#99cc99"
input_border = "#996666"
input_label = "#ffcccc"
header_border = "#6699cc"
preview_percent
changes the size of the file preview windowinput_label
changes the text of the input labelborder_label
changes the text of the top of the window
Below is the configuration used in the second screenshot:
[colors]
border = "#ff0000" # Red
label = "#00ff00" # Green
preview_border = "#0000ff" # Blue
preview_label = "#ffff00" # Yellow
list_border = "#ff00ff" # Magenta
list_label = "#00ffff" # Cyan
input_border = "#ffa500" # Orange
input_label = "#800080" # Lila
header_border = "#008000" # Dark green
You can include only the parameters you'd like to override, Lexy will fall back to defaults for the rest.
This project is under license from MIT. For more details, see the LICENSE file.
Made with β€οΈ by Antonio Rodriguez
Β