Skip to content
Gemini CLI

pkgtruth for Gemini CLI

io.github.hxckya/pkgtruth

Catches hallucinated and slopsquatted npm and PyPI packages before an agent installs them.

client:Gemini CLI transport:stdio runtime:npm

Install pkgtruth in Gemini CLI

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

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "pkgtruth": {
      "command": "npx",
      "args": [
        "-y",
        "pkgtruth"
      ],
      "env": {
        "PKGTRUTH_REGISTRY": "<PKGTRUTH_REGISTRY>",
        "PKGTRUTH_DOWNLOADS_API": "<PKGTRUTH_DOWNLOADS_API>",
        "PKGTRUTH_CACHE_DIR": "<PKGTRUTH_CACHE_DIR>",
        "PKGTRUTH_TIMEOUT_MS": "<PKGTRUTH_TIMEOUT_MS>"
      }
    }
  }
}

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

pkgtruth in other clients