cd /news/ai-tools/ai-docstring-generators-compared-whi… · home › topics › ai-tools › article
[ARTICLE · art-150994] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=· neutral

AI Docstring Generators Compared: Which One Actually Works?

A developer benchmarked the current generation of AI docstring generators—GitHub Copilot, Claude Code, and Windsurf/Devin—against a 60-module Flask API, a typed FastAPI service, and a CLI tool, testing whether each tool's output could be merged without hand editing across Google, NumPy, and Sphinx docstring styles. The developer found Copilot's free tier sufficient for most solo docstring work, Claude Code produced the highest-quality output and could document an entire repo in one pass but sometimes made unsolicited code fixes, and Windsurf's inline quality was roughly Copilot-level.

read8 min views3 publishedOct 15, 2026

Every Python developer has opened a file, found a function called process() with three arguments and no docstring, and quietly despised whoever wrote it. In 2026 that person is usually an AI agent. Here's the thing nobody warned us about: documentation debt didn't disappear when the coding assistants arrived. It changed shape. Code now ships faster than ever — and it ships undocumented faster than ever, because agents write functions the same way I write grocery lists.

So I spent the last few weeks running the current generation of AI docstring generators through the same gauntlet: a 60-module Flask API I inherited, a mid-size FastAPI service with clean type hints, and a scrappy little CLI tool with almost none. Same test functions, same three docstring styles (Google, NumPy, Sphinx), same question for every tool: would I merge this output without editing it by hand?

Here's what actually works in 2026 — including which free option beats several paid ones, and why one pricing page made me double-check my calendar.

Copilot is the most widely deployed docstring tool of 2026, not because anyone built it for docs, but because docs fall out of it as a side effect. Highlight a function, ask for a docstring, and it writes Google-style or NumPy-style output that reflects what the code actually does — because it has already read the rest of your file, your tests, and often the sibling modules.

I checked the pricing on GitHub's own plans page: Free at $0 with 2,000 completions per month and limited chat, Pro at $10/month, Pro+ at $39/month, Max at $100/month. Business plans exist, but individuals are who I care about here.

What surprised me most: the free tier is enough for the majority of solo docstring work. Two thousand completions a month sounds stingy until you remember that documenting a function is one completion, not one per keystroke. The output was consistently good on well-typed code and merely decent on dynamic legacy code — same as paid tiers. What I don't love: Copilot documents the function in front of you and nothing else. There is no "scan the repo and fill the gaps" mode, no coverage percentage, nothing that prevents undocumented code from reaching your main branch. It's a brilliant writing tool and a nonexistent enforcement tool.

If your actual problem is "this repo has 400 undocumented functions," Copilot's one-at-a-time flow is the wrong shape. Claude Code reads the whole tree. Point it at a directory, tell it to document everything while preserving docstrings that already exist, and it grinds through the backlog in one pass. This produced the highest-quality output of anything I tested: it catches Raises clauses, understands that a transfer_funds() function debits one account and credits another, and writes usage examples that actually run. Pricing, straight from Anthropic: Claude Code is bundled into Claude Pro at $17/month (annual, $200 paid up front; $20 if billed monthly), Max 5x at $100/month, and Max 20x at $200/month. You can also run it against the API and pay per token — my batch runs on smaller repos cost a few dollars each.

The catch: it's not a docstring tool, it's an agent with opinions. On one legacy module it "fixed" a subtle bug while documenting it. The fix was correct, but I hadn't asked for it, and reviewing a diff that's 80% docstrings and 20% unsolicited refactors is its own kind of work. Predictable one-command behavior is exactly what a documentation job wants, and an autonomous agent is exactly not that.

The Codeium → Windsurf → Devin consolidation is complete: windsurf.com/pricing now redirects to Devin's page. The current lineup is Free at $0 (light agent quota, unlimited Tab completions and inline edits), Pro at $20/month, Max at $200/month, and Teams at $80/month plus $40 per seat.

Inline docstring quality is good — roughly Copilot-level on Python, occasionally better on TypeScript-flavored code. But here's my honest objection: you're paying $20/month for an autonomous agent platform, and docstrings are a rounding error inside that feature set. If documentation is your goal, this is the most expensive route to an output that Copilot's free tier also produces. Full disclosure of bias first: this is my own tool, and I use it daily to document my Python modules. It's a single-file Python CLI with zero dependencies that runs offline by default — no API key needed. ai-doc-gen scan finds every undocumented function in a codebase, ai-doc-gen generate --apply inserts docstrings in place while preserving your formatting, and ai-doc-gen check --fail-below 80 fails your CI build when documentation coverage drops. There's an optional --llm flag for model-generated prose when you want it, plus automatic README-style API reference generation and JSON export. It's $49 once — no seats, no monthly meter — at AI Doc Generator.

Disclosure: This post contains affiliate links. If you buy through them I may earn a commission at no extra cost to you.

On the PyPI side, the tool I liked most is docstring-ai — MIT-licensed, published April 2026, maintained by a single developer. pip install docstring-ai, point it at a file or a directory, pick google, numpy, or sphinx style, and it batch-generates while skipping functions that already have docs. Dry-run mode prints a summary — "Generated: 8 / Already had: 3 / Skipped: 2" — before it touches a single file, and the whole thing is CI-ready.

Price of the tool: $0. Price of running it: whatever your ANTHROPIC_API_KEY bill comes to, because it requires one. For a one-time backfill that's pocket change. Wire it into CI on every push and the API bill becomes the subscription you never signed up for. Still, for a zero-cost, no-seat-license batch pass, nothing else in this bracket came close.

Two years ago this article would have opened with docstring.io and PyDoc AI. I couldn't reach either site this month, and searching for PyDoc AI now returns nothing at all. Stenography, the auto-document-on-save darling, is listed by third-party trackers as possibly dead and its domain no longer loads for me either. These tools have joined the docstring graveyard, and honestly, the business model deserved to die there: a standalone startup charging per seat to do the one thing every general coding assistant now does for free.

Even Sourcegraph Cody — the "ask your codebase anything" champion — is gone as an individual option. Sourcegraph's pricing page in 2026 is enterprise-only: contact sales, credit allocations, no self-serve tier. If your docstring strategy depends on Cody, your docstring strategy depends on a sales call.

For two years, Google's free tier was my "free beats everything" recommendation for individuals. Then, per Google's own banner, the Gemini CLI and Gemini Code Assist IDE extensions for unpaid users were replaced by Antigravity on June 18, 2026, with a migration demanded or face disruption. Paid Gemini Code Assist runs $22.80/month monthly or $19/month on annual commitment for Standard; Enterprise is $54 or $45. The lesson I took: a free tier owned by a company that rebrands its whole developer stack overnight is a free tier with an expiry date you don't control.

Tool How it works Price Output quality Best for
GitHub Copilot Inline docstring generation in VS Code/JetBrains via chat or /doc; no repo-wide scan Free (2,000 completions/mo); Pro $10/mo Very good on typed code; average on dynamic legacy code Documenting functions as you write them — best free option tested
Claude Code Agentic batch documentation of whole directories; preserves existing docs Included in Claude Pro $17–20/mo; Max $100–200/mo; or API per-token Excellent — Raises clauses, running examples, real business context Backfilling a large legacy repo in one pass
Devin (ex-Codeium/Windsurf) Inline edits + Tab completions inside an autonomous agent platform Free (light quota); Pro $20/mo; Teams $80/mo + $40/seat Good, Copilot-level on Python Teams already buying an agent platform for other reasons
docstring-ai (PyPI, open source) Batch CLI: file/directory scan, Google/NumPy/Sphinx styles, dry-run, CI-ready Tool free (MIT); you pay the Anthropic API bill Good and consistent; style-strict Zero-seat-cost CI pipelines and scripted backfills
Gemini Code Assist → Antigravity IDE completions + chat; free tier replaced by Antigravity in June 2026 Standard $19–22.80/mo; free tier now Antigravity Good; historically generous free limits Google-stack teams already on GCP
AI Doc Generator (our tool) Offline-first single-file CLI: scan, generate --apply, CI coverage gate, README export $49 one-time Structured and consistent; optional LLM mode for prose Enforcing documentation coverage in CI without a subscription
If you document functions as you write them, **Copilot's free tier genuinely beats most paid options**, and I didn't expect to say that in 2026. Two thousand completions a month covers most solo developers, and the output quality at $0 was indistinguishable from the $10 tier on my test modules.

If you're backfilling an old repo, **Claude Pro is the best quality-per-dollar** if you already pay for it — one afternoon of agent time and a few dollars of API-style usage for hundreds of docstrings. If you refuse per-seat subscriptions entirely, a batch CLI is the honest answer: the open-source docstring-ai costs nothing but API tokens, and a one-time $49 tool like [AI Doc Generator](https://nandminc.gumroad.com/l/urnrqt) is the only thing here that behaves like a product instead of a meter.

If someone on your team still proposes a docstring-only startup: check whether its website loads first. The category lost to general assistants, and the survivors are the assistants.

The uncomfortable summary: in 2026, almost nobody should pay specifically for docstring generation. Pay for an assistant you'd use anyway and let it document — or pay once for enforcement in CI. Everything else is renting a hammer.

If you're wiring documentation checks into a bigger automation setup, my [guide to the best free AI tools that are actually free](https://aistacklab2026.blogspot.com/2026/10/best-free-ai-tools-that-are-actually.html) covers the rest of the stack.

Questions? Email [nandminc2020@gmail.com](mailto:nandminc2020@gmail.com).
── more in #ai-tools 4 stories · sorted by recency
── more on @github copilot 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/ai-docstring-generat…] indexed:0 read:8min 2026-10-15 · —