Skip to main content

Minimalist AI translation CLI powered by LLMs

Project description

English | 繁體中文

🌿 Mint

Minimalist AI Translation CLI — Simple. Fast. Intuitive.

GitHub Release 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

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.21+. Binary lands in $GOPATH/bin (usually ~/go/bin).

Manual download

Pre-built binaries are available 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.3-py3-none-win_amd64.whl (3.0 MB view details)

Uploaded Python 3Windows x86-64

mint_ai-0.0.3-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.3-py3-none-musllinux_1_2_aarch64.whl (2.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

mint_ai-0.0.3-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.3-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.3-py3-none-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

mint_ai-0.0.3-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.3-py3-none-win_amd64.whl.

File metadata

  • Download URL: mint_ai-0.0.3-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.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 47181058ce7d6a79b1ac1e2d3c815fe758f2800788900cb2ffce0eb0d560f3da
MD5 20922969080a75c6919048bed16bd19b
BLAKE2b-256 ace826bc62f5d6445c066bfb1624e8870529a47be9329560dfd3ee44f5f99942

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.3-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.3-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.3-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 df9285d9ebb10c1b0e56a7d869051ef2682ec0ec31f77319c579305ac390da6d
MD5 3c19e66b0fe61b4fb3f669132d985ea2
BLAKE2b-256 98f57db78f3eb64d39b063b8fafeb6ccf30ed2a9c315e08bda736c80fee2ae2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.3-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.3-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.3-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 44c92622b5028654ed8c567aab1fdb1fd977bbc13796c9e154219a3d98cb4a59
MD5 94538a41ef2b479772f34d1ef643ad4e
BLAKE2b-256 2529dac696d626937388ecaf673ecd04f035e2b0f5ce92fed5764d72688b61d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.3-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.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 78960ffc0cdc4d1bb86e29bfa0164455977e87d5c43153998a90e51adaa3775c
MD5 b5b440a035062e1a14c382140887d619
BLAKE2b-256 a0a3157b021b41eb3f74833daad7c4a0dc86350ccc2781f31177461e9fa65b32

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.3-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.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 839b5fe5cb95d6faff264fc20d6d683a556bdb736e41e7039dcc08c69591eaa6
MD5 26aefd8962bf83859ee8fa04469d96df
BLAKE2b-256 9f5b1c3d1a91629861f63269124d54f33922a80e7eff45f6099ffa891a59ac78

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.3-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.3-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38474420ce6d5fb4a1625e6a2ba63931979998adeb24db955c76d81321e396f6
MD5 089e7fe0774b1350e7b7ea599cee1bdc
BLAKE2b-256 d435b2b14414b3e395323ef4d40c56c53c780a667dbd7f647cc2089f32a287e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.3-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.3-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for mint_ai-0.0.3-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 715a0fd3e1462623821b47e233bc71b654e35a3fbd87fdb764252b636e881db3
MD5 681d4034100a87971c614d50584b0b3e
BLAKE2b-256 0cd570182e538da47de4a6efe9c7c48cc8a189c032b855d64c3af5a8a057e90f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mint_ai-0.0.3-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