Skip to content

hmoses/poly-glot-github-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Poly-Glot AI β€” GitHub App

Automatically add professional documentation comments to your pull requests.

JSDoc Β· PyDoc Β· Javadoc Β· Doxygen Β· KDoc Β· GoDoc Β· Rustdoc Β· and more

GitHub Marketplace VS Code Marketplace Website License: MIT


πŸš€ What It Does

Poly-Glot AI automatically reviews your pull requests and suggests professional documentation comments for undocumented code. When you open or update a PR, the app:

  1. πŸ” Scans changed files for missing documentation
  2. πŸ“Š Analyzes documentation coverage per file
  3. πŸ€– Generates doc comments using OpenAI or Anthropic
  4. πŸ’¬ Posts inline review suggestions directly on your PR
  5. βœ… Reports a Check Run with coverage metrics

🌐 Supported Languages (12)

Language Doc Format Extensions
JavaScript JSDoc .js, .jsx, .mjs, .cjs
TypeScript TSDoc .ts, .tsx
Python PyDoc .py, .pyi
Java Javadoc .java
Kotlin KDoc .kt, .kts
C Doxygen .c, .h
C++ Doxygen .cpp, .hpp, .cc, .cxx
C# XML Doc .cs
Go GoDoc .go
Rust Rustdoc .rs
Swift Swift Markup .swift
PHP PHPDoc .php
Ruby YARD .rb, .rake

⚑ Quick Start

1. Install from GitHub Marketplace

πŸ‘‰ Install Poly-Glot AI on your repositories.

2. Configure (Optional)

Add a .polyglot.yml to your repository root:

# AI provider: 'openai' or 'anthropic'
provider: openai

# Comment mode: 'doc', 'why', or 'both'
# - doc: Standard documentation comments (JSDoc, PyDoc, etc.)
# - why: Explain reasoning, trade-offs, and edge cases
# - both: Both doc comments and why-comments
mode: both

# Only suggest docs for files below this coverage threshold (0.0–1.0)
coverage_threshold: 0.5

# Maximum files to process per PR
max_files: 15

# Maximum file size in bytes
max_file_size: 50000

# Review style: 'inline' (per-file suggestions) or 'summary' (single comment)
review_style: inline

# Include/exclude file patterns
include: []
exclude:
  - "**/*.test.*"
  - "**/*.spec.*"
  - "**/vendor/**"

# Create a GitHub Check Run with coverage analysis
check_run: true

3. Open a Pull Request

That's it! Poly-Glot AI will automatically analyze your PR and post documentation suggestions.


πŸ’° Plans & Pricing

Feature Free Pro ($9/mo) Team ($29/mo) Enterprise
PR reviews / month 25 Unlimited Unlimited Unlimited
Languages JS, TS, Python, Java All 12 All 12 All 12
Doc comment mode βœ… βœ… βœ… βœ…
WHY comment mode ❌ βœ… βœ… βœ…
Both mode ❌ βœ… βœ… βœ…
Web UI + CLI + VS Code Limited Full Full Full
MCP server calls / month ❌ 200 1,000 Unlimited
Seats 1 1 5 Custom
Shared API key pool ❌ ❌ βœ… βœ…
Team dashboard ❌ ❌ βœ… βœ…
SSO / private deployment ❌ ❌ ❌ βœ…
Support Community Email Priority Dedicated SLA

🎁 Use code EARLYBIRD3 for 50% off your first 3 months on Pro

β†’ View all plans at poly-glot.ai

Adding your license token

After subscribing, add your license token to .polyglot.yml to unlock Pro/Team features:

license_token: YOUR_TOKEN_HERE

Get your token at poly-glot.ai/dashboard β†’ Account β†’ License Token.


πŸ’‘ Comment Modes

πŸ“– Doc Mode (default)

Generates standard documentation comments β€” parameters, return types, exceptions:

/**
 * Authenticate a user with email and password.
 * @param {string} email - The user's email address
 * @param {string} password - The user's password (plaintext, hashed internally)
 * @returns {Promise<AuthResult>} Authentication result with token and user profile
 * @throws {AuthenticationError} If credentials are invalid
 */
async function authenticateUser(email, password) { ... }

🧠 Why Mode

Explains the reasoning behind code decisions:

// Why: Rate-limit auth attempts per IP to prevent credential stuffing.
// 5 attempts/min was chosen based on OWASP guidelines.
// Uses sliding window instead of fixed to prevent burst attacks at window edges.
if (await isRateLimited(ip, 5, 60)) { ... }

πŸ“–πŸ§  Both Mode

Combines doc comments AND why-comments for maximum context.

πŸ”’ Privacy & Security

  • Your code stays private β€” the app reads PR diffs only for analysis
  • Your API key β€” uses your own OpenAI or Anthropic key
  • No data retention β€” code is processed in memory, never stored
  • Open source β€” audit every line of this app

See PRIVACY.md for our full privacy policy.

πŸ—οΈ Self-Hosting

You can self-host the Poly-Glot AI GitHub App:

Using Docker

# Clone the repo
git clone https://github.com/hmoses/poly-glot-github-app.git
cd poly-glot-github-app

# Configure
cp .env.example .env
# Edit .env with your GitHub App credentials and API keys

# Run
docker-compose up -d

Using Node.js

git clone https://github.com/hmoses/poly-glot-github-app.git
cd poly-glot-github-app
npm install
cp .env.example .env
# Edit .env with your credentials
npm start

Environment Variables

Variable Required Description
GITHUB_APP_ID βœ… Your GitHub App ID
GITHUB_PRIVATE_KEY βœ… Your GitHub App private key (PEM)
GITHUB_WEBHOOK_SECRET βœ… Webhook secret for signature verification
OPENAI_API_KEY ⚑ OpenAI API key (at least one AI key required)
ANTHROPIC_API_KEY ⚑ Anthropic API key (at least one AI key required)
PORT ❌ Server port (default: 3000)

🧩 Ecosystem

Poly-Glot AI is available across multiple platforms:

Platform Link
🌐 Web App poly-glot.ai
πŸ’» VS Code Extension Marketplace
πŸ€– GitHub App Marketplace
πŸ–₯️ CLI npx poly-glot-ai-cli
πŸ”Œ MCP Server poly-glot-mcp

πŸ“ License

MIT β€” Harold Moses / Poly-Glot AI


poly-glot.ai Β· Add documentation to any codebase β€” in seconds.

About

πŸ€– Poly-Glot AI GitHub App β€” Automatically add professional documentation comments to your pull requests. JSDoc, PyDoc, Javadoc, Doxygen, KDoc & why-comments for 12 languages. Powered by OpenAI & Anthropic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors