{"id":51026839,"url":"https://github.com/gitstq/apidoc-forge","last_synced_at":"2026-06-21T20:02:25.177Z","repository":{"id":357833941,"uuid":"1238743186","full_name":"gitstq/apidoc-forge","owner":"gitstq","description":"🚀 APIDoc Forge - Intelligent API Documentation Generator \u0026 Sync Engine","archived":false,"fork":false,"pushed_at":"2026-05-14T12:15:40.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-14T14:24:01.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gitstq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-14T12:10:32.000Z","updated_at":"2026-05-14T12:15:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gitstq/apidoc-forge","commit_stats":null,"previous_names":["gitstq/apidoc-forge"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gitstq/apidoc-forge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapidoc-forge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapidoc-forge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapidoc-forge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapidoc-forge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitstq","download_url":"https://codeload.github.com/gitstq/apidoc-forge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapidoc-forge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34623906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-21T20:02:24.361Z","updated_at":"2026-06-21T20:02:25.163Z","avatar_url":"https://github.com/gitstq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🚀 APIDoc Forge\n\n**Intelligent API Documentation Generator \u0026 Sync Engine**\n\n[![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org/)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Code Style](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)\n\n[English](#english) | [简体中文](#简体中文) | [繁體中文](#繁體中文)\n\n\u003c/div\u003e\n\n---\n\n\u003ca name=\"english\"\u003e\u003c/a\u003e\n## 🇺🇸 English\n\n### 🎉 Introduction\n\nAPIDoc Forge is a **lightweight, zero-dependency** Python CLI tool that automatically generates beautiful API documentation from your Python source code. It parses docstrings, type hints, and code structure to produce comprehensive documentation in multiple formats.\n\n**Key Differentiators:**\n- 🎯 **Zero Dependencies** - Pure Python standard library, no external packages required\n- 🚀 **Multiple Output Formats** - Markdown, HTML, JSON, and OpenAPI/Swagger\n- 🧠 **Intelligent Parsing** - Supports Google-style, NumPy-style, and reStructuredText docstrings\n- ⚡ **AST-Based Analysis** - Accurate code parsing using Python's Abstract Syntax Tree\n- 🔄 **Sync Ready** - Built for CI/CD integration with watch mode support\n\n### ✨ Core Features\n\n| Feature | Description |\n|---------|-------------|\n| 📖 **Smart Docstring Parsing** | Extracts parameters, return types, raises, and examples from docstrings |\n| 🎨 **Beautiful HTML Output** | Syntax-highlighted, responsive documentation with dark mode code blocks |\n| 📝 **Markdown Generation** | GitHub-flavored Markdown perfect for README files |\n| 🔌 **OpenAPI Support** | Generate Swagger-compatible specifications for REST APIs |\n| 📊 **JSON Export** | Machine-readable documentation for further processing |\n| 🏷️ **Type Hint Recognition** | Full support for Python 3.8+ type annotations |\n| 🎯 **Async Function Support** | Properly documents async/await functions |\n| 🔍 **Class \u0026 Method Analysis** | Comprehensive OOP documentation including inheritance |\n\n### 🚀 Quick Start\n\n#### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/gitstq/apidoc-forge.git\ncd apidoc-forge\n\n# Or install directly\npip install -e .\n```\n\n#### Usage\n\n```bash\n# Generate Markdown documentation\npython apidoc_forge.py analyze ./src -o ./docs -f markdown\n\n# Generate HTML documentation\npython apidoc_forge.py analyze ./src -o ./docs -f html\n\n# Generate OpenAPI specification\npython apidoc_forge.py analyze ./src -o ./docs -f openapi --title \"My API\"\n\n# Analyze a single file\npython apidoc_forge.py analyze my_module.py -o ./docs -f markdown\n```\n\n### 📖 Detailed Usage\n\n#### Command Line Options\n\n```bash\napidoc-forge analyze [PATH] [OPTIONS]\n\nArguments:\n  PATH                    Path to Python file or directory\n\nOptions:\n  -o, --output DIR        Output directory (default: ./docs)\n  -f, --format FORMAT     Output format: markdown, html, json, openapi\n  --title TITLE          Documentation title\n  --pattern PATTERN      File pattern for directories (default: *.py)\n  -v, --verbose          Enable verbose output\n  -h, --help             Show help message\n```\n\n#### Example Output\n\n**Input Python Code:**\n```python\nclass UserManager:\n    \"\"\"Manages user operations and data persistence.\n    \n    Args:\n        auto_save: Whether to automatically save changes.\n    \"\"\"\n    \n    def create_user(self, name: str, email: str) -\u003e User:\n        \"\"\"Create a new user in the system.\n        \n        Args:\n            name: Full name of the user.\n            email: Valid email address.\n        \n        Returns:\n            The newly created User object.\n        \n        Raises:\n            ValueError: If email is invalid.\n        \"\"\"\n        pass\n```\n\n**Generated Markdown:**\n```markdown\n### create_user\n\n```python\ndef create_user(self, name: str, email: str) -\u003e User\n```\n\nCreate a new user in the system.\n\n**Parameters:**\n- `name` (*str*) - Full name of the user.\n- `email` (*str*) - Valid email address.\n\n**Returns:**\n*User*\nThe newly created User object.\n\n**Raises:**\n- ValueError: If email is invalid.\n```\n\n### 💡 Design Philosophy\n\nAPIDoc Forge was designed with these principles:\n\n1. **Zero Dependencies** - No pip install hell, works out of the box\n2. **Pythonic** - Leverages AST for accurate parsing, not regex hacks\n3. **Format Agnostic** - Generate once, output anywhere\n4. **CI/CD Ready** - Perfect for automated documentation pipelines\n5. **Developer Experience** - Clear error messages and verbose mode\n\n### 📦 Supported Docstring Styles\n\n- ✅ **Google Style** (recommended)\n- ✅ **NumPy Style**\n- ✅ **reStructuredText**\n- ✅ **Epytext**\n\n### 🤝 Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n```bash\n# Fork and clone\ngit clone https://github.com/yourusername/apidoc-forge.git\n\n# Create a branch\ngit checkout -b feature/amazing-feature\n\n# Make changes and commit\ngit commit -m \"feat: add amazing feature\"\n\n# Push and create PR\ngit push origin feature/amazing-feature\n```\n\n### 📄 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n---\n\n\u003ca name=\"简体中文\"\u003e\u003c/a\u003e\n## 🇨🇳 简体中文\n\n### 🎉 项目介绍\n\nAPIDoc Forge 是一款**轻量级、零依赖**的 Python CLI 工具，能够自动从 Python 源代码生成精美的 API 文档。它解析文档字符串、类型提示和代码结构，生成多种格式的综合文档。\n\n**核心差异化优势：**\n- 🎯 **零依赖** - 纯 Python 标准库，无需外部包\n- 🚀 **多格式输出** - 支持 Markdown、HTML、JSON 和 OpenAPI/Swagger\n- 🧠 **智能解析** - 支持 Google 风格、NumPy 风格和 reStructuredText 文档字符串\n- ⚡ **基于 AST 分析** - 使用 Python 抽象语法树进行精确代码解析\n- 🔄 **同步就绪** - 内置 CI/CD 集成支持，支持监视模式\n\n### ✨ 核心特性\n\n| 特性 | 描述 |\n|------|------|\n| 📖 **智能文档字符串解析** | 从文档字符串中提取参数、返回类型、异常和示例 |\n| 🎨 **精美 HTML 输出** | 语法高亮、响应式设计，支持深色模式代码块 |\n| 📝 **Markdown 生成** | 适合 README 文件的 GitHub 风格 Markdown |\n| 🔌 **OpenAPI 支持** | 为 REST API 生成 Swagger 兼容规范 |\n| 📊 **JSON 导出** | 机器可读的文档格式，便于进一步处理 |\n| 🏷️ **类型提示识别** | 完全支持 Python 3.8+ 类型注解 |\n| 🎯 **异步函数支持** | 正确文档化 async/await 函数 |\n| 🔍 **类和方法分析** | 全面的面向对象文档，包括继承关系 |\n\n### 🚀 快速开始\n\n#### 安装\n\n```bash\n# 克隆仓库\ngit clone https://github.com/gitstq/apidoc-forge.git\ncd apidoc-forge\n\n# 或直接安装\npip install -e .\n```\n\n#### 使用\n\n```bash\n# 生成 Markdown 文档\npython apidoc_forge.py analyze ./src -o ./docs -f markdown\n\n# 生成 HTML 文档\npython apidoc_forge.py analyze ./src -o ./docs -f html\n\n# 生成 OpenAPI 规范\npython apidoc_forge.py analyze ./src -o ./docs -f openapi --title \"My API\"\n\n# 分析单个文件\npython apidoc_forge.py analyze my_module.py -o ./docs -f markdown\n```\n\n### 📖 详细使用指南\n\n#### 命令行选项\n\n```bash\napidoc-forge analyze [路径] [选项]\n\n参数:\n  路径                    Python 文件或目录路径\n\n选项:\n  -o, --output 目录       输出目录 (默认: ./docs)\n  -f, --format 格式       输出格式: markdown, html, json, openapi\n  --title 标题           文档标题\n  --pattern 模式         目录的文件匹配模式 (默认: *.py)\n  -v, --verbose          启用详细输出\n  -h, --help             显示帮助信息\n```\n\n#### 示例输出\n\n**输入 Python 代码：**\n```python\nclass UserManager:\n    \"\"\"管理用户操作和数据持久化。\n    \n    Args:\n        auto_save: 是否自动保存更改。\n    \"\"\"\n    \n    def create_user(self, name: str, email: str) -\u003e User:\n        \"\"\"在系统中创建新用户。\n        \n        Args:\n            name: 用户的全名。\n            email: 有效的电子邮件地址。\n        \n        Returns:\n            新创建的 User 对象。\n        \n        Raises:\n            ValueError: 如果电子邮件无效。\n        \"\"\"\n        pass\n```\n\n**生成的 Markdown：**\n```markdown\n### create_user\n\n```python\ndef create_user(self, name: str, email: str) -\u003e User\n```\n\n在系统中创建新用户。\n\n**参数：**\n- `name` (*str*) - 用户的全名。\n- `email` (*str*) - 有效的电子邮件地址。\n\n**返回：**\n*User*\n新创建的 User 对象。\n\n**异常：**\n- ValueError: 如果电子邮件无效。\n```\n\n### 💡 设计理念\n\nAPIDoc Forge 遵循以下设计原则：\n\n1. **零依赖** - 无需 pip 安装，开箱即用\n2. **Pythonic** - 利用 AST 进行精确解析，而非正则表达式\n3. **格式无关** - 一次生成，随处输出\n4. **CI/CD 就绪** - 完美的自动化文档流水线工具\n5. **开发者体验** - 清晰的错误信息和详细模式\n\n### 📦 支持的文档字符串风格\n\n- ✅ **Google 风格**（推荐）\n- ✅ **NumPy 风格**\n- ✅ **reStructuredText**\n- ✅ **Epytext**\n\n### 🤝 贡献指南\n\n我们欢迎贡献！请参阅 [CONTRIBUTING.md](CONTRIBUTING.md) 了解指南。\n\n```bash\n# Fork 并克隆\ngit clone https://github.com/yourusername/apidoc-forge.git\n\n# 创建分支\ngit checkout -b feature/amazing-feature\n\n# 修改并提交\ngit commit -m \"feat: add amazing feature\"\n\n# 推送并创建 PR\ngit push origin feature/amazing-feature\n```\n\n### 📄 开源协议\n\nMIT 许可证 - 详情请参阅 [LICENSE](LICENSE) 文件。\n\n---\n\n\u003ca name=\"繁體中文\"\u003e\u003c/a\u003e\n## 🇹","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fapidoc-forge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitstq%2Fapidoc-forge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fapidoc-forge/lists"}