Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xiny - Learn X in Y Minutes, in Your Terminal

Ever find yourself constantly tabbing over to learnxinyminutes.com to look up syntax you keep forgetting? Yeah, me too. So I made a CLI for it.

xiny clones the entire learnxinyminutes-docs repository locally and lets you read any of it offline, rendered with your preferred Markdown viewer. 187 subjects, 38 languages, all of it available from your terminal. The only hard dependency is git.

Install

cargo install xiny

Usage

# The basics - just tell it what you want to read
xiny python
xiny haskell
xiny bash

# Read it in another language!
xiny python -L ja-jp
xiny rust -L de-de

# What's available?
xiny --list                # All subjects
xiny --list -L de-de       # Subjects available in German
xiny --langs               # All available languages

# Just give me the file path, I'll handle the rest
xiny rust --where

# Keep the database up to date
xiny --sync                # Pull if behind
xiny --reclone             # Nuke and reclone
xiny --check-remote        # Check without pulling

Viewer

xiny renders the document using whatever Markdown viewer you configure. I recommend glow for the best experience, but anything that can render Markdown works -- bat, mdt, whatever you prefer.

xiny --set-conf renderer glow

If no renderer is set, you get the raw Markdown. Still readable, just not as pretty.

Config

There's a small config file you can poke at from the CLI:

xiny --get-conf              # Dump everything
xiny --get-conf renderer     # Get a specific key
xiny --set-conf renderer glow

Shell Completions

Subject names and language tags are baked into the completions, so tab completion works for everything. Generate and source them for your shell:

# Bash
xiny --gencompletions bash >> ~/.bash_completion

# Zsh
xiny --gencompletions zsh > ~/.zfunc/_xiny

# Fish
xiny --gencompletions fish > ~/.config/fish/completions/xiny.fish

First Run

On first use, xiny will ask to clone the documentation database (about 50MB). It goes into ~/.local/share/xiny by default. After that, everything is offline.

Building from Source

git clone https://github.com/PsychedelicShayna/xiny
cd xiny
cargo build --release

License

GPL-3.0-or-later

About

A CLI/TUI combo for LearnXinYminutes complete with fuzzy finding, regex, vim navigation, argument completion, support for every language translation, markdown rendering, autosync with the remote learnxiny repo, and more!

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages