Minimalist AI translation CLI powered by LLMs
Project description
English | 繁體中文
🌿 Mint
Minimalist AI Translation CLI — Simple. Fast. Intuitive.
Mint is a lightweight, LLM-powered translation tool for the command line. Choose your favorite LLM provider (Google Gemini, OpenAI, Anthropic, or local Ollama), and get fluent, natural translations instantly with optional smart language detection.
✨ Why Mint?
Most translation tools are either too bloated or too locked into a specific platform. Mint is built around a single philosophy: do less, do it well.
- Minimal — One command, no noise
- Fast — Calls the LLM API directly, no intermediate layers
- Multi-provider — Choose between Google Gemini, OpenAI, Anthropic, or local Ollama models
- Flexible — Supports any language pair, freely specify your target language
- Smart detection — Optionally detect input language and auto-translate to your preference
- Composable — Pipe-friendly stdin/stdout design, fits naturally into any workflow
📋 Installation
pipx (Python Package Index)
The simplest way to install — Mint is available on PyPI:
pipx install mint-ai
After installation, the command is mint:
mint --version
npm (Node Package Manager)
If you prefer npm:
npm install -g mint-ai
Then use:
mint --version
Automated Install (One-liner)
Downloads the latest binary automatically:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/min0625/mint/main/script/install.sh)"
Features:
- Detects your OS and architecture automatically (Linux/macOS, x86_64/arm64)
- Verifies SHA256 checksums
- Installs to
~/.local/binby default (override withMINT_INSTALL_DIR) - Shows PATH setup hints if needed
- Supports pinning a specific version:
MINT_VERSION=v1.0.0 bash script/install.sh
go install
If you have Go 1.21+ installed:
go install github.com/min0625/mint/cmd/mint@latest
The binary will be available as mint in your $GOPATH/bin directory (usually ~/go/bin).
Manual Download from GitHub Releases
Download pre-built binaries directly from GitHub Releases:
# Linux x86_64
curl -L https://github.com/min0625/mint/releases/latest/download/mint_Linux_x86_64.tar.gz \
| tar xz && sudo mv mint /usr/local/bin/
# macOS arm64 (Apple Silicon)
curl -L https://github.com/min0625/mint/releases/latest/download/mint_Darwin_arm64.tar.gz \
| tar xz && sudo mv mint /usr/local/bin/
# macOS x86_64 (Intel)
curl -L https://github.com/min0625/mint/releases/latest/download/mint_Darwin_x86_64.tar.gz \
| tar xz && sudo mv mint /usr/local/bin/
# Windows x86_64 (PowerShell)
# Download mint_Windows_x86_64.zip from releases page and extract to a directory in your PATH
Verify Installation
mint --version
🚀 Quick Start
1. Choose your provider
# Google Gemini (free tier available)
export MINT_PROVIDER=google-genai
export MINT_API_KEY=your_gemini_api_key
# Get a free API key at: https://aistudio.google.com/apikey
# OpenAI
export MINT_PROVIDER=openai
export MINT_API_KEY=sk-...
# Anthropic
export MINT_PROVIDER=anthropic
export MINT_API_KEY=sk-ant-...
# Local Ollama (no API key needed)
export MINT_PROVIDER=ollama
export MINT_BASE_URL=http://localhost:11434
export MINT_MODEL_NAME=llama2
2. Translate with explicit target language
# Specify a target language (BCP-47 tag) using --target or -t flag
mint --target ja "Good morning"
mint -t zh-TW "Good morning"
# Pipe from stdin
echo "The quick brown fox" | mint -t fr
# Translate a file
cat document.txt | mint -t zh-TW
3. Smart language detection (optional)
Set your target language preference using MINT_TARGET_LANG:
# Single target language
export MINT_TARGET_LANG=en
mint "早安" # Detects Chinese → translates to en
mint "Good mooorning" # Detects English → grammar & spelling correction
# Multiple target languages (language rotation)
export MINT_TARGET_LANG=en,zh-TW,ja
mint "Hello" # English input → translates to zh-TW (next in rotation)
mint "你好" # Chinese input → translates to ja (next in rotation)
mint "こんにちは" # Japanese input → translates to en (wraps around)
The tool automatically detects the input language and applies the appropriate transformation.
🔑 Environment Variables
| Variable | Description | Required | Default |
|---|---|---|---|
MINT_PROVIDER |
LLM provider: google-genai, openai, anthropic, ollama |
Yes | — |
MINT_API_KEY |
API key for the chosen provider | Conditional* | — |
MINT_BASE_URL |
Custom API endpoint; required for ollama (e.g., for self-hosted or local services) |
Conditional* | Provider default |
MINT_MODEL_NAME |
LLM model name to use | Optional | Provider default** |
MINT_TARGET_LANG |
Target language(s) - single or comma-separated (e.g. en, en,zh-TW,ja) |
Optional | System locale or en |
Conditional: MINT_API_KEY required for google-genai, openai, anthropic; not needed for ollama. MINT_BASE_URL required for ollama.
Default models: google-genai: gemini-3.1-flash-lite, openai: gpt-4o-mini, anthropic: claude-haiku-4-5; ollama: none (must specify).
Language Resolution Priority
The tool uses the following priority order to determine the target language(s):
- Flag:
--target/-tCLI flag (highest priority) - Config:
MINT_TARGET_LANGenvironment variable - System: Operating system locale
- Default:
en(lowest priority)
🎯 Design Principles
Mint follows the Unix philosophy — do one thing, and do it well.
| Principle | Description |
|---|---|
| Zero-dependency install | Single binary, works out of the box |
| Multi-provider | Supports major LLM services plus local alternatives |
| Composability | Pairs seamlessly with grep, sed, xargs, and friends |
| Transparent output | Results go to stdout, errors go to stderr |
| Environment-friendly | API keys managed via environment variables, no config file pollution |
🗺 Roadmap
- Multi-LLM provider support (Google Gemini, OpenAI, Anthropic, Ollama)
- Smart language detection and multi-language rotation via
MINT_TARGET_LANG - Explicit target language via
--target/-tflag - GoReleaser multi-platform binary release (Linux / macOS / Windows)
- Batch translation mode
- Glossary / custom dictionary support
- Output format options (plain text, JSON, Markdown)
- Caching for repeated translations
📄 License
Apache License 2.0 — see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mint_ai-0.0.1-py3-none-win_amd64.whl.
File metadata
- Download URL: mint_ai-0.0.1-py3-none-win_amd64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb8209ddbb41da8b67acc7f8977b0e2ddd861cb5048e466eb49e01eeb4ac7886
|
|
| MD5 |
79945261c7f1c933fba1b988d7bc7dac
|
|
| BLAKE2b-256 |
23913f534d9f1947486ba637eaeade0a66d59e328da98e1f814b84f40e6ae038
|
Provenance
The following attestation bundles were made for mint_ai-0.0.1-py3-none-win_amd64.whl:
Publisher:
publish-pypi.yml on min0625/mint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mint_ai-0.0.1-py3-none-win_amd64.whl -
Subject digest:
bb8209ddbb41da8b67acc7f8977b0e2ddd861cb5048e466eb49e01eeb4ac7886 - Sigstore transparency entry: 1735694475
- Sigstore integration time:
-
Permalink:
min0625/mint@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/min0625
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.1-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: mint_ai-0.0.1-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e9558e766fa19f8e325a5876a09b672dfee494652470da686a33679daaa0b07
|
|
| MD5 |
76959e45521cb0796a6ca81fdf9ef078
|
|
| BLAKE2b-256 |
a2ecb2cffbde8a18293a167baccb51a9dfc81387ef5fba1f39df407a774599ed
|
Provenance
The following attestation bundles were made for mint_ai-0.0.1-py3-none-musllinux_1_2_x86_64.whl:
Publisher:
publish-pypi.yml on min0625/mint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mint_ai-0.0.1-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
7e9558e766fa19f8e325a5876a09b672dfee494652470da686a33679daaa0b07 - Sigstore transparency entry: 1735694418
- Sigstore integration time:
-
Permalink:
min0625/mint@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/min0625
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.1-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: mint_ai-0.0.1-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ba831625172d0df1af97b6d63248c95dd748c0747d864165b92db899e959d4
|
|
| MD5 |
f0af20110a888a5cb7db93a8f4b38825
|
|
| BLAKE2b-256 |
9bab8b787cc2a360dbac14e3523875923e473111d1babac567bfcb59a7b773b2
|
Provenance
The following attestation bundles were made for mint_ai-0.0.1-py3-none-musllinux_1_2_aarch64.whl:
Publisher:
publish-pypi.yml on min0625/mint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mint_ai-0.0.1-py3-none-musllinux_1_2_aarch64.whl -
Subject digest:
e2ba831625172d0df1af97b6d63248c95dd748c0747d864165b92db899e959d4 - Sigstore transparency entry: 1735694660
- Sigstore integration time:
-
Permalink:
min0625/mint@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/min0625
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mint_ai-0.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2819b19ab7912b69a09ef69c9ac736bb5ec9e86110dba2f7e88944ac3fc3ca62
|
|
| MD5 |
17df04b54987d0bb73bead46c4a95380
|
|
| BLAKE2b-256 |
c4de7aca6bdd572de7ca48e79487879fa8d554b6206d14625d54d92675dd09d0
|
Provenance
The following attestation bundles were made for mint_ai-0.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish-pypi.yml on min0625/mint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mint_ai-0.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
2819b19ab7912b69a09ef69c9ac736bb5ec9e86110dba2f7e88944ac3fc3ca62 - Sigstore transparency entry: 1735694366
- Sigstore integration time:
-
Permalink:
min0625/mint@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/min0625
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mint_ai-0.0.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3860a045e45bb51eb258271650e5cf6e995056f316aae5f163541535d63b6d6c
|
|
| MD5 |
5aa817be615d114654c17edaccf36cab
|
|
| BLAKE2b-256 |
e2eb51f718b7e9ac36b06d514301dfa8a0c9f3938f74c37d6dfbc7dbdf3b9cbf
|
Provenance
The following attestation bundles were made for mint_ai-0.0.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
publish-pypi.yml on min0625/mint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mint_ai-0.0.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
3860a045e45bb51eb258271650e5cf6e995056f316aae5f163541535d63b6d6c - Sigstore transparency entry: 1735694617
- Sigstore integration time:
-
Permalink:
min0625/mint@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/min0625
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: mint_ai-0.0.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d834c31a219eeb6061f511830e08bc81dda38d13c1e2b3930501dba19624bcc
|
|
| MD5 |
6b217a48ca10f28e567b220159f2a757
|
|
| BLAKE2b-256 |
39a013273b22d6da53961941806f2e3368804e73750a410c70ac1beeb60187ba
|
Provenance
The following attestation bundles were made for mint_ai-0.0.1-py3-none-macosx_11_0_arm64.whl:
Publisher:
publish-pypi.yml on min0625/mint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mint_ai-0.0.1-py3-none-macosx_11_0_arm64.whl -
Subject digest:
1d834c31a219eeb6061f511830e08bc81dda38d13c1e2b3930501dba19624bcc - Sigstore transparency entry: 1735694521
- Sigstore integration time:
-
Permalink:
min0625/mint@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/min0625
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.1-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: mint_ai-0.0.1-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b5400f26330bc1d98d71f8b6944b7a28ad4fcbd83538ed241716af65f1dae5a
|
|
| MD5 |
b5935422531cdf8a2402386a01a8a5aa
|
|
| BLAKE2b-256 |
255a78c4d818ff24e8ca4c1db3cb353185eec5233a21f4b29e1f9a6c53b931b9
|
Provenance
The following attestation bundles were made for mint_ai-0.0.1-py3-none-macosx_10_9_x86_64.whl:
Publisher:
publish-pypi.yml on min0625/mint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mint_ai-0.0.1-py3-none-macosx_10_9_x86_64.whl -
Subject digest:
4b5400f26330bc1d98d71f8b6944b7a28ad4fcbd83538ed241716af65f1dae5a - Sigstore transparency entry: 1735694565
- Sigstore integration time:
-
Permalink:
min0625/mint@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/min0625
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f615b8a45b337d8822440ddde71b536a33e8c1c1 -
Trigger Event:
workflow_run
-
Statement type: