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

poly-glot-ai-cli

v2.1.45

Published

AI-powered code comments, bug finding, refactoring & test generation — Poly-Glot CLI

Downloads

372

Readme

⌨️ poly-glot-ai-cli

AI-powered code documentation for 12 languages — generate JSDoc, Javadoc, PyDoc, Doxygen, KDoc, rustdoc, GoDoc and "why" comments from your terminal.

npm version npm downloads License


Install

npm install -g poly-glot-ai-cli

Requires Node.js 18+.


Quick Start

poly-glot login                           # create free account (required)
poly-glot config --provider openai        # set your API key interactively
poly-glot comment src/auth.js             # add doc-comments to a file
poly-glot comment --dir src/ --yes        # comment entire directory

Plans & Limits

Every user must sign in. Limits are enforced server-side.

| Plan | Files/month | Languages | Features | Price | |------|:-----------:|-----------|----------|-------| | Free | 50 | JS, TS, Python, Java | Doc-comments, Web UI, CLI | $0 | | Pro | Unlimited | All 12 | Why-comments, Both mode, MCP (200 calls/mo) | $9/mo | | Team | Unlimited | All 12 | Everything Pro + MCP (1,000 calls/mo), 5 seats | $29/mo | | Enterprise | Unlimited | All 12 | Custom seats, SSO, dedicated support | Custom |

🎁 Use code EARLYBIRD3 at Pro checkout to lock $9/mo forever (expires May 1, 2026). Upgrade at poly-glot.ai →


Commands

# Account
poly-glot login                           # sign in / create free account
poly-glot config                          # interactive setup wizard

# Single file
poly-glot comment <file>                  # add doc-comments
poly-glot comment <file> --dry-run        # preview without writing
poly-glot comment <file> --diff           # show unified diff before writing
poly-glot comment <file> --backup         # write + save .orig backup
poly-glot comment <file> --why            # why-comments (Pro)
poly-glot comment <file> --both           # doc + why in one pass (Pro)
poly-glot why <file>                      # shorthand: why-comments only (Pro)
poly-glot both <file>                     # shorthand: both modes (Pro)

# Directory
poly-glot comment --dir <dir>             # comment all supported files
poly-glot comment --dir <dir> --yes       # skip confirmation prompt
poly-glot comment --dir <dir> --dry-run   # preview all files, no writes
poly-glot comment --dir <dir> --diff      # show diffs for every file
poly-glot comment --dir <dir> --backup    # write + .orig backups
poly-glot comment --dir <dir> --output-dir <out>  # preserve originals

# stdin / stdout
cat main.py | poly-glot comment --stdin --lang python
cat main.py | poly-glot comment --stdin --lang python --why

# Analysis (Pro)
poly-glot bugs <file>                     # find bugs & edge cases
poly-glot refactor <file>                 # before/after refactor diffs
poly-glot test <file>                     # generate unit tests
poly-glot explain <file>                  # deep code analysis

# Config flags
poly-glot config --key <key>              # set API key non-interactively
poly-glot config --provider <name>        # openai | anthropic | google
poly-glot config --model <id>             # override model
poly-glot config --mode <m>               # comment | why | both
poly-glot config --token <token>          # set session token (Pro)
poly-glot --version                       # print version

Supported Languages

| Language | Comment Style | |----------|--------------| | JavaScript | JSDoc | | TypeScript | TSDoc | | Python | Google-style docstrings | | Java | Javadoc | | C++ | Doxygen | | C | Doxygen | | C# | XML doc comments | | Go | GoDoc | | Rust | rustdoc | | Ruby | YARD | | PHP | PHPDoc | | Swift | Swift markup | | Kotlin | KDoc | | SQL | Header blocks |

Free plan: JS, TS, Python, Java only. All 12 on Pro+.


Supported Models

OpenAI

| Model | Notes | |-------|-------| | gpt-4.1-mini ⭐ | Recommended — best quality-to-cost | | gpt-4.1 | Best GPT-4.1 quality | | gpt-4.1-nano | Fastest & cheapest | | gpt-4o | Great quality, widely supported | | o3 | Most powerful reasoning |

Anthropic

| Model | Notes | |-------|-------| | claude-sonnet-4-5 ⭐ | Recommended — excellent quality & speed | | claude-opus-4-5 | Most powerful Claude | | claude-haiku-4-5 | Fastest & cheapest |

Google

| Model | Notes | |-------|-------| | gemini-2.5-flash ⭐ | Recommended — fast, accurate, low cost | | gemini-2.5-pro | Most powerful Gemini | | gemini-2.5-flash-lite | Cheapest Gemini | | gemini-2.0-flash-001 | Stable, widely available |


Environment Variables

| Variable | Description | |----------|-------------| | POLYGLOT_API_KEY | OpenAI, Anthropic, or Google AI API key | | POLYGLOT_PROVIDER | openai | anthropic | google | | POLYGLOT_MODEL | Model ID override | | POLYGLOT_MODE | comment, why, or both | | POLYGLOT_LICENSE_TOKEN | Session token — skips login gate in CI/CD | | CI | Set to true to skip interactive prompts |


CI/CD (GitHub Actions)

- name: Add doc comments with Poly-Glot
  env:
    POLYGLOT_API_KEY: ${{ secrets.POLYGLOT_API_KEY }}
    POLYGLOT_PROVIDER: openai
    POLYGLOT_MODEL: gpt-4.1-mini
    POLYGLOT_MODE: both
    POLYGLOT_LICENSE_TOKEN: ${{ secrets.POLYGLOT_LICENSE_TOKEN }}
  run: |
    npm install -g poly-glot-ai-cli
    poly-glot comment --dir src/ --output-dir src-commented/ --yes

POLYGLOT_LICENSE_TOKEN is your session token from poly-glot.ai. Pro required for --why / --both / --mode both in CI.


GitHub App

Poly-Glot also runs as a GitHub App — automatically reviews pull requests, scores documentation coverage, and posts inline comment suggestions on every PR.

👉 Install the GitHub App


MCP Server (Pro+ only)

Use Poly-Glot from Claude Desktop, Goose, Cursor, Windsurf and any MCP client.

npx poly-glot-mcp

Requires a Pro or higher plan + POLYGLOT_SESSION_TOKEN. See MCP README →


npm-stats-start


License

AGPL-3.0-or-later © Harold Moses


Support & Enterprise

📧 [email protected] 🌐 poly-glot.aiGitHub