Show HN: Open-Sourced AI CLI Tool

code2docs-open-source.netlify.app

9 points by xkarinsan 2 days ago

I’ve been working on Code2Docs, an open-source CLI tool that helps developers automatically generate inline documentation (docstrings + comments) for Python code using AI.

It’s built to solve a common problem I’ve faced (and seen often in teams): We code by "vibe" — fast iterations, minimal docs, and then forget what the logic was months later. Code2Docs helps bridge that gap by documenting as you go — without breaking your flow.

Right now it supports function-level documentation. Planned features include: - README.md generation for projects - API endpoint docs - Database schema documentation - Architectural diagrams for larger codebases

It’s ideal for messy, fast-moving codebases or devs who hate writing docs manually.

Requirements: - Python environment - OpenAI API key (stored locally, not uploaded anywhere)

Try it out: - PyPI: https://pypi.org/project/code2docs-cli/ - GitHub: https://github.com/xKarinSan/Code2Docs

Would love your thoughts, feedback, or suggestions — especially from devs juggling legacy or rapidly-growing projects. Thanks!

xkarinsan 2 days ago

Hey HN,

I'm a software engineer based in Singapore who enjoys building tools that reduce developer friction.

I kept running into the same problem across projects: code gets written fast, but documentation is either missing, incomplete, or quickly outdated. A few months later, even my own code feels unfamiliar — especially in larger or fast-changing codebases.

So I built Code2Docs for 2 reasons:

Help developers document as they go, without interrupting flow

Make it easier to revisit, maintain, and onboard others into your codebase

This is my first open-source CLI tool — hoping it helps others as much as it’s helped me already. Would really appreciate your feedback or suggestions