GitHub - AI translation & grammar parsing in your terminal

by
跨平台命令行英语德语词典 a command-line English & German dictionary - xieguaiwu/bl

Add a comment

Replies

Best
Maker
📌
bl is a terminal-based dictionary client written in Go. Three query paths in one binary: offline SQLite dictionaries (no network), web scraping (Youdao EN⇄ZH, WoerterNet German), and LLM translation for any language pair via OpenAI-compatible API. Version 1.8 adds grammatical sentence analysis with token-level POS tagging, dependency relations, and phrase structure trees for German (V2/case system), French (agreement/clitics), and English. What makes bl different: 1. Three-tier lookup: Offline SQLite → Cache → LLM API. Auto-fallback means you get results even without network. 2. Grammar analysis (v1.8): bl --llm --parse "Der Mann geht nach Hause." Parses any sentence into POS tags, lemma, morphological features, dependency relations. No other terminal dictionary offers this. 3. Lemma extraction: Inflected forms auto-reduce to dictionary form. - ging → gehen (past tense, 1st/3rd person singular) - besser → gut (comparative) - ran → run 4. Multi-provider LLM with auto-fallback: Configure multiple providers. If one fails (rate limit, timeout), bl tries the next automatically. 5. Interactive config UI: bl -C — full terminal UI, no config file editing. 6. Bot support: Telegram and DingTalk bots built from the same codebase. Tech stack: Pure Go, ~10MB single binary, zero runtime deps. modernc.org/sqlite (no CGO), goquery for HTML parsing. Output formats: Markdown, JSON, oneliner. Install: sudo dnf copr enable xieguaiwu/bl && sudo dnf install bl GitHub:

Finally tried this little CLI dictionary and it's surprisingly handy when you're neck‑deep in code and don't want to alt‑tab. The German side feels solid too, though I'd love to see more example sentences down the line.

Does it work offline once installed, or does it hit an API every time you look up a word from the terminal?

Does this need an internet connection every time you look up a word, or does it cache results locally so it works offline once you've used it a bit?

love how this just lives in the terminal where you already are, no extra windows or tabs. clean idea, and the bilingual angle is genuinely useful for anyone bouncing between English and German in code comments.

Finally a no-fuss dictionary that lives right in my terminal, super handy when reading READMEs or German docs. Searched a couple words and the definitions came back almost instantly.

Ran it from the terminal and it just works, no setup headaches. Surprised how clean the German definitions come through compared to other CLI dictionaries I've tried.