npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mint-ai

v0.0.6

Published

Minimalist AI translation CLI powered by LLMs

Downloads

968

Readme

English | 繁體中文

🌿 Mint

Minimalist AI Translation CLI — Simple. Fast. Intuitive.

GitHub Release PyPI npm

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

Auto-detects architecture (x86_64/arm64) and 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

  • [x] Multi-LLM provider support (Google Gemini, OpenAI, Anthropic, local via Ollama / LM Studio)
  • [x] Smart language detection and multi-language rotation via MINT_TARGET_LANG
  • [x] Explicit target language via --target / -t flag
  • [x] Streaming output
  • [x] 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.