An Indie Developer's Documentation Dilemma
You've surely seen this kind of open-source repo: the code is well-written, but the README is only two lines—the project name and a note saying "continuously improving." What's more awkward is my own situation: last month I launched a small utility library, its stars climbed past three hundred, yet the issue section was packed with questions like "how do I install it," "can you give an example," and "what does this parameter mean?"
Let me do the math: I spend about 40 minutes a day answering these questions, which adds up to roughly 14 hours over three weeks—and that doesn't even include writing the README itself. As for writing the README, I've been "planning it for three weeks." This is how an indie developer's time gets torn apart: the passion for writing code is real, and so is the procrastination on writing documentation.
This isn't an attitude problem; it's a cost problem. A decent README needs: project introduction, installation steps, quick-start example, API documentation, and FAQs. Writing one by hand takes at least 3-4 hours; add runnable example code, and you'll need repeated debugging—half a day gone just like that. For a solo developer or a team of two or three, that half day is forever "maybe next time."
The Shift: Let AI Take Over the Documentation Burden
I decided to try a different approach: instead of writing it myself, I'd let AI generate the first draft, and I'd only proofread and correct it. The whole process has four steps. In practice, a medium-sized project takes about 50 minutes total (including review time)—compared to the original estimate of over 4 hours, that's roughly an 80% reduction.
Step 1: Prepare Materials, Not Prose
The AI doesn't need you to write well, but it does need "raw materials." I fed it three things:
- The project's directory structure (the output of
tree -L 2) - The entry file code (core API definitions)
- The five most frequently asked questions from past issues
This step takes 10 minutes. The key insight: the issue section is the most authentic requirements list. Whatever users ask about is what the README should cover.
Step 2: Generate the README Draft with a Structured Prompt
This is the prompt template I've settled on after repeated iterations—feel free to copy and use it directly:
你是一位资深开源项目维护者。请根据以下信息为我的项目生成一份完整的README.md。
## 项目信息
- 项目名称:{项目名}
- 一句话定位:{项目做什么,解决什么问题}
- 技术栈:{语言/框架/依赖}
- 目录结构:
{粘贴 tree 命令输出}
- 核心入口代码:
{粘贴主要API或入口文件代码}
## 要求
1. 结构包含:项目简介、特性列表(3-5条)、安装步骤、
快速上手(含完整可运行代码块)、API说明表、FAQ、License
2. 快速上手示例必须是可直接复制运行的最小完整代码,
不要省略 import 和初始化
3. 语气面向初次接触本项目的开发者,避免内部术语
4. FAQ部分围绕这些真实用户问题展开:
{粘贴高频issue}
5. 中文撰写,代码注释用中文
## 输出格式
直接输出Markdown全文,不要额外解释。One generation takes about 2-3 minutes. The first output is usually about 70% complete; what remains is details.
Step 3: Generate Runnable Examples and Verify Them
The most valuable part of a README is the "copy and run" examples. I had the AI separately generate three progressive examples: minimal run, common configuration, and advanced usage. The critical action: actually run every single one of them. AI-generated examples occasionally have issues like outdated parameter names or missing dependencies—in my experience, about two out of ten examples needed fixes. This step takes 15 minutes and is the one part of the process you absolutely cannot skip—a non-working example damages your reputation more than having no example at all.
Step 4: Have the AI Critique Its Own Work
Finally, I feed the generated README back to the AI with one follow-up prompt: "Assume you're a developer seeing this project for the first time. Point out three places in the README where you'd be confused or get stuck." The AI's self-review often catches problems like skipped steps in the installation instructions or unstated prerequisites. That's another round of real-user pain points saved.
Before and After: It's Not Just About Speed
| Task | Manual | AI-Assisted |
|---|---|---|
| README writing | 3-4 hours | 25 minutes (including iteration) |
| Runnable examples | 2 hours (including debugging) | 15 minutes |
| FAQ compilation | 1 hour | 5 minutes (sourced from issues) |
| Total | ~6 hours+ | ~50 minutes |
Time compression is just the surface. Here are three more important changes:
Time spent replying to issues dropped. Two weeks after the README went live, "how to install" and "how to use" questions basically disappeared. My daily Q&A time dropped from 40 minutes to under 10—the time saved in those two weeks is already enough to build another small tool.
Documentation is no longer "debt" but a "habit." Because the cost is now negligible, every time I update a core API, I have the AI update the corresponding README section along with it—just a 5-minute task. For the first time, documentation keeps pace with the code.
Small teams can have "big-company-grade" polish. A team of two or three has no one dedicated to writing docs, but users don't care how big your team is—they only judge how professional your README looks. AI closes that gap.
A Few Pitfall Warnings
- Don't let the AI invent APIs out of thin air. Always provide real code as input; otherwise, it will "plausibly" fabricate methods that don't exist—and these errors are the hardest to catch.
- You must run the examples yourself. The two-out-of-ten error rate mentioned above is not an exaggeration—executing every example before release is the bottom line.
- Iteration matters more than one-shot generation. Treat the first output as a draft, then refine it with follow-up prompts ("add Node version requirements to the installation section," "add error handling to example 2"). After two or three rounds, the quality far exceeds a single generation.
- Don't stress about cost. The token consumption for this kind of task is tiny—the API cost for an entire project workflow is usually negligible. For specifics, refer to the pricing page of whichever service you use.
Final Thoughts
For indie developers, the most expensive thing was never the tools—it's the enthusiasm and time drained away by documentation procrastination. Turn "writing a README" from a half-day psychological burden into a one-hour routine, and you'll find yourself publishing projects more frequently—many projects die at the "I'm too embarrassed to open-source this because the docs aren't done" stage, which is a real shame.
If you'd like to try using a large model API to handle this kind of repetitive documentation work, you can register an account and get started: https://api.thistoken.ai/register
Start by paying off the debt of your first README, and you'll discover more tasks you can hand over to AI.
---
Ready to try it yourself? Sign up at https://api.thistoken.ai/register to get your API key and start building.
Token.AI を試してみませんか?
プロジェクトレベルの API Key を作成し、コンソールでチャネルを有効にして、ルーティング、予算、監査ログを設定しましょう。
注册 ThisToken.AI 并获取 API Key