Poly-Glot — AI Code Comments, JSDoc Generator & Code Documentation
✨ What is Poly-Glot?Poly-Glot is a VS Code extension that uses AI to write your code documentation for you — in seconds. Select a function, press a shortcut, and get perfect, language-native comments inserted directly into your file.
Powered by OpenAI (GPT-4o, GPT-4, o1, o3-mini) and Anthropic (Claude Sonnet 4, Claude Opus 4, Claude Haiku). You bring your own API key — no middleman, no markup, no data collection. 🆓 Free vs 💎 Pro
🎉 Get 3 Months Free — Code
|
| Analysis | Detail |
|---|---|
| 📖 Plain-English summary | What this code does, for any audience |
| 📊 Complexity score (1–10) | Cyclomatic complexity with visual indicator |
| 🔬 Function/method breakdown | Params, return types, side effects |
| 🐛 Potential bugs | Issues the AI detected |
| 💡 Improvement suggestions | Refactoring and optimization ideas |
| 📈 Documentation quality score | 0–100 rating of existing comments |
📚 Templates Sidebar (Free)
Browse a curated library of comment templates for all 12 supported languages. One-click copy to clipboard for:
- Class/module headers
- Function doc-comment skeletons
- License headers
- TODO / FIXME / HACK / DEPRECATED blocks
- API endpoint documentation stubs
💰 Real-Time Cost Tracking (Free)
Every generation displays the exact token cost in the status bar. A typical function documentation costs < $0.001. Document an entire file for pennies.
⌨️ All Commands & Shortcuts
| Command | Mac | Windows / Linux | Plan | Description |
|---|---|---|---|---|
Poly-Glot: Generate AI Comments |
Cmd+Shift+/ |
Ctrl+Shift+/ |
Free | Generate & insert doc-comments inline |
Poly-Glot: Why Comments |
Cmd+Shift+W |
Ctrl+Shift+W |
Pro | Insert intent & trade-off inline notes |
Poly-Glot: Both Comments |
Cmd+Shift+B |
Ctrl+Shift+B |
Pro | Doc-comments + why-comments in one pass |
Poly-Glot: Explain Code |
Cmd+Shift+E |
Ctrl+Shift+E |
Free | Open deep AI analysis side panel |
Poly-Glot: Configure API Key |
— | — | Free | Set provider, model & API key |
Poly-Glot: Configure License Token |
— | — | Pro | Activate Pro license |
Poly-Glot: Open Templates Sidebar |
— | — | Free | Browse comment templates |
⚙️ Settings
| Setting | Default | Description |
|---|---|---|
polyglot.provider |
openai |
AI provider: openai or anthropic |
polyglot.model |
gpt-4.1-mini |
Any valid model ID from your provider (see tables below, or enter a custom ID) |
polyglot.licenseToken |
— | Pro license token from poly-glot.ai |
polyglot.insertInline |
true |
true = insert into file · false = open side panel |
polyglot.commentStyle |
auto |
Force a style: jsdoc, javadoc, pydoc, doxygen, etc. |
🤖 Supported AI Models
Poly-Glot accepts any valid model ID from OpenAI or Anthropic — including models not listed here. Just type the model ID into the polyglot.model setting. The extension will use it directly.
OpenAI Models
| Model | Notes | Est. cost / request* |
|---|---|---|
gpt-4.1-mini ⭐ Recommended |
Best quality-to-cost ratio | ~$0.001 |
gpt-4.1 |
Best GPT-4.1 quality | ~$0.004 |
gpt-4.1-nano 💵 Cheapest |
Fastest & lowest cost | ~$0.0002 |
gpt-4o |
Great quality, widely supported | ~$0.005 |
gpt-4o-mini |
Budget option, very fast | ~$0.0003 |
o3-mini |
Fast reasoning model | ~$0.002 |
o3 |
Most powerful reasoning | ~$0.018 |
o1-mini |
Budget reasoning | ~$0.002 |
o1 |
Full reasoning, slower | ~$0.027 |
gpt-4-turbo |
Previous-gen turbo | ~$0.014 |
gpt-4 |
Classic GPT-4 | ~$0.030 |
gpt-3.5-turbo |
Legacy, lightest output | ~$0.0007 |
Get an OpenAI API key at platform.openai.com.
Anthropic Models
| Model | Notes | Est. cost / request* |
|---|---|---|
claude-sonnet-4-5 ⭐ Recommended |
Excellent quality & speed | ~$0.007 |
claude-opus-4-5 🏆 Most Powerful |
Deepest analysis | ~$0.033 |
claude-haiku-4-5 💵 Cheapest |
Fastest & lowest cost | ~$0.002 |
claude-3-5-sonnet-20241022 |
Proven quality, previous gen | ~$0.007 |
claude-3-5-haiku-20241022 |
Budget Claude, very fast | ~$0.002 |
claude-3-opus-20240229 |
Deep reasoning, older gen | ~$0.033 |
claude-3-haiku-20240307 |
Lightest legacy Claude | ~$0.0006 |
Get an Anthropic API key at console.anthropic.com.
* Estimates based on ~200-token input / 400-token output (a typical small function). Costs scale with file size. Check platform.openai.com/pricing and anthropic.com/pricing for current rates.
Using a custom or unlisted model
Set polyglot.model in VS Code settings to any model ID your provider supports:
// settings.json
{
"polyglot.provider": "openai",
"polyglot.model": "gpt-4o-2024-11-20"
}
{
"polyglot.provider": "anthropic",
"polyglot.model": "claude-3-7-sonnet-20250219"
}
🌍 Supported Languages
| Language | Comment Standard | Format |
|---|---|---|
| JavaScript | JSDoc | /** @param … */ |
| TypeScript | TSDoc / JSDoc | /** @param … */ |
| Python | Google-style docstrings | """Args: …""" |
| Java | Javadoc | /** @param … */ |
| C# | XML doc comments | /// <summary>… |
| C / C++ | Doxygen | /** \param … */ |
| Go | GoDoc | // FunctionName … |
| Rust | rustdoc | /// … |
| Ruby | YARD | # @param … |
| PHP | PHPDoc | /** @param … */ |
| Swift | Swift markup | /// - Parameter … |
| Kotlin | KDoc | /** @param … */ |
| SQL | Header block | -- ============… |
🔒 Privacy & Security
Your code and API keys are 100% private:
- 🔑 API keys stored in OS keychain — VS Code
SecretStorage(macOS Keychain, Windows Credential Manager, Linuxlibsecret). Never written tosettings.jsonor any log file. - 📡 Direct API calls only — requests go from your machine straight to OpenAI or Anthropic. Poly-Glot has no backend server, no relay, no proxy.
- 🚫 Zero telemetry — no usage data, no error reporting, no analytics are ever collected.
- 🏠 Your code never touches our servers — because we don't have any.
OpenAI and Anthropic may use API request data per their own privacy policies. If you're working with sensitive code, check your provider's data-handling settings (both offer zero-data-retention options for API users).
💎 Unlock Pro — 3 Months Free with EARLYBIRD3
If you've tried the Pro features and want to unlock them permanently:
- Visit poly-glot.ai/#pg-pricing-section
- Choose a plan and enter code
EARLYBIRD3at checkout - Get 3 months completely free
- Copy your license token from your account dashboard
- In VS Code: Command Palette →
Poly-Glot: Configure License Token→ paste token → Pro activates instantly
Pro unlocks:
- ✅ Why-Comments (
Cmd+Shift+W) - ✅ Both Mode (
Cmd+Shift+B) - ✅ All 12 language support (C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, SQL)
- ✅ Unlimited file generations per month
❓ FAQ
Do I need a Poly-Glot account? No account is required for the Free tier. Just bring your own OpenAI or Anthropic API key.
Does Poly-Glot work offline? No — it needs to reach the OpenAI or Anthropic API. But no other internet connection is required.
Can I use both OpenAI and Anthropic?
You can switch providers any time via Poly-Glot: Configure API Key. Only one provider is active at a time.
Will comments be inserted into my file or shown in a panel?
By default, comments are inserted inline at the correct position in your file. Set polyglot.insertInline: false to open a diff panel instead.
What if I select nothing? Poly-Glot documents the entire active file — great for batch documentation.
Is there a team or enterprise plan? Email support@poly-glot.ai for team licensing.
🗺 Roadmap
- [ ] Auto-comment on save
- [ ] Bulk comment entire workspace / folder
- [ ] GitHub Actions integration
- [ ] Custom comment templates editor
- [ ] Team shared templates
Have a feature request? Open an issue on GitHub or email support@poly-glot.ai.
📦 About
Version: 1.3.1
Publisher: poly-glot-ai
Marketplace: poly-glot-ai.poly-glot
Website: poly-glot.ai
License: MIT © Harold Moses
Keywords: AI code comments, JSDoc generator, Javadoc generator, PyDoc generator, Doxygen, KDoc, rustdoc, GoDoc, PHPDoc, YARD, Swift markup, code documentation, why comments, code explainer, OpenAI, Anthropic, Claude, GPT-4, GPT-4o, o3-mini, Claude Sonnet, Claude Opus, AI documentation, automatic comments, VS Code AI, code commenting tool