Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gemini-translator

Gemini API を使った日本語/英語の翻訳 CLI ツール。

必要環境

セットアップ

  1. 依存パッケージをインストールする。

    npm install
  2. .env.example をコピーして .env を作成し、GEMINI_API_KEY を記入する(任意で GEMINI_MODEL を設定するとデフォルトモデルを上書きできる)。

  3. TypeScript をコンパイルする。

    npm run build

使い方

# 入力言語を自動判定して翻訳(日本語 ↔ 英語)
npm run tl -- "Hello, world"
# → こんにちは、世界

npm run tl -- "おはよう"
# → Good morning

# 出力言語を指定(--to / -t、ja または en)
npm run tl -- --to en "今日はいい天気"
# → It's nice weather today

# 使用モデルを一時的に上書き(--model / -m)
npm run tl -- --model gemini-2.5-flash "Hello, world"

# ヘルプ表示
npm run tl -- --help

ライセンス

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages