{"id":51026902,"url":"https://github.com/gitstq/schemaflow-cli","last_synced_at":"2026-06-21T20:02:30.379Z","repository":{"id":355755238,"uuid":"1229460448","full_name":"gitstq/schemaflow-cli","owner":"gitstq","description":"📊 Lightweight JSON Schema Terminal Visualizer \u0026 Validator - Zero dependencies, beautiful tree view, validation \u0026 analysis","archived":false,"fork":false,"pushed_at":"2026-05-05T04:18:25.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-05T06:24:48.844Z","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":null,"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":null,"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-05T04:15:38.000Z","updated_at":"2026-05-05T04:18:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gitstq/schemaflow-cli","commit_stats":null,"previous_names":["gitstq/schemaflow-cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gitstq/schemaflow-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fschemaflow-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fschemaflow-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fschemaflow-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fschemaflow-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitstq","download_url":"https://codeload.github.com/gitstq/schemaflow-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fschemaflow-cli/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:30.262Z","updated_at":"2026-06-21T20:02:30.367Z","avatar_url":"https://github.com/gitstq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 SchemaFlow\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eLightweight JSON Schema Terminal Visualizer \u0026 Validator\u003c/strong\u003e\u003cbr\u003e\n  Zero dependencies • Beautiful tree view • Validation \u0026 Analysis\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#english\"\u003eEnglish\u003c/a\u003e •\n  \u003ca href=\"#简体中文\"\u003e简体中文\u003c/a\u003e •\n  \u003ca href=\"#繁體中文\"\u003e繁體中文\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003ca name=\"english\"\u003e\u003c/a\u003e\n## 🎉 Introduction\n\n**SchemaFlow** is a lightweight, zero-dependency Python CLI tool that brings JSON Schema visualization, validation, and analysis directly to your terminal. No browser required, no heavy dependencies - just pure Python magic! ✨\n\n### Why SchemaFlow?\n\n- 🚀 **Terminal-Native**: View JSON Schema structures as beautiful tree diagrams right in your terminal\n- 🎯 **Zero Dependencies**: Uses only Python standard library (3.8+)\n- ✅ **Full Validation**: Validate JSON data against schemas with detailed error reporting\n- 📊 **Smart Analysis**: Get insights into schema complexity and structure\n- 🎨 **Syntax Highlighting**: Colorized output for better readability\n- 🔧 **Developer-Friendly**: Simple CLI interface with intuitive commands\n\n---\n\n## ✨ Features\n\n| Feature | Description |\n|---------|-------------|\n| 🌳 **Visualize** | Display JSON Schema as beautiful tree structure with type annotations |\n| ✅ **Validate** | Validate JSON data against schemas with detailed error messages |\n| 📊 **Analyze** | Get schema statistics: property counts, nesting levels, constraints |\n| 🎨 **Format** | Pretty-print JSON files with syntax highlighting |\n| 🚫 **Zero Dependencies** | Only Python 3.8+ required |\n| 🌈 **Colorized Output** | Terminal colors for better readability (optional) |\n| 📦 **Lightweight** | Single Python file, easy to install and use |\n\n---\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/gitstq/schemaflow-cli.git\ncd schemaflow-cli\n\n# Run directly\npython3 schemaflow.py --help\n\n# Or install as a package\npip install -e .\nschemaflow --help\n```\n\n### Requirements\n\n- Python 3.8 or higher\n- No external dependencies required!\n\n---\n\n## 📖 Usage Guide\n\n### 1. Visualize JSON Schema\n\n```bash\n# Basic visualization\npython3 schemaflow.py visualize examples/user-schema.json\n\n# Without colors\npython3 schemaflow.py --no-color visualize examples/user-schema.json\n\n# Compact mode (less verbose)\npython3 schemaflow.py --compact visualize examples/user-schema.json\n```\n\n**Example Output:**\n```\nroot: object [required=3] # Schema for user profile data\n├── id*: integer [minimum=1] # Unique user identifier\n├── username*: string [minLength=3, maxLength=50, pattern]\n├── email*: string [format=email]\n├── profile: object\n│   ├── firstName: string [maxLength=100]\n│   ├── lastName: string [maxLength=100]\n│   └── age: integer [minimum=0, maximum=150]\n└── roles: array [minItems=1, uniqueItems=True]\n    └── [items]: string [enum=4]\n```\n\n### 2. Validate JSON Data\n\n```bash\n# Validate a JSON file against a schema\npython3 schemaflow.py validate data.json schema.json\n\n# Example with validation errors\npython3 schemaflow.py validate examples/user-data-invalid.json examples/user-schema.json\n```\n\n**Example Output:**\n```\n❌ Validation failed with 7 error(s):\n  • root.id: value -1 \u003c minimum 1\n  • root.username: string length 2 \u003c minLength 3\n  • root.email: string does not match format 'email'\n  • root.profile.age: value 200 \u003e maximum 150\n```\n\n### 3. Analyze Schema Structure\n\n```bash\n# Get schema statistics\npython3 schemaflow.py analyze examples/user-schema.json\n```\n\n**Example Output:**\n```\n📊 Schema Analysis: examples/user-schema.json\n\n  Total Properties:     16\n  Required Properties:  3\n  Max Nesting Level:    2\n  Types Used:           object, integer, array, boolean, string, null\n  Constraints Used:     minItems, maxLength, minimum, pattern, format\n  Has References:       No\n```\n\n### 4. Format JSON Files\n\n```bash\n# Pretty-print JSON with syntax highlighting\npython3 schemaflow.py format data.json\n\n# Save formatted output\npython3 schemaflow.py format data.json -o formatted.json\n\n# Custom indentation\npython3 schemaflow.py format data.json --indent 4\n```\n\n---\n\n## 💡 Design Philosophy\n\nSchemaFlow was designed with these principles:\n\n1. **Simplicity**: No complex setup or configuration\n2. **Portability**: Single-file Python script that works anywhere\n3. **Performance**: Fast execution with minimal resource usage\n4. **Clarity**: Beautiful, readable output that makes schemas understandable\n5. **Completeness**: Full support for JSON Schema Draft 7 features\n\n### Supported JSON Schema Features\n\n- ✅ All primitive types (string, number, integer, boolean, null, array, object)\n- ✅ Type unions (e.g., `[\"string\", \"null\"]`)\n- ✅ Nested objects and arrays\n- ✅ Validation constraints (min/max, patterns, enums, formats)\n- ✅ Required properties\n- ✅ `oneOf`, `anyOf`, `allOf` combinators\n- ✅ `additionalProperties` control\n- ✅ `$ref` references (displayed)\n\n---\n\n## 📦 Project Structure\n\n```\nschemaflow-cli/\n├── schemaflow.py          # Main CLI application\n├── setup.py               # Package setup\n├── requirements.txt       # Dependencies (empty - zero deps!)\n├── examples/              # Example schemas and data\n│   ├── user-schema.json\n│   ├── user-data-valid.json\n│   ├── user-data-invalid.json\n│   ├── product-schema.json\n│   └── api-response-schema.json\n└── README.md\n```\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Here's how you can help:\n\n1. **Report Bugs**: Open an issue with detailed reproduction steps\n2. **Suggest Features**: Share your ideas for new functionality\n3. **Submit PRs**: Fork the repo and submit pull requests\n\n### Development Setup\n\n```bash\ngit clone https://github.com/gitstq/schemaflow-cli.git\ncd schemaflow-cli\npython3 -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\npip install -e .\n```\n\n---\n\n## 📄 License\n\nThis project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003ca name=\"简体中文\"\u003e\u003c/a\u003e\n## 🎉 项目介绍\n\n**SchemaFlow** 是一款轻量级、零依赖的 Python CLI 工具，可在终端中直接实现 JSON Schema 的可视化、验证和分析。无需浏览器，无需繁重依赖——纯粹的 Python 魔法！✨\n\n### 为什么选择 SchemaFlow？\n\n- 🚀 **终端原生**：在终端中以美观的树形图查看 JSON Schema 结构\n- 🎯 **零依赖**：仅使用 Python 标准库（3.8+）\n- ✅ **完整验证**：使用详细的错误报告验证 JSON 数据\n- 📊 **智能分析**：获取 Schema 复杂度和结构的洞察\n- 🎨 **语法高亮**：彩色输出，提升可读性\n- 🔧 **开发者友好**：简洁的 CLI 界面，直观的命令\n\n---\n\n## ✨ 核心特性\n\n| 特性 | 描述 |\n|------|------|\n| 🌳 **可视化** | 将 JSON Schema 显示为带有类型注释的美观树形结构 |\n| ✅ **验证** | 使用详细的错误消息验证 JSON 数据 |\n| 📊 **分析** | 获取 Schema 统计信息：属性数量、嵌套层级、约束条件 |\n| 🎨 **格式化** | 使用语法高亮美化打印 JSON 文件 |\n| 🚫 **零依赖** | 仅需 Python 3.8+ |\n| 🌈 **彩色输出** | 终端颜色提升可读性（可选） |\n| 📦 **轻量级** | 单文件 Python，易于安装和使用 |\n\n---\n\n## 🚀 快速开始\n\n### 安装\n\n```bash\n# 克隆仓库\ngit clone https://github.com/gitstq/schemaflow-cli.git\ncd schemaflow-cli\n\n# 直接运行\npython3 schemaflow.py --help\n\n# 或作为包安装\npip install -e .\nschemaflow --help\n```\n\n### 环境要求\n\n- Python 3.8 或更高版本\n- 无需外部依赖！\n\n---\n\n## 📖 使用指南\n\n### 1. 可视化 JSON Schema\n\n```bash\n# 基础可视化\npython3 schemaflow.py visualize examples/user-schema.json\n\n# 无颜色输出\npython3 schemaflow.py --no-color visualize examples/user-schema.json\n\n# 紧凑模式（更简洁）\npython3 schemaflow.py --compact visualize examples/user-schema.json\n```\n\n### 2. 验证 JSON 数据\n\n```bash\n# 验证 JSON 文件\npython3 schemaflow.py validate data.json schema.json\n```\n\n### 3. 分析 Schema 结构\n\n```bash\n# 获取 Schema 统计信息\npython3 schemaflow.py analyze examples/user-schema.json\n```\n\n### 4. 格式化 JSON 文件\n\n```bash\n# 美化打印 JSON\npython3 schemaflow.py format data.json\n\n# 保存格式化输出\npython3 schemaflow.py format data.json -o formatted.json\n```\n\n---\n\n## 💡 设计理念\n\nSchemaFlow 遵循以下设计原则：\n\n1. **简洁性**：无需复杂设置或配置\n2. **可移植性**：单文件 Python 脚本，随处可用\n3. **性能**：快速执行，资源占用最小\n4. **清晰性**：美观、可读的输出，让 Schema 易于理解\n5. **完整性**：完整支持 JSON Schema Draft 7 特性\n\n---\n\n## 📄 开源协议\n\n本项目采用 **MIT 协议** 开源 - 详见 [LICENSE](LICENSE) 文件。\n\n---\n\n\u003ca name=\"繁體中文\"\u003e\u003c/a\u003e\n## 🎉 專案介紹\n\n**SchemaFlow** 是一款輕量級、零依賴的 Python CLI 工具，可在終端機中直接實現 JSON Schema 的可視化、驗證和分析。無需瀏覽器，無需繁重依賴——純粹的 Python 魔法！✨\n\n### 為什麼選擇 SchemaFlow？\n\n- 🚀 **終端原生**：在終端機中以美觀的樹狀圖查看 JSON Schema 結構\n- 🎯 **零依賴**：僅使用 Python 標準函式庫（3.8+）\n- ✅ **完整驗證**：使用詳細的錯誤報告驗證 JSON 資料\n- 📊 **智能分析**：獲取 Schema 複雜度和結構的洞察\n- 🎨 **語法高亮**：彩色輸出，提升可讀性\n- 🔧 **開發者友好**：簡潔的 CLI 介面，直觀的命令\n\n---\n\n## ✨ 核心特性\n\n| 特性 | 描述 |\n|------|------|\n| 🌳 **可視化** | 將 JSON Schema 顯示為帶有類型註釋的美觀樹狀結構 |\n| ✅ **驗證** | 使用詳細的錯誤訊息驗證 JSON 資料 |\n| 📊 **分析** | 獲取 Schema 統計資訊：屬性數量、嵌套層級、約束條件 |\n| 🎨 **格式化** | 使用語法高亮美化列印 JSON 檔案 |\n| 🚫 **零依賴** | 僅需 Python 3.8+ |\n| 🌈 **彩色輸出** | 終端機顏色提升可讀性（可選） |\n| 📦 **輕量級** | 單檔案 Python，易於安裝和使用 |\n\n---\n\n## 🚀 快速開始\n\n### 安裝\n\n```bash\n# 克隆倉庫\ngit clone https://github.com/gitstq/schemaflow-cli.git\ncd schemaflow-cli\n\n# 直接執行\npython3 schemaflow.py --help\n\n# 或作為套件安裝\npip install -e .\nschemaflow --help\n```\n\n### 環境需求\n\n- Python 3.8 或更高版本\n- 無需外部依賴！\n\n---\n\n## 📖 使用指南\n\n### 1. 可視化 JSON Schema\n\n```bash\n# 基礎可視化\npython3 schemaflow.py visualize examples/user-schema.json\n\n# 無顏色輸出\npython3 schemaflow.py --no-color visualize examples/user-schema.json\n\n# 緊湊模式（更簡潔）\npython3 schemaflow.py --compact visualize examples/user-schema.json\n```\n\n### 2. 驗證 JSON 資料\n\n```bash\n# 驗證 JSON 檔案\npython3 schemaflow.py validate data.json schema.json\n```\n\n### 3. 分析 Schema 結構\n\n```bash\n# 獲取 Schema 統計資訊\npython3 schemaflow.py analyze examples/user-schema.json\n```\n\n### 4. 格式化 JSON 檔案\n\n```bash\n# 美化列印 JSON\npython3 schemaflow.py format data.json\n\n# 儲存格式化輸出\npython3 schemaflow.py format data.json -o formatted.json\n```\n\n---\n\n## 💡 設計理念\n\nSchemaFlow 遵循以下設計原則：\n\n1. **簡潔性**：無需複雜設定或配置\n2. **可攜性**：單檔案 Python 腳本，隨處可用\n3. **效能**：快速執行，資源佔用最小\n4. **清晰性**：美觀、可讀的輸出，讓 Schema 易於理解\n5. **完整性**：完整支援 JSON Schema Draft 7 特性\n\n---\n\n## 📄 開源協議\n\n本專案採用 **MIT 協議** 開源 - 詳見 [LICENSE](LICENSE) 檔案。\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with ❤️ by SchemaFlow Team\u003cbr\u003e\n  ⭐ Star us on GitHub if you find this useful!\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fschemaflow-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitstq%2Fschemaflow-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fschemaflow-cli/lists"}