@deeplx/cli
Version:
The cli for [`@deeplx/core`](https://github.com/un-ts/deeplx/blob/master/packages/@deeplx/core), a powerful and easy-to-use yet free DeepL API client for Node.js using [DeepL](https://www.deepl.com) by porting [OwO-Network/DeepLX](https://github.com/OwO-N
186 lines (136 loc) • 8.33 kB
Markdown
# @deeplx/cli
[](https://github.com/un-ts/deeplx/actions/workflows/ci.yml?query=branch%3Amaster)
[](https://codecov.io/gh/un-ts/deeplx)
[](https://app.codacy.com/gh/un-ts/deeplx)
[](https://github.com/plantain-00/type-coverage)
[](https://coderabbit.ai)
[](https://www.npmjs.com/package/@deeplx/cli)
[](https://github.com/un-ts/deeplx/releases)
[](https://conventionalcommits.org)
[](https://renovatebot.com)
[](https://standardjs.com)
[](https://github.com/prettier/prettier)
[](https://github.com/atlassian/changesets)
The cli for [`@deeplx/core`](https://github.com/un-ts/deeplx/blob/master/packages/@deeplx/core), a powerful and easy-to-use yet free DeepL API client for Node.js using [DeepL](https://www.deepl.com) by porting [OwO-Network/DeepLX](https://github.com/OwO-Network/DeepLX).
## TOC <!-- omit in toc -->
- [Online Service](#online-service)
- [Installation](#installation)
- [Usage](#usage)
- [Supported languages](#supported-languages)
- [Help](#help)
- [Example 1](#example-1)
- [Example 2](#example-2)
- [Example 3](#example-3)
- [Example 4](#example-4)
- [Sponsors and Backers](#sponsors-and-backers)
- [Sponsors](#sponsors)
- [Backers](#backers)
- [Changelog](#changelog)
- [License](#license)
## Online Service
<https://deeplx.vercel.app/translate>
## Installation
```sh
# npm
npm i @deeplx/cli
# pnpm
pnpm add @deeplx/cli
# yarn
yarn add @deeplx/cli
```
## Usage
### Supported languages
Currently the following languages are supported:
| Abbreviation | Language | Writing in own language |
| ------------ | ---------- | ----------------------- |
| BG | Bulgarian | Български |
| ZH | Chinese | 中文 |
| CS | Czech | Česky |
| DA | Danish | Dansk |
| NL | Dutch | Nederlands |
| EN | English | English |
| ET | Estonian | Eesti |
| FI | Finnish | Suomi |
| FR | French | Français |
| DE | German | Deutsch |
| EL | Greek | Ελληνικά |
| HU | Hungarian | Magyar |
| IT | Italian | Italiano |
| JA | Japanese | 日本語 |
| LV | Latvian | Latviešu |
| LT | Lithuanian | Lietuvių |
| PL | Polish | Polski |
| PT | Portuguese | Português |
| RO | Romanian | Română |
| RU | Russian | Русский |
| SK | Slovak | Slovenčina |
| SL | Slovenian | Slovenščina |
| ES | Spanish | Español |
| SV | Swedish | Svenska |
| UK | Ukrainian | Українська Мова |
You can either input the abbreviation or the language written in english.
### Help
```sh
deeplx -h
```
```console
Usage: deeplx [options]
The cli for [`@deeplx/core`](https://github.com/un-ts/deeplx/blob/master/packages/@deeplx/core).
Options:
-V, --version output the version number
-s, --source <text> Source language of your text
-t, --target <text> Target language of your desired text
--text <text> Text to be translated
-f, --file <path> File to be translated
--formal [boolean] Whether to use formal (true) or informal (false) tone in translation. Default `undefined` respects source text tone.
--no-formal
-h, --help display help for command
```
### Example 1
This will translate a Spanish (`ES`) text into Russian (`RU`):
```sh
deeplx -t russian --text "¡Buenos días!"
```
```text
Доброе утро!
```
### Example 2
This will translate the file (`test.txt`) text from Italian (`IT`) into Portuguese (`PT`):
```sh
deeplx -t PT -f test.txt
```
### Example 3
This will translate a Spanish (`ES`) text into Russian (`RU`) in _formal_ tone:
```sh
deeplx -t RU --text "¿Cómo te llamas?" --formal
```
```text
Как Вас зовут?
```
Note: _informal_ would be "_Как **тебя** зовут?_"
### Example 4
This will translate a Japanese (`JA`) text into German (`DE`) in _informal_ tone:
```sh
deeplx -t DE --text "お元気ですか?" --no-formal
```
```text
Wie geht es dir?
```
Note: _formal_ would be "_Wie geht es **Ihnen**?_"
## Sponsors and Backers
[](https://github.com/sponsors/JounQin)
### Sponsors
| 1stG | RxTS | UnTS |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [](https://opencollective.com/1stG) | [](https://opencollective.com/rxts) | [](https://opencollective.com/unts) |
### Backers
| 1stG | RxTS | UnTS |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [](https://opencollective.com/1stG) | [](https://opencollective.com/rxts) | [](https://opencollective.com/unts) |
## Changelog
Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).
## License
[MIT][] © [JounQin][]@[1stG.me][]
[1stG.me]: https://www.1stG.me
[JounQin]: https://github.com/JounQin
[MIT]: http://opensource.org/licenses/MIT