How to Install and Use cli-dict: A Command-Line Translation Tool

This guide explains how to install the cli-dict npm package globally, demonstrates basic Chinese‑English translation commands with examples, lists available command‑line options, and notes the current translation source and contribution invitation.

JavaScript
JavaScript
JavaScript
How to Install and Use cli-dict: A Command-Line Translation Tool

Installation

$ npm install cli-dict -g

Usage

Supports Chinese‑English translation.

Example

$ dict hello world
> 你好世界
$ dict 然
> conj. but; however
  adj. right
  vt. correct
  adv. so; nevertheless

Options

$ dict -h
Usage: index [options]

Options:
  -V, --version       output the version number
  -s, --source <name> 指定翻译源
  -h, --help          output usage information

Other

Current translation source is Youdao.

Feel free to fork or star the project.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

translationnodejsnpmtoolcommand-line
JavaScript
Written by

JavaScript

Provides JavaScript enthusiasts with tutorials and experience sharing on web front‑end technologies, including JavaScript, Node.js, Deno, Vue.js, React, Angular, HTML5, CSS3, and more.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.