Show HN: Docucod - 任何代码库的自动文档生成
4 分•作者: clidey•5 个月前
嗨 HN,我是 Clidey 的 Hemang,我们正在开发 Docucod。Docucod 是一款可以从任何代码库自动生成和维护文档的工具。
* **问题是什么?**
我和我的联合创始人都在大型企业工作过,比如摩根大通、摩根士丹利,以及较小的公司,比如 Palantir,我们持续不断地看到由于文档维护不善而产生的问题。
大多数代码库的文档不足,注释稀少,类型不总是显而易见,而且随着时间的推移,很多知识常常被遗忘。
你深入研究得越深,就越难理解事情是如何运作的。这会减慢入职速度,浪费调试时间,并增加出现问题的几率。
到目前为止,我们一直在与中小型公司和初创企业进行试点,调整产品并获得大量反馈。
今天,我们希望向公众开放,发布生成服务!
* **试用一下!**
访问 <a href="https://docucod.com/oss" rel="nofollow">https://docucod.com/oss</a>,并在那里输入你的代码库 URL。生成后,链接将可见。
你也可以在代码库 URL 前面加上前缀 URL:<a href="https://docucod.com/docs/<repo-url>" rel="nofollow">https://docucod.com/docs/<repo-url></a>(例如:<a href="https://docucod.com/docs/https://github.com/clidey/whodb" rel="nofollow">https://docucod.com/docs/https://github.com/clidey/whodb</a>)
请注意,这仅适用于 100MB 以下的公共代码库。
* **工作原理:**
Docucod 分析代码库,解析文件、注释、类型、示例和自述文件,然后构建一个你可以立即浏览的静态文档网站——无需配置,无需设置。
它试图自动呈现有用的上下文,这样你就不必逐行阅读代码来弄清楚发生了什么。
它使用 Mermaid 生成图表,我们正在努力生成图像,稍后还会生成视频!
发布是通过我们自己的静态站点构建器 <i>Dory</i> 完成的 ([<a href="https://github.com/clidey/dory">https://github.com/clidey/dory</a>](<a href="https://github.com/clidey/dory">https://github.com/clidey/dory</a>))。
它处理解析、结构提取和 HTML 生成。Dory 的构建考虑到了处理 AI 生成的 MDX,这是一个有趣的挑战。
我们仍在完善它,所以非常欢迎 PR 和反馈。
* **下一步是什么:**
目前我们支持公共 GitHub 代码库(即将推出私有支持)。我们还在开发一些功能,比如跨文档的代码搜索、基于用户查询的自定义响应、更好的导航、主题定制以及与 CI 管道的集成。
如果你试用了它,我非常感谢你的反馈——好的和坏的。它是否为你解决了实际问题?哪些地方令人困惑、缺失或没有帮助?
谢谢!
查看原文
Hi HN, I'm Hemang from Clidey, and we are working on Docucod. Docucod is a tool that automatically generates and maintains documentation from any repository.<p>* What is the problem? *
My co-founder and I have both worked in large corporates like J.P. Morgan, Morgan Stanley, smaller companies like Palantir, and continuously see the issues that stem from unmaintained documentation.<p>Most codebases are under-documented, comments are sparsed, types aren't always obvious, and there's often a lot of knowledge that is forgotten as time goes on.<p>The deeper you go, the harder it gets to understand how things work. This slows down onboarding, wastes time during debugging, and increases the chance of things breaking.<p>Until today, we have been running pilots with small to medium sized companies and startups tweaking the product and gaining lots of feedback.<p>Today we want to open it up to the public with a release of the generation service!<p>* Try it out! *
Go to <a href="https://docucod.com/oss" rel="nofollow">https://docucod.com/oss</a> and put your repository URL there. Once generated, the link will be visible.<p>You can also put the prefix url in front of the repo url: <a href="https://docucod.com/docs/<repo-url>" rel="nofollow">https://docucod.com/docs/<repo-url></a> (example: <a href="https://docucod.com/docs/https://github.com/clidey/whodb" rel="nofollow">https://docucod.com/docs/https://github.com/clidey/whodb</a>)<p>Please note this will work only for public repos up to 100MB.<p><i>How it works:</i>
Docucod analyzes the codebase, parses files, comments, types, examples, and the readme, then builds a static documentation site you can browse immediately — no config, no setup.<p>It tries to surface useful context automatically so you don’t have to read the code line by line to figure out what’s going on.<p>There is diagram generation with Mermaid, and we are working on generating images and later videos!<p>The publishing is done with our own static site builder called <i>Dory</i> ([<a href="https://github.com/clidey/dory">https://github.com/clidey/dory</a>](<a href="https://github.com/clidey/dory">https://github.com/clidey/dory</a>)).<p>It handles parsing, structure extraction, and HTML generation. Dory has been built with handling AI-generated MDX in mind, which is an interesting hurdle to overcome.<p>We're still fleshing it out, so PRs and feedback are very welcome.<p><i>What’s next:</i>
Right now we support public GitHub repos (private support coming). We’re also working on features like code search across the docs, customized responses based on the user's query, better navigation, theme customization, and integration with CI pipelines.<p>If you check it out, I’d really appreciate your feedback — both the good and the bad. Does it solve a real problem for you? What’s confusing, missing, or just not helpful?<p>Thanks!