AI Code Documentation
Now available on Open VSX Registry — install directly in Cursor & VS Code

Add documentation to any codebase
— in seconds.

12 languages. JSDoc, PyDoc, Javadoc, Doxygen and more.
Bring your API key — your code never touches our servers.

Or install the CLI and document your entire codebase from your terminal.

🔒 Your code stays local
🔑 Your API key, your calls
🧠 Zero data retention
⚡ No backend sees your code
💡 Why Comments Matter

Comments are instructions for AI

Copilot, ChatGPT, and Cursor read your comments to understand developer intent. What comments describe code. Why comments explain the decision — trade-offs, edge cases, reasoning.

what-comment.js
What comment — useless to AI

        
RAG 0/100
F
GEO 0/100
F
No intent No context AI blind
why-comment.js
Why comment — AI gold
RAG 0/100
A+
GEO 0/100
A+
Intent ✓ Context ✓ Compliance ✓
Why comments give AI coding assistants intent, trade-offs, and context — the exact signal needed for better autocomplete, smarter PR reviews, and accurate RAG retrieval. See CLI demo ↓
⚙️ How It Works

Up and running in 60 seconds

1
Add your OpenAI, Anthropic, or Google API key
2
Paste or upload code — or — run poly-glot comment src/auth.js in your terminal
3
Click "Generate Comments" — or — add --why or --both flags for Pro modes
4
Get standardized docs instantly — inline in your file or printed to stdout
🧑‍💻 Paste Code. Get Documentation.

Try it free — sign up takes 30 seconds

Create a free account, paste your OpenAI, Anthropic, or Google key, and generate documentation instantly. Your key goes directly to the provider — never to us. Get an Anthropic or OpenAI or Google AI Studio key ↗ · or install the CLI ↗

🚀
⚙️ API Settings
🔐 Sign in to save your API key and start generating. Sign up free →
Your Code
Commented Code
💬

Your documented code will appear here

RAG-ready · GEO-optimized · Documented

⌨️ Prefer the terminal? CLI Tool v2.1.41 on npm — batch commenting, CI/CD & scripting ↓
⌨️ CLI Tool

⌨️ CLI Tool v2.1.45 on npm

Comment code from your terminal. poly-glot-ai-cli is a zero-dependency command-line tool for batch commenting, CI/CD pipelines, and scripting — powered by the same AI engine as the web app.

Terminal
$ npm install -g poly-glot-ai-cli
$ poly-glot comment vectorStore.py --why
Poly-Glot — 📝 doc-comments + 💬 why-comments
✓ Processing vectorStore.py (Python · PyDoc)
✓ Done — 12 functions documented · ~$0.003 · 4.2s
📋 CLI Flags Reference — click to expand all flags
🧠 RAG & GEO

Why Comments Matter for AI

AI coding assistants like Copilot, ChatGPT, and Claude actively read and interpret your comments to understand intent, context, and business logic. Well-written comments are instructions for AI.

💬
Contextual Understanding
AI uses comments to understand the "why" behind your code — enabling far more accurate suggestions and completions.
Code Generation
When you write a clear comment, AI uses it to prompt the generation of corresponding implementation — turning intent into code.
🐛
Refactoring & Debugging
Comments help AI understand intended functionality, making it significantly better at spotting bugs and suggesting improvements.
📄
PR Summaries & Docs
AI analyses code and comments together to auto-generate accurate documentation, PR summaries, and onboarding guides.
✦ Poly-Glot Assistant

Ask anything about your code — in plain English 🦜

Context-aware AI chat built right into the tool. Explain functions, find bugs, suggest refactors, write tests — paste any code and get instant answers.

🔍
Explain this function
Paste code, get a plain-English breakdown with context and logic flow.
🐛
Find bugs
Audit for edge cases, null dereferences, and error handling gaps.
Suggest refactors
Concrete, actionable improvement suggestions with before/after diffs.
🧪
Write tests
Generate unit tests directly from function signatures and doc comments.
🧠
Context-aware
Understands your full file, not just one snippet in isolation.
🤖
OpenAI, Anthropic & Google
Works with GPT-4o, Claude 3.5 Sonnet, Gemini 2.5 Flash, or any model you prefer.

💡 Want to generate doc-comments for your code? That's the core product — use the generator above ↑ or the CLI. The assistant handles Q&A, debugging, refactors, and tests.

💻 Also available in VS Code Extension — View on Marketplace ↗
🦜
Poly-Glot Assistant
Online · Ask me anything
calculatePrice.ts
Can you explain what this function does and flag any potential issues?
calculatePrice() totals items and applies a tax rate. Issue: taxRate is never validated — passing undefined silently returns NaN. Add a guard:
if (!taxRate || isNaN(taxRate))
  throw new Error('Invalid tax rate')
Can you write a JSDoc comment for it?
Sure — here's the full JSDoc block:
/**
 * Calculates order total with tax.
 * @param {Array}  items    - Line items with price & qty
 * @param {number} taxRate  - Decimal rate e.g. 0.08 for 8%
 * @returns {{ subtotal: number,
 *             tax: number,
 *             total: number }}
 * @throws {Error} If taxRate is missing or NaN
 */
Try:
💻 VS Code Extension

Comment code without leaving your editor

Select code → keyboard shortcut → documented code appears inline. Supports Doc, WHY, and Both modes with full Pro plan gating.

⌘⇧/Generate doc-comments for selection
⌘⇧WAdd WHY-comments (Pro)
⌘⇧BBoth doc + WHY in one pass (Pro)
⌘⇧EExplain Code — full analysis
⚡ Install Free in VS Code View on Marketplace ↗
💻 VS Code — Now Live on Marketplace
🤖 GitHub Copilot Chat@poly-glot /comment
⌨️ Keyboard shortcuts — all 4 modes mapped
🔑 API key in OS keychain — never in settings.json
🔒 Pro plan gating — WHY & Both locked on Free
✓ v1.4.57 on Marketplace Requires VS Code 1.95+
🤖 GitHub Copilot Chat

Use Poly-Glot inside Copilot Chat

Type @poly-glot in GitHub Copilot Chat. Select code, run a command, get documentation — all without leaving your editor.

@poly-glot /comment
Generates JSDoc, Javadoc, or PyDoc for your selected code — shown in chat with an Apply to Editor button
@poly-glot /why Pro
Adds inline why-comments explaining intent, trade-offs & non-obvious decisions
@poly-glot /both Pro
Doc-comments + why-comments in a single pass — the most complete commenting mode
@poly-glot /explain
Deep analysis: complexity score, bug list, doc quality (0–100), and full function breakdown
@poly-glot /upgrade
Shows Free vs Pro feature table.
@poly-glot
Ask naturally — "comment this function", "why is this written this way?", "explain this code"
🤖 Install & Use in Copilot 💎 Get Pro — $12/mo
🏗️ Legacy Codebases

Standardize Legacy Codebases & Minimize Tech Debt

Legacy codebases are a minefield of undocumented decisions, tribal knowledge locked in the heads of engineers who may have already left, and comment styles that vary wildly between files, teams, and decades of contributors. Poly-Glot gives engineering teams a repeatable, AI-powered workflow to bring legacy code up to modern documentation standards — without a costly rewrite.

📋
Enforce a Unified Comment Standard
Run Poly-Glot across your entire codebase to normalize all comments to a single style — JSDoc, PyDoc, Javadoc, or Doxygen — regardless of how many authors or years of drift are baked in.
🧭
Surface Hidden Business Logic
AI-generated why comments extract implicit reasoning buried in old code — turning opaque workarounds and forgotten edge-case handling into documented, searchable knowledge your whole team can trust.
⚠️
Reduce Onboarding & Bug-Risk Debt
Undocumented code slows new engineers down and breeds accidental regressions. Poly-Glot reduces both — new contributors understand intent faster, and reviewers catch context-breaking changes before they merge.
🤖
Make Legacy Code AI-Ready
Copilot, Cursor, and RAG pipelines all perform better on well-commented code. Poly-Glot brings your legacy codebase up to the documentation density those tools need to give accurate, context-aware suggestions.
🔁
Integrate Into Your CI/CD Pipeline
Use the poly-glot-ai-cli in pre-commit hooks or CI checks to enforce documentation standards on every new file — stopping tech debt before it accumulates in your next sprint.
📉
Measurable Debt Reduction
Track documentation coverage before and after using Poly-Glot's built-in RAG & GEO scoring. Watch your codebase's retrievability and AI-readiness scores improve file by file, sprint by sprint.
💡 Pro tip for teams: Start with your highest-churn, lowest-documented files first — Poly-Glot's CLI --diff flag lets you review every AI-generated comment before it lands, so your team stays in control throughout the migration.
🔌 MCP Server

Use Poly-Glot from any MCP client

Goose, Claude Desktop, Cursor, Windsurf — any MCP client can call Poly-Glot's tools directly. Document, explain, and analyze code without leaving your workflow.

💎 Pro+ Required · Free: 🔒 blocked  ·  Pro: 200 calls/mo  ·  Team: 1,000 calls/mo  ·  Enterprise: unlimited See plans →
mcp-config.json
{
  "command": "npx",
  "args": ["-y", "poly-glot-mcp"],
  "env": {
    "POLYGLOT_SESSION_TOKEN": "pg_...",
    "POLYGLOT_PROVIDER":      "openai",
    "POLYGLOT_API_KEY":       "sk-...",
    "POLYGLOT_MODEL":         "gpt-4.1-mini"
  }
}
🔑 Get your POLYGLOT_SESSION_TOKEN from poly-glot.ai/dashboard → Account → API Token. Requires Pro or above.
polyglot_add_doc_comments
polyglot_add_why_comments
polyglot_add_all_comments
polyglot_explain_code
polyglot_list_languages
polyglot_list_models
📦 poly-glot-mcp v1.1.8 on npm → 💎 Get Pro — Unlock MCP
🐙 GitHub App

Auto-document every pull request

Install once — Poly-Glot AI reviews every PR automatically. It scans changed files, detects missing documentation, and posts inline JSDoc, PyDoc, Javadoc, or Doxygen suggestions as review comments.

🆓 Free — 25 PR reviews / month 💎 Pro — Unlimited PR reviews 👥 Team — Unlimited + 5 seats
📂 PR openedAutomatically scans all changed files
📊 Coverage checkGitHub Check Run with per-file doc scores
💬 Inline suggestionsReview comments with full documented code
⚙️ .polyglot.ymlConfigure mode, language, thresholds per repo
🐙 Install on GitHub Free 💎 Upgrade for Unlimited PRs View Source ↗
🐙 GitHub App — Now Live on Marketplace
🌐 12 languages — JSDoc, PyDoc, Javadoc, Doxygen, KDoc, GoDoc, Rustdoc & more
🔒 Your code stays private — no storage, no data retention
🔑 Bring your own API key — OpenAI or Anthropic, configured per repo
⚙️ .polyglot.yml config — mode, coverage threshold, file filters
✓ Live on GitHub Marketplace Open source · MIT License
GitHub PR Review — Poly-Glot AI
🤖 Poly-Glot AI Documentation Analysis
Files analyzed: 3 · Needing docs: 2 · Coverage: 45%
📝 auth.js — JSDoc suggestion:
/**
* Authenticates a user with email + password.
* @param {string} email
* @param {string} password
* @returns {Promise<AuthResult>}
*/
✓ Posted as inline review comment

Enterprise

Custom pricing for large teams. SSO, compliance, private deployment, and dedicated onboarding — built around how your team works.

🔐SSO & SAML
📊Usage Analytics
Private Deployment
🛡️SLA & Dedicated Support