Skip to main content

Minimalist AI translation CLI powered by LLMs

Project description

English | 繁體中文

🌿 Mint

Minimalist AI Translation CLI — Simple. Fast. Intuitive.

GitHub Go Reference PyPI npm

Mint is a lightweight, LLM-powered translation tool for the command line. Choose your provider (Google Gemini, OpenAI, Anthropic, or local Ollama) and get fluent translations instantly with optional smart language detection.


✨ Why Mint?

  • Minimal — One command, no noise
  • Multi-provider — Google Gemini, OpenAI, Anthropic, or local Ollama
  • Flexible — Any language pair; smart auto-detection optional
  • Composable — Pipe-friendly stdin/stdout, fits any workflow

📋 Installation

pipx

pipx install mint-ai

npm

npm install -g mint-ai

Automated install (one-liner)

/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), and installs to ~/.local/bin. Override with MINT_INSTALL_DIR or pin a version with MINT_VERSION=v1.0.0.

go install

go install github.com/min0625/mint/cmd/mint@latest

Requires Go 1.21+. Binary lands in $GOPATH/bin (usually ~/go/bin).

Manual download

Pre-built binaries at GitHub Releases

Verify installation

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-...

# Local Ollama (no API key needed)
export MINT_PROVIDER=ollama
export MINT_BASE_URL=http://localhost:11434
export MINT_MODEL_NAME=llama2

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

3. Smart language detection

export MINT_TARGET_LANG=en
mint "早安"             # Detects Chinese → translates to en
mint "Good mooorning"  # Detects English → corrects grammar & spelling

# Rotate across multiple targets
export MINT_TARGET_LANG=en,zh-TW,ja
mint "Hello"       # → zh-TW
mint "你好"        # → ja
mint "こんにちは"   # → en

🔑 Environment Variables

Variable Description Default
MINT_PROVIDER google-genai | openai | anthropic | ollama — (required)
MINT_API_KEY API key (required for all providers except ollama)
MINT_BASE_URL Custom endpoint (required for ollama) Provider default
MINT_MODEL_NAME Model to use gemini-3.1-flash-lite / gpt-4o-mini / claude-haiku-4-5 / none
MINT_TARGET_LANG Target language(s), e.g. en or en,zh-TW,ja System locale or en

🎯 Design Principles

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 to stdout, errors to stderr
Environment-friendly API keys via env vars, 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 / -t flag
  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mint_ai-0.0.2-py3-none-win_amd64.whl (3.0 MB view details)

Uploaded Python 3Windows x86-64

mint_ai-0.0.2-py3-none-musllinux_1_2_x86_64.whl (3.0 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

mint_ai-0.0.2-py3-none-musllinux_1_2_aarch64.whl (2.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

mint_ai-0.0.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

mint_ai-0.0.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

mint_ai-0.0.2-py3-none-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

mint_ai-0.0.2-py3-none-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file mint_ai-0.0.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: mint_ai-0.0.2-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

Hashes for mint_ai-0.0.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 73a68ac1cda3a3cce9891145a307fe0f1d4d05c2f4bd8060dda75528ff279f8f
MD5 8ece62b9c68d6546d420437c996d1b40
BLAKE2b-256 d677747e4b288e2a54bc3c898e1a65149626d694fd4aa321807d2dc689d8743c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.2-py3-none-win_amd64.whl:

Publisher: publish-pypi.yml on min0625/mint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mint_ai-0.0.2-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.2-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 18e6ca52a6c189c792854cc96fdecbee85b06833ae10fdec788d54058185169d
MD5 503c8ebe7471493a2fd377042a1516ef
BLAKE2b-256 3a8adfd0ee77d9801837858f26c9408522550eac89886eba1c7436f34711c343

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.2-py3-none-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on min0625/mint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mint_ai-0.0.2-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.2-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 16cc2270e84117205fb35cbcdd05b99ebbbf3b36ac1f904a870f0ad05cc428e8
MD5 170a7c6fe926bae354ff2042d2541dc9
BLAKE2b-256 a588842045442ad6711b8f407314d7867df1d8987743bc0851c826339781074e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.2-py3-none-musllinux_1_2_aarch64.whl:

Publisher: publish-pypi.yml on min0625/mint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mint_ai-0.0.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fbfdb88ed4035681f2a129db18a2b0f560e4aa9545672c74473e1d8a8edad7ef
MD5 908f086dc0cef3fbe94c27495706610b
BLAKE2b-256 10905b3479129b161126407b97402b414f7b2c63ad1674ffd4b5195a27852f79

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on min0625/mint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mint_ai-0.0.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3ea01f46842d68fbbeb25594899c468303711320ac09a08c62e4bd5cb29f3cad
MD5 3a8f39d305c96f7baa47523751b7e351
BLAKE2b-256 efe86da6833845e1242e4a17beb08b28d19c4960b7241508149ec48cbb937af7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish-pypi.yml on min0625/mint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mint_ai-0.0.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6184116197bf568b7d7795b46ac08577680dcbf2f22e4f03afb33cd0addab3e
MD5 482ee62b15f23db254160d82a1856da4
BLAKE2b-256 0a9ba235a7e00fcca2a0fecba966c0874dcc63a4dd769cdf7002a452dd206fc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.2-py3-none-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on min0625/mint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mint_ai-0.0.2-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.2-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 66934a1056f2e641858c959a6e1e8a3083089f4ad634ddf40649fa1658d3a6e1
MD5 8f30f1dd6716a65222cfb156c82affdb
BLAKE2b-256 73e0a36f9c2b54388d074935070416caffbac266ce73e6671d50d0c5d1b98f30

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.2-py3-none-macosx_10_9_x86_64.whl:

Publisher: publish-pypi.yml on min0625/mint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page