npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eecho

v0.2.0

Published

ターミナル上で日本語を入力すると、即座に英語へ翻訳するCLIツール

Downloads

133

Readme

eecho

ターミナル上で日本語を入力すると、即座に英語へ翻訳するCLIツール

(簡単な日本語などの翻訳に適しています。難しい文の翻訳ではかなり性能に劣ります)

インストール

npm install -g eecho

使い方

初回実行

初回実行時のみ、翻訳モデル(約300MB)を自動ダウンロードします。

❯ eecho こんにちは
翻訳ワーカーを起動中... (初回のみ表示されます)
# Hello

2回目以降

2回目以降は即座に翻訳されます:

❯ eecho こんにちは
# Hello

使用例

# 基本的な翻訳
eecho こんにちは
# 出力: Hello

# 長文の翻訳
eecho "今日はいい天気ですね"
# 出力: It's nice weather today

# パイプから入力
echo "ありがとうございます" | eecho
# 出力: Thank you very much

# 複数の単語
eecho お疲れ様でした
# 出力: Good work

インタラクティブモード

引数なしで eecho を実行すると、対話型モードが起動します。チャット感覚で次々と翻訳できます:

$ eecho

eecho インタラクティブモード
日本語を入力すると英語に翻訳します。
終了するには Ctrl+C または exit と入力してください。

eecho> こんにちは
→ Hello

eecho> 今日はいい天気ですね
→ It's nice weather today

eecho> exit
さようなら!

オプション

eecho --help     # ヘルプを表示
eecho --init-zsh # zsh用の初期化スクリプトを出力
eecho --version  # バージョンを表示
eecho --shutdown-worker  # バックグラウンドワーカーを停止
eecho --verbose  # モデル進捗や各種ログを表示
EECHO_VERBOSE=1 eecho こんにちは  # 常に詳細ログを有効化

zsh連携(コマンドなしで翻訳)

.zshrcに以下を追加すると、eechoコマンドなしで日本語を直接入力するだけで翻訳できます:

# ~/.zshrc に追加
eval "$(eecho --init-zsh)"

設定後、ターミナルを再起動(またはsource ~/.zshrc)すると:

$ こんにちは
# 出力: Hello

$ 今日はいい天気ですね
# 出力: It's nice weather today

zshのcommand_not_found_handlerを利用しており、日本語を含む入力のみを翻訳対象とします。通常のコマンドは影響を受けません。

バックグラウンドワーカーについて

初回実行時に eecho は翻訳専用の Node プロセスをバックグラウンドで起動し、/tmp/eecho-workerEECHO_WORKER_DIR で変更可)にリクエストキューを作成します。以降の起動はこのワーカーにキューを投入するだけなので、ONNX の詳細ログは吸収され、訳文だけが表示されます。ワーカーを停止したい場合は eecho --shutdown-worker を実行してください。次回の翻訳リクエスト時に自動的に再生成されます。

動作原理

  1. 初回実行: Helsinki-NLPのopus-mt-ja-enモデル(ONNX最適化版、約300MB)をダウンロード
  2. 日本語検出: ひらがな・カタカナ・漢字を含むテキストを検出
  3. 翻訳実行: ローカルのtransformerモデルで翻訳(初回以降はインターネット不要)
  4. 結果表示: ターミナルに翻訳結果を表示

必要環境

  • Node.js >= 18.0.0
  • ディスク容量 約500MB(モデルキャッシュ用)
  • インターネット接続(初回実行時のみ)