# translator-cli

> The command line app for translate

Latest version **1.0.0** (published 2018-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install translator-cli
pnpm add translator-cli
yarn add translator-cli
bun add translator-cli
```

Provides the commands `fy`, `fanyi`, `translator`.

## 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.0.0 |
| Published | 2018-05-27 |
| First published | 2018-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Liu Xing |
| Maintainers | liuxing |
| Keywords | translation, fanyi, cli |

## Links

- npm: https://www.npmjs.com/package/translator-cli
- Repository: https://github.com/liuxing/translator-cli
- Homepage: https://github.com/liuxing/translator-cli#readme
- Issues: https://github.com/liuxing/translator-cli/issues
- npm.io page: https://npm.io/package/translator-cli

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.19
- [commander](https://npm.io/package/commander.md) ^2.15.1
- [superagent](https://npm.io/package/superagent.md) ^3.8.3
- [configstore](https://npm.io/package/configstore.md) ^3.1.2
- [update-notifier](https://npm.io/package/update-notifier.md) ^2.5.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.0.0 (latest) — 2018-05-27
- 0.3.0 — 2018-05-22
- 0.2.1 — 2018-05-16
- 0.2.0 — 2018-05-16
- 0.1.0 — 2018-05-14

## README

# translator-cli

[![Travis](https://www.travis-ci.org/liuxing/translator-cli.svg?branch=master)](https://www.travis-ci.org/liuxing/translator-cli)  [![npm version](https://img.shields.io/npm/v/translator-cli.svg)](https://www.npmjs.com/package/translator-cli) [![npm downloads](https://img.shields.io/npm/dm/translator-cli.svg)](https://www.npmjs.com/package/translator-cli) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

> The command line app for translate

## Install

```bash
$ npm install -g translator-cli
```

## Features

- translates words, phrases between English and Chinese
- easy and fast switch between different API (e.g. youdao、iciba)

## Usage

```bash
$ translator

  Usage: translator [options] [command]

  Options:

    -V, --version    output the version number
    -h, --help       output usage information

  Commands:

    *                Query words
    query|q <words>  Query words
    ls               List all the source
    use <source>     Change source to source
```

Of course, you can also use `fanyi` or `fy `  like:

```bash
$ fanyi
# ···
# or
$ fy
# ...
```

### Query words
```bash
$ fy <words>
# e.g.
$ fy test # or: fy query test、fy q test
test  [ test ]    ~ fanyi.youdao.com

- n. 试验；检验
- vt. 试验；测试
- vi. 试验；测试
- n. (Test)人名；(英)特斯特

1. Test
     测试,测验,检验

2. Test Drive
     Test Drive,Test Drive,无限狂飙

3. Test Engineer
     测试员,测试工程师,软件测试工程师
```

### Change source

List all the source
```bash
$ fy ls
*  youdao  -> http://fanyi.youdao.com
   iciba  -> http://dict-co.iciba.com
```

Change source to source
```bash
$ fy use iciba
source has been set to: iciba
```

## LICENSE
[MIT](https://github.com/liuxing/translator-cli/blob/master/LICENSE) @ Liu Xing

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