{"id":51026746,"url":"https://github.com/gitstq/apiforge-cli-tool","last_synced_at":"2026-06-21T20:02:17.351Z","repository":{"id":359807081,"uuid":"1247584661","full_name":"gitstq/apiforge-cli-tool","owner":"gitstq","description":"🚀 APIForge-CLI - Lightweight Terminal HTTP API Testing \u0026 Intelligent Documentation Generator | 轻量级终端HTTP API测试与智能文档生成引擎","archived":false,"fork":false,"pushed_at":"2026-05-23T14:09:49.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T16:11:51.291Z","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-23T14:08:31.000Z","updated_at":"2026-05-23T14:09:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gitstq/apiforge-cli-tool","commit_stats":null,"previous_names":["gitstq/apiforge-cli-tool"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gitstq/apiforge-cli-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapiforge-cli-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapiforge-cli-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapiforge-cli-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapiforge-cli-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitstq","download_url":"https://codeload.github.com/gitstq/apiforge-cli-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fapiforge-cli-tool/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:16.559Z","updated_at":"2026-06-21T20:02:17.332Z","avatar_url":"https://github.com/gitstq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🚀 APIForge-CLI\n\n**轻量级终端HTTP API测试与智能文档生成引擎**\n\n*Lightweight Terminal HTTP API Testing \u0026 Intelligent Documentation Generator*\n\n[![Python](https://img.shields.io/badge/Python-3.7+-blue.svg)](https://python.org)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Zero Dependencies](https://img.shields.io/badge/Zero-Dependencies-orange.svg)]()\n[![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey.svg)]()\n\n[简体中文](#简体中文) | [繁體中文](#繁體中文) | [English](#english)\n\n\u003c/div\u003e\n\n---\n\n## 简体中文\n\n### 🎉 项目介绍\n\nAPIForge-CLI 是一款专为开发者打造的轻量级终端HTTP API测试工具，旨在解决日常API调试、测试和文档生成的痛点。它采用纯Python实现，**零依赖**，单文件即可运行，支持TUI交互界面和命令行双模式。\n\n**灵感来源**：在日常开发中，我们经常需要使用Postman、Insomnia等重量级工具进行简单的API测试。APIForge-CLI提供了一个更轻量、更快速的替代方案，让API测试回归简单。\n\n**自研差异化亮点**：\n- ✅ 零依赖设计，单文件可运行\n- ✅ 智能请求历史管理与复用\n- ✅ 响应数据自动格式化与语法高亮\n- ✅ 一键生成API文档（支持Markdown/OpenAPI 3.0）\n- ✅ 兼容Postman/Insomnia集合导入导出\n\n### ✨ 核心特性\n\n| 特性 | 描述 |\n|------|------|\n| 🎯 **零依赖** | 纯Python标准库实现，无需安装任何第三方包 |\n| 🖥️ **双模式** | 支持TUI交互界面和命令行模式 |\n| 📚 **历史管理** | 自动保存请求历史，支持快速复用 |\n| 🎨 **语法高亮** | JSON响应自动格式化与彩色显示 |\n| 📝 **文档生成** | 一键生成Markdown/OpenAPI 3.0规范文档 |\n| 📦 **集合导入** | 支持Postman/Insomnia集合导入 |\n| 🌐 **多协议** | 支持HTTP/HTTPS，自动SSL处理 |\n| ⚡ **轻量级** | 单文件\u003c1000行代码，启动极速 |\n\n### 🚀 快速开始\n\n#### 环境要求\n\n- Python 3.7 或更高版本\n- 支持 Linux / macOS / Windows\n\n#### 安装\n\n```bash\n# 克隆仓库\ngit clone https://github.com/gitstq/apiforge-cli.git\ncd apiforge-cli\n\n# 直接运行（无需安装）\npython apiforge.py\n\n# 或添加到系统PATH\nchmod +x apiforge.py\nsudo cp apiforge.py /usr/local/bin/apiforge\n```\n\n#### 快速启动\n\n```bash\n# TUI交互模式\npython apiforge.py tui\n\n# 发送GET请求\npython apiforge.py request https://api.github.com/users/gitstq\n\n# 发送POST请求\npython apiforge.py request -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"test\"}' \\\n  https://httpbin.org/post\n\n# 生成文档\npython apiforge.py docs -f markdown -o api.md\n```\n\n### 📖 详细使用指南\n\n#### TUI模式\n\n启动TUI交互界面：\n\n```bash\npython apiforge.py tui\n```\n\n**菜单选项**：\n1. **Send Request** - 发送HTTP请求\n2. **View History** - 查看请求历史\n3. **Manage Collections** - 管理集合（导入/导出）\n4. **Environments** - 环境变量管理\n5. **Generate Docs** - 生成API文档\n6. **Settings** - 配置选项\n\n#### 命令行模式\n\n```bash\n# 基本GET请求\napiforge request https://api.example.com/users\n\n# 带Header的请求\napiforge request -H \"Authorization: Bearer token\" \\\n  https://api.example.com/profile\n\n# POST请求\napiforge request -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"username\":\"john\",\"email\":\"john@example.com\"}' \\\n  https://api.example.com/users\n\n# 保存响应到文件\napiforge request -o response.json \\\n  https://api.example.com/data\n\n# 查看历史记录\napiforge history\n\n# 生成OpenAPI规范\napiforge docs -f openapi -o api.json\n```\n\n#### 支持的HTTP方法\n\n- `GET` - 获取资源\n- `POST` - 创建资源\n- `PUT` - 更新资源\n- `DELETE` - 删除资源\n- `PATCH` - 部分更新\n- `HEAD` - 获取响应头\n- `OPTIONS` - 获取支持的方法\n\n### 💡 设计思路与迭代规划\n\n#### 设计理念\n\n1. **极简主义**：去除不必要的功能，专注于核心API测试场景\n2. **零依赖**：使用Python标准库，避免依赖地狱\n3. **开发者优先**：命令行优先，TUI辅助，符合开发者使用习惯\n\n#### 技术选型\n\n- **Python 3.7+**：广泛兼容，标准库丰富\n- **urllib**：标准库HTTP客户端，无需requests\n- **json/curses**：标准库数据处理和终端控制\n\n#### 后续迭代计划\n\n- [ ] 环境变量模板支持\n- [ ] 请求脚本化（支持预/后置处理）\n- [ ] WebSocket支持\n- [ ] 响应断言与测试套件\n- [ ] CI/CD集成插件\n\n### 📦 打包与部署\n\n#### 打包为可执行文件\n\n```bash\n# 使用PyInstaller\npip install pyinstaller\npyinstaller --onefile apiforge.py\n\n# 输出在 dist/apiforge\n```\n\n#### 作为Python包安装\n\n```bash\n# 创建setup.py后\npip install -e .\n```\n\n### 🤝 贡献指南\n\n欢迎提交Issue和PR！请遵循以下规范：\n\n1. **Issue**：描述问题、复现步骤、期望行为\n2. **PR**：\n   - 使用清晰的提交信息（遵循Conventional Commits）\n   - 确保代码通过基础测试\n   - 更新相关文档\n\n### 📄 开源协议\n\n本项目采用 [MIT License](LICENSE) 开源协议。\n\n---\n\n## 繁體中文\n\n### 🎉 專案介紹\n\nAPIForge-CLI 是一款專為開發者打造的輕量級終端HTTP API測試工具，旨在解決日常API除錯、測試和文件生成的痛點。它採用純Python實現，**零依賴**，單檔案即可執行，支援TUI互動介面和命令列雙模式。\n\n**自研差異化亮點**：\n- ✅ 零依賴設計，單檔案可執行\n- ✅ 智慧請求歷史管理與復用\n- ✅ 響應資料自動格式化與語法高亮\n- ✅ 一鍵生成API文件（支援Markdown/OpenAPI 3.0）\n- ✅ 相容Postman/Insomnia集合匯入匯出\n\n### ✨ 核心特性\n\n| 特性 | 描述 |\n|------|------|\n| 🎯 **零依賴** | 純Python標準庫實現，無需安裝任何第三方套件 |\n| 🖥️ **雙模式** | 支援TUI互動介面和命令列模式 |\n| 📚 **歷史管理** | 自動儲存請求歷史，支援快速復用 |\n| 🎨 **語法高亮** | JSON響應自動格式化與彩色顯示 |\n| 📝 **文件生成** | 一鍵生成Markdown/OpenAPI 3.0規範文件 |\n| 📦 **集合匯入** | 支援Postman/Insomnia集合匯入 |\n\n### 🚀 快速開始\n\n#### 環境要求\n\n- Python 3.7 或更高版本\n- 支援 Linux / macOS / Windows\n\n#### 安裝\n\n```bash\n# 克隆倉庫\ngit clone https://github.com/gitstq/apiforge-cli.git\ncd apiforge-cli\n\n# 直接執行（無需安裝）\npython apiforge.py\n```\n\n#### 快速啟動\n\n```bash\n# TUI互動模式\npython apiforge.py tui\n\n# 傳送GET請求\npython apiforge.py request https://api.github.com/users/gitstq\n\n# 傳送POST請求\npython apiforge.py request -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"test\"}' \\\n  https://httpbin.org/post\n```\n\n### 📄 開源協議\n\n本專案採用 [MIT License](LICENSE) 開源協議。\n\n---\n\n## English\n\n### 🎉 Introduction\n\nAPIForge-CLI is a lightweight terminal HTTP API testing tool designed for developers to solve the pain points of daily API debugging, testing, and documentation generation. It is implemented in pure Python with **zero dependencies**, runs from a single file, and supports both TUI interactive interface and command-line modes.\n\n**Differentiation Highlights**:\n- ✅ Zero dependencies, single-file executable\n- ✅ Smart request history management and reuse\n- ✅ Automatic response formatting with syntax highlighting\n- ✅ One-click API documentation generation (Markdown/OpenAPI 3.0)\n- ✅ Compatible with Postman/Insomnia collection import/export\n\n### ✨ Key Features\n\n| Feature | Description |\n|---------|-------------|\n| 🎯 **Zero Dependencies** | Pure Python standard library, no third-party packages |\n| 🖥️ **Dual Mode** | TUI interactive interface and CLI mode |\n| 📚 **History Management** | Auto-save request history with quick reuse |\n| 🎨 **Syntax Highlighting** | JSON response auto-formatting with colors |\n| 📝 **Doc Generation** | One-click Markdown/OpenAPI 3.0 spec generation |\n| 📦 **Collection Import** | Import from Postman/Insomnia |\n\n### 🚀 Quick Start\n\n#### Requirements\n\n- Python 3.7 or higher\n- Supports Linux / macOS / Windows\n\n#### Installation\n\n```bash\n# Clone repository\ngit clone https://github.com/gitstq/apiforge-cli.git\ncd apiforge-cli\n\n# Run directly (no installation needed)\npython apiforge.py\n```\n\n#### Quick Launch\n\n```bash\n# TUI interactive mode\npython apiforge.py tui\n\n# Send GET request\npython apiforge.py request https://api.github.com/users/gitstq\n\n# Send POST request\npython apiforge.py request -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"test\"}' \\\n  https://httpbin.org/post\n```\n\n### 📄 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ by APIForge Team**\n\n[Report Bug](https://github.com/gitstq/apiforge-cli/issues) · [Request Feature](https://github.com/gitstq/apiforge-cli/issues)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fapiforge-cli-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitstq%2Fapiforge-cli-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fapiforge-cli-tool/lists"}