Minimalist AI translation CLI powered by LLMs
Project description
English | 繁體中文
🌿 Mint
Minimalist AI Translation CLI — Simple. Fast. Intuitive.
Mint is a single-binary, LLM-powered translation CLI. Set two environment variables and translate anything from the command line — files, piped output, or inline text. Built-in language detection, grammar correction, streaming output, and multi-language rotation.
export MINT_PROVIDER=google-genai
export MINT_API_KEY=your_key
mint -t ja "Good morning" # おはようございます
echo "早安" | mint -t en # Good morning
cat document.txt | mint -t fr # translate a whole file
✨ Why Mint?
- Zero-config — Single binary; API keys via env vars, no config file pollution
- Multi-provider — Google Gemini, OpenAI, Anthropic, or local Ollama / LM Studio
- Smart detection — Auto-detects language on every call; language-neutral content (numbers, symbols) passes through unchanged
- Smart correction — Same-language input? Auto-corrects grammar & spelling instead of translating
- Streaming — Output streams in real-time, no waiting for long translations
- Composable — Pipe-friendly stdin/stdout; pairs seamlessly with
grep,sed,xargs, and friends
📋 Installation
Homebrew (macOS / Linux)
brew install min0625/tap/mint-ai
pipx
pipx install mint-ai
npm
npm install -g mint-ai
Automated install
macOS / Linux
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/min0625/mint/main/script/install.sh)"
Auto-detects OS and architecture (Linux/macOS, x86_64/arm64), installs to ~/.local/bin. Override with MINT_INSTALL_DIR or pin a version with MINT_VERSION=v1.0.0.
Windows (PowerShell)
irm https://raw.githubusercontent.com/min0625/mint/main/script/install.ps1 | iex
Installs to $HOME\.local\bin. Override with $env:MINT_INSTALL_DIR or pin a version with $env:MINT_VERSION = 'v1.0.0'.
go install
go install github.com/min0625/mint/cmd/mint@latest
Requires Go 1.26+. Binary lands in $GOPATH/bin (usually ~/go/bin).
Manual download
Pre-built binaries are available at GitHub Releases
mint --version
🚀 Quick Start
1. Set your provider
# Google Gemini (free tier available — https://aistudio.google.com/apikey)
export MINT_PROVIDER=google-genai
export MINT_API_KEY=your_gemini_api_key
# OpenAI
export MINT_PROVIDER=openai
export MINT_API_KEY=sk-...
# Anthropic
export MINT_PROVIDER=anthropic
export MINT_API_KEY=sk-ant-...
# Ollama (no API key needed)
export MINT_PROVIDER=openai
export MINT_BASE_URL=http://localhost:11434
export MINT_MODEL_NAME=qwen2.5:7b # use any model loaded in Ollama
# LM Studio (no API key needed)
export MINT_PROVIDER=openai
export MINT_BASE_URL=http://localhost:1234
export MINT_MODEL_NAME=lmstudio-community/Qwen2.5-7B-Instruct-GGUF # use any model loaded in LM Studio
2. Translate
mint --target ja "Good morning"
mint -t zh-TW "Good morning"
echo "The quick brown fox" | mint -t fr
cat document.txt | mint -t zh-TW
Use --verbose / -v to print diagnostic info (detected language, provider, model) to stderr:
mint -t ja -v "Good morning"
# [mint] provider=google-genai model=gemini-3.1-flash-lite detected=en target=ja
# おはようございます
3. Smart language detection
Translation with auto-detection:
export MINT_TARGET_LANG=en
mint "早安" # Detects Chinese → Good morning
Grammar & spelling correction — when input language matches the target, Mint corrects instead of translates:
export MINT_TARGET_LANG=en
mint "Good mooorning" # Detects English → Good morning
mint "She don't know nothing" # Detects English → She doesn't know anything
mint "i luv coding" # Detects English → I love coding
Language rotation — translates to the next language in the list, wrapping around:
# Two languages
export MINT_TARGET_LANG=en,zh-TW
mint "Hello" # en → zh-TW: 你好
mint "你好" # zh-TW → en: Hello
# Three languages
export MINT_TARGET_LANG=en,zh-TW,ja
mint "Hello" # en → zh-TW: 你好
mint "你好" # zh-TW → ja: こんにちは
mint "こんにちは" # ja → en: Hello
🔑 Environment Variables
| Variable | Description | Default |
|---|---|---|
MINT_PROVIDER |
google-genai | openai | anthropic |
— (required) |
MINT_API_KEY |
API key; required when using the default endpoint; optional when MINT_BASE_URL is set (proxy handles auth) |
— |
MINT_BASE_URL |
Custom API base URL (domain only; each provider appends its own path); use with openai to target Ollama (http://localhost:11434), LM Studio (http://localhost:1234), or any other OpenAI-compatible endpoint |
Provider default |
MINT_MODEL_NAME |
Model to use | gemini-3.1-flash-lite / gpt-4o-mini / claude-haiku-4-5 |
MINT_TARGET_LANG |
Target language(s), e.g. en or en,zh-TW,ja |
System locale |
🗺 Roadmap
- Multi-LLM provider support (Google Gemini, OpenAI, Anthropic, local via Ollama / LM Studio)
- Smart language detection and multi-language rotation via
MINT_TARGET_LANG - Explicit target language via
--target/-tflag - Streaming output
- 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 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.4-py3-none-win_amd64.whl.
File metadata
- Download URL: mint_ai-0.0.4-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 |
b9b8727cc070e95cddd02c698f9f34501b62c81b399a3db1bc7dfaa6f8c5ea59
|
|
| MD5 |
e2c0bf0804cdeed449dcaa08702a8379
|
|
| BLAKE2b-256 |
8214dff5e7c962514eaaaa39ceb9daa79c004e70401d982b3f6cc070490bda1d
|
Provenance
The following attestation bundles were made for mint_ai-0.0.4-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.4-py3-none-win_amd64.whl -
Subject digest:
b9b8727cc070e95cddd02c698f9f34501b62c81b399a3db1bc7dfaa6f8c5ea59 - Sigstore transparency entry: 1769585703
- Sigstore integration time:
-
Permalink:
min0625/mint@4912cc711cda25242ea9d2cb1029949a2cf24436 -
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@4912cc711cda25242ea9d2cb1029949a2cf24436 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.4-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: mint_ai-0.0.4-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 |
c9691e1fb39e7610403e46a10fc0f3a6a1237da394c2184407dcbf6343710ef1
|
|
| MD5 |
637b9c8d281a397a676381d8c57c007e
|
|
| BLAKE2b-256 |
20ed5f73de437e933df00e01b95cf18a398e0add1e6fb91339b3cb0d2d3873ce
|
Provenance
The following attestation bundles were made for mint_ai-0.0.4-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.4-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
c9691e1fb39e7610403e46a10fc0f3a6a1237da394c2184407dcbf6343710ef1 - Sigstore transparency entry: 1769586452
- Sigstore integration time:
-
Permalink:
min0625/mint@4912cc711cda25242ea9d2cb1029949a2cf24436 -
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@4912cc711cda25242ea9d2cb1029949a2cf24436 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.4-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: mint_ai-0.0.4-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 |
4b3898c38fe99cbb2aa1bcb3e58fc4a2d91d2ba2d2fbbaaef25d9c20ff44a26e
|
|
| MD5 |
307c7e85c20d7d7227b95e334cc340f2
|
|
| BLAKE2b-256 |
cf44d46794ecd50c387c0e30fadf06c97ac272dc754b27b053789689b013a556
|
Provenance
The following attestation bundles were made for mint_ai-0.0.4-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.4-py3-none-musllinux_1_2_aarch64.whl -
Subject digest:
4b3898c38fe99cbb2aa1bcb3e58fc4a2d91d2ba2d2fbbaaef25d9c20ff44a26e - Sigstore transparency entry: 1769587977
- Sigstore integration time:
-
Permalink:
min0625/mint@4912cc711cda25242ea9d2cb1029949a2cf24436 -
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@4912cc711cda25242ea9d2cb1029949a2cf24436 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mint_ai-0.0.4-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 |
a3c4cbc06e4842c363c6909ec4b7071b85bfab2d1da14f0a4a61a01b02f36f34
|
|
| MD5 |
c763dd4221e018071d3550a5bc45c3c2
|
|
| BLAKE2b-256 |
5f3c045332ab01dcff947352b3a527a21cf7f986c52b65eac9c7027fd95224ef
|
Provenance
The following attestation bundles were made for mint_ai-0.0.4-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.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
a3c4cbc06e4842c363c6909ec4b7071b85bfab2d1da14f0a4a61a01b02f36f34 - Sigstore transparency entry: 1769586930
- Sigstore integration time:
-
Permalink:
min0625/mint@4912cc711cda25242ea9d2cb1029949a2cf24436 -
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@4912cc711cda25242ea9d2cb1029949a2cf24436 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mint_ai-0.0.4-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 |
5f716b7404fa72f82365f0a70fac5906f7cf6b89a3693b77f914d713a57605a6
|
|
| MD5 |
5f0a03431263721f945aba2777a2cdb8
|
|
| BLAKE2b-256 |
5caf0188c414251fd08e2d31895d4af840b5adb79180875c1dfb99a82217be96
|
Provenance
The following attestation bundles were made for mint_ai-0.0.4-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.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
5f716b7404fa72f82365f0a70fac5906f7cf6b89a3693b77f914d713a57605a6 - Sigstore transparency entry: 1769588595
- Sigstore integration time:
-
Permalink:
min0625/mint@4912cc711cda25242ea9d2cb1029949a2cf24436 -
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@4912cc711cda25242ea9d2cb1029949a2cf24436 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.4-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: mint_ai-0.0.4-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 |
c3321a0c18a4941f692d57909293b92760f7bde865b16d831f3750f92d43753a
|
|
| MD5 |
bb6f4bd7464342c6a96c5c7fcca4e878
|
|
| BLAKE2b-256 |
e084f0a91017c913de503459788404a2bae489f15eea51e712b318ec95497500
|
Provenance
The following attestation bundles were made for mint_ai-0.0.4-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.4-py3-none-macosx_11_0_arm64.whl -
Subject digest:
c3321a0c18a4941f692d57909293b92760f7bde865b16d831f3750f92d43753a - Sigstore transparency entry: 1769587343
- Sigstore integration time:
-
Permalink:
min0625/mint@4912cc711cda25242ea9d2cb1029949a2cf24436 -
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@4912cc711cda25242ea9d2cb1029949a2cf24436 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mint_ai-0.0.4-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: mint_ai-0.0.4-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 |
7d5b96519dbe1246d4f325320c4cfd69a85fb5e8bc8c103f76cf0c6a29557d0d
|
|
| MD5 |
e047e4bc1454223ea8134a45e5e70153
|
|
| BLAKE2b-256 |
f0517fd404a6477918838cbe44b2b94d82075db697fa9cae0954f50cba7d788e
|
Provenance
The following attestation bundles were made for mint_ai-0.0.4-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.4-py3-none-macosx_10_9_x86_64.whl -
Subject digest:
7d5b96519dbe1246d4f325320c4cfd69a85fb5e8bc8c103f76cf0c6a29557d0d - Sigstore transparency entry: 1769588036
- Sigstore integration time:
-
Permalink:
min0625/mint@4912cc711cda25242ea9d2cb1029949a2cf24436 -
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@4912cc711cda25242ea9d2cb1029949a2cf24436 -
Trigger Event:
workflow_run
-
Statement type: