Translate-cli is a simple command-line application for translating texts. This document covers installation and usage instructions.
The easiest way to install is using our installer script:
curl -sSL https://raw.githubusercontent.com/ahmetbarut/rust-cli-translate-app/refs/heads/master/install.sh | bashThis script will automatically download the latest version, make it executable, and place it in your $HOME/bin directory.
If you prefer to install manually:
- Download the latest release:
curl -O https://github.com/ahmetbarut/rust-cli-translate-app/releases/latest/download/translate-cli
- Make the file executable:
chmod +x translate-cli
- Move the file to your personal bin directory:
mv translate-cli $HOME/bin - Ensure your
$HOME/binis in your PATH environment variable.
To translate a text, simply run:
translate-cli 'Your text to translate'This will output the translated text. Please refer to the help command for more options:
translate-cli --help- If you encounter permission errors, make sure $HOME/bin is writable and added to your PATH.
- For further issues, consult the official repository documentation or open an issue on GitHub.
Refer to the project repository for updates and additional options, features, or bug fixes.
This application works with the free version of DeepL. You will need a DeepL API key to use the application.
After obtaining your API key, you can set it up according to your shell by following these steps:
-
Bash: Add the following line to your
~/.bashrcfile:
export DEEPL_API_KEY="your_api_key" -
Zsh: Add the following line to your
~/.zshrcfile:
export DEEPL_API_KEY="your_api_key" -
Fish: If you use Fish shell, add this line to your
config.fishfile:
set -x DEEPL_API_KEY your_api_key
After making changes, restart your terminal or source the relevant file. For example, for bash you can use the command source ~/.bashrc.
Also, please review the necessary settings in install.sh.