# google-translate-cli

> Google Translate via CLI.

Latest version **1.1.1** (published 2019-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install google-translate-cli
pnpm add google-translate-cli
yarn add google-translate-cli
bun add google-translate-cli
```

Provides the command `translate`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2019-02-08 |
| First published | 2016-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 14.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 50 |
| Author | Jesús Alberto Polo García |
| Maintainers | jesusalber1 |
| Keywords | google, translate, cli |

## Links

- npm: https://www.npmjs.com/package/google-translate-cli
- Repository: https://github.com/jesusalber1/google-translate-cli
- Issues: https://github.com/jesusalber1/google-translate-cli/issues
- npm.io page: https://npm.io/package/google-translate-cli

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.72.0
- [commander](https://npm.io/package/commander.md) ^2.9.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2019-02-08
- 1.1.0 — 2019-01-31
- 1.0.1 — 2018-06-18
- 1.0.0 — 2016-06-24
- 0.0.1 — 2016-06-24

## README

# Google Translate via CLI

Translate texts using Google Translate from your terminal.

## Installation
```
npm install -g google-translate-cli
```
## Usage overview
```
  Usage: translate [options] <text ...>

  Options:

    -h, --help               output usage information
    -V, --version            output the version number
    -a, --auto               Auto-detect source language
    -d, --details            View details
    -l, --list               List all available languages
    -s, --source [language]  Source language [en]
    -t, --target [language]  Target language [es]

  Examples:

     $ translate 'I want to translate this text'
     $ translate -s es -t en 'Quiero traducir este texto'
     $ translate -s en -t es I want to translate this text
     $ translate -a 'Au revoir' -d
     $ pbpaste | translate # when text stored in Mac clipboard
```
Translations from English to Spanish by default.

## Examples
![Command examples](https://cloud.githubusercontent.com/assets/3829533/16347285/26f72b3e-3a4c-11e6-97e8-26ad3d02dc4f.png)

## Default options
Default languages supported by using environment variables (thanks to **@michaelsavich**):
```
export JA_GTC_SOURCE='en' # your preferred source language code
export JA_GTC_TARGET='es' # your preferred target language code
```
If those environment variables are not set then translations from English to Spanish by default.

## TODO
* ~~Add editable default options~~
* Add tests

---
_Source: https://npm.io/package/google-translate-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
