DEV Community

Cover image for I Got Tired of Writing READMEs, So I Built an AI Tool That Does It for Me
Ashutosh Swamy
Ashutosh Swamy

Posted on

I Got Tired of Writing READMEs, So I Built an AI Tool That Does It for Me

We've all been there.

You just finished building something cool. The code works, the features are solid, and you're genuinely proud of it. Then comes the part nobody talks about — writing the documentation.

So you open a blank README. Stare at it. Write "## Installation" and then... nothing.

Half an hour later you've got three bullet points and a vague description that doesn't really explain anything. You push it anyway and move on.

I did this one too many times. So I built DocForge.


What Is DocForge?

DocForge is a single HTML file that reads any GitHub repository and automatically generates a complete documentation suite using Google Gemini 2.5.

You paste a GitHub URL. It gives you back:

  • A structured, professional README
  • API documentation (endpoints, parameters, responses)
  • Inline code comments
  • Setup & installation guide

That's it. No install. No backend. No subscription. Just one .html file you open in any browser.


Why a Single HTML File?

This was a deliberate decision.

Most developer tools today require: clone the repo → install dependencies → configure environment → hope it works. The friction kills adoption.

I wanted DocForge to be the opposite. Download one file, get a free Gemini API key from Google AI Studio (takes 2 minutes), open the file, paste your repo URL, done.

The entire tool runs client-side. Your repo data goes directly to Gemini's API — no middleman, no server costs on my end, no data stored anywhere.


How I Built It

The core architecture is surprisingly simple:

1. GitHub repo fetching

The tool fetches your repository's file tree and reads the key source files using the GitHub API. No auth required for public repos.

2. Context building

It builds a structured prompt from your codebase — file structure, key files, package.json / requirements.txt, existing partial docs — and feeds that as context to Gemini.

3. Gemini 2.5 generation

Gemini 2.5 is genuinely good at understanding code structure and generating coherent documentation. The model selection matters here — earlier models produced generic output. 2.5 understands intent.

4. Output rendering

Results render in a clean split-pane UI. Copy individual sections or export everything at once.

The whole thing is vanilla JS, no frameworks, no build step. That's how it stays as a single file.


What I Learned Building This

Prompt engineering is 80% of the work.

Getting Gemini to produce documentation that's actually useful — not just technically correct but readable, well-structured, and appropriately detailed — took way more iteration than the actual code. The difference between a mediocre and a great README is almost entirely in how you instruct the model.

Single-file tools are underrated.

There's something deeply satisfying about a tool that's fully self-contained. No dependencies to update, no deployment to manage, no server to pay for. It just works.

The best tools solve your own problems.

I built this because I needed it. That meant I knew exactly what "good output" looked like, which made iterating fast. If you're thinking about what to build next — start with your own frustrations.


Try It

🔗 Live demo: doc-forge.netlify.app

Open it, paste any public GitHub repo URL, add your Gemini API key, and watch it go. Takes about 30 seconds.

If it saves you time, you can grab the file on Gumroad: ashutosh15.gumroad.com/l/docforge


What's Next

A few things I'm thinking about:

  • Support for private repos (OAuth flow)
  • Generate docs for multiple repos
  • Export directly to the repo as a PR

If you have feature requests or feedback, drop them in the comments. And if you build something with it, I'd love to see what repos you threw at it.


Built by me

Top comments (0)