Skip to content
Gemini CLI

Token Diet for Gemini CLI

com.clawhard/tokendiet

Count tokens exactly for any text and see if it fits a 128K, 200K or 1M context window.

client:Gemini CLI transport:streamable-http tools:1

Install Token Diet in Gemini CLI

~/.gemini/settings.json · windows: %USERPROFILE%\.gemini\settings.json

{
  "mcpServers": {
    "tokendiet": {
      "httpUrl": "https://tokendiet.clawhard.com/mcp"
    }
  }
}

Gemini expands $VAR and ${VAR} inside env values, so a secret can live in your shell rather than this file. Gemini CLI docs

What Gemini CLI can do once it is connected

Token Diet in other clients