Skip to content

trezorg/lingualeo

Repository files navigation

lingualeo

Lingualeo API console helper for translating words, optionally pronouncing them, visualizing pictures, and adding words to your dictionary.

CI Release

Install

Option 1: install prebuilt binary

curl -sfL https://raw.githubusercontent.com/trezorg/lingualeo/main/install.sh | bash

Install into a custom directory:

curl -sfL https://raw.githubusercontent.com/trezorg/lingualeo/main/install.sh | bash -s -- -d /your/bin/dir

Install a specific version:

curl -sfL https://raw.githubusercontent.com/trezorg/lingualeo/main/install.sh | bash -s -- -v v1.2.3

Option 2: build/install with Go

go install github.com/trezorg/lingualeo/cmd/lingualeo@latest

Authentication and configuration

lingualeo requires your Lingualeo email and password.

You can provide credentials either:

  • directly via CLI flags (--email, --password), or
  • via a config file (--config) in TOML, YAML, or JSON.

Default config file names searched automatically:

  • ~/lingualeo.toml
  • ~/lingualeo.yml
  • ~/lingualeo.yaml
  • ~/lingualeo.json
  • same filenames in the current working directory

Example config (TOML)

email = "email@gmail.com"
password = "password"
add = false
sound = true
player = "mplayer"
download = false
visualize = false
reverse_translate = false
request_timeout = "30s"
log_level = "INFO"

Example config (YAML)

email: email@gmail.com
password: password
add: false
sound: true
player: mplayer
download: false
visualize: false
reverse_translate: false
request_timeout: 30s
log_level: INFO

Common usage scenarios

Show help:

lingualeo --help

Translate one or more words:

lingualeo --email you@example.com --password 'secret' hello world

Use a config file:

lingualeo --config ./lingualeo.toml hello

Add a word with custom translation:

lingualeo add -t "custom translation" hello

Pronounce words using a player:

lingualeo --sound --player "mpv --no-video" hello

Download sound before playing (for players that cannot stream URLs):

lingualeo --sound --download --player "mplayer" hello

Enable reverse translation mode:

lingualeo --reverse-translate привет

Development

Build:

make build

Generate mocks:

make generate

Lint:

make lint

Run tests:

make test

Full local check before PR:

make clean cache generate lint test

About

Lingualeo API console helper

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors