https://github.com/mikachou/pons-cli
An unofficial simple CLI tool to look up translations via the Pons API. This project is not affiliated with Pons or its services.
https://github.com/mikachou/pons-cli
cli pons translation translator
Last synced: 5 months ago
JSON representation
An unofficial simple CLI tool to look up translations via the Pons API. This project is not affiliated with Pons or its services.
- Host: GitHub
- URL: https://github.com/mikachou/pons-cli
- Owner: mikachou
- License: mit
- Created: 2025-07-20T19:28:52.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-27T09:02:59.000Z (10 months ago)
- Last Synced: 2025-08-27T18:12:10.130Z (10 months ago)
- Topics: cli, pons, translation, translator
- Language: Go
- Homepage:
- Size: 161 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pons CLI
## Overview
Pons CLI is a command-line interface for the PONS dictionary API. It allows you to look up translations for words in various languages.

## Requirements
- Go 1.18 or higher (if installed from source code)
- A PONS API key. You can get one by registering at [https://en.pons.com/open_dict/public_api](https://en.pons.com/open_dict/public_api).
## Install
### Archlinux based systems
Using the `yay` command:
```
yay -S pons-cli
```
### Snap package
Using `snap` command:
```
sudo snap install pons-cli
```
### Source code
To install, clone the repo and use `go install`:
```bash
git clone https://github.com/mikachou/pons-cli
go install
```
Ensure that `$HOME/go/bin` is in your `$PATH` environment variable to launch the program.
## Usage
Launch application from terminal using `pons-cli` command:
```
pons-cli
```
First, you need to set your API key:
```
.set api_key
```
Then, you can list the available dictionaries:
```
.dict
```
Set the dictionary you want to use:
```
.dict
```
Now you can start translating:
```
```
### Commands
- `.help`: Show the help message.
- `.quit`: Exit the program.
- `.dict`: List available dictionaries.
- `.dict `: Set the current dictionary.
- `.set`: Show current settings.
- `.set `: Set a configuration variable.
- `.history`: Show your search history.
- `.cards []`: Enter flashcards mode to practice your vocabulary.
## Configuration
The configuration file is located at `~/.config/pons-cli/config.toml`.
The following variables can be configured:
- `api_key`: Your PONS API key.
- `cache_ttl`: The time-to-live for the cache in seconds. Default is 604800 (7 days).
- `cmd_history_limit`: The maximum number of commands to store in the history. Default is 100.
- `search_history_limit`: The maximum number of search entries to store in the history. Default is 1000.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENCE) file for details.