Skip to content

Commit 9b2decf

Browse files
committed
chore: quick update feat/manager at 2026-01-21 23:01:56
1 parent 23d1f6d commit 9b2decf

4 files changed

Lines changed: 144 additions & 10 deletions

File tree

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
- ⚙️ **Configuration-driven** - YAML-based project configuration
1818
- 📊 **Progress Display** - Visual progress bars and detailed error messages
1919
- 🗑️ **Cache Management** - Clean and manage dependency cache
20+
- 🌐 **Web UI** - Visual configuration editor with proto file browser
21+
- 🏥 **Environment Check** - Doctor command to diagnose development environment
22+
- 🎯 **Project Initialization** - Quick project setup with templates
2023

2124
## Installation
2225

@@ -75,6 +78,10 @@ protobuild gen
7578
| `web --port 9090` | Start web UI on custom port |
7679
| `clean` | Clean dependency cache |
7780
| `clean --dry-run` | Show what would be cleaned without deleting |
81+
| `init` | Initialize a new protobuild project |
82+
| `init --template grpc` | Initialize with specific template (basic, grpc, minimal) |
83+
| `doctor` | Check development environment and dependencies |
84+
| `doctor --fix` | Auto-install missing Go plugins |
7885
| `version` | Show version information |
7986

8087
## Configuration
@@ -256,6 +263,52 @@ The web interface provides:
256263
- 🔌 Plugin configuration
257264
- 🚀 One-click build, lint, format operations
258265
- 📄 Real-time YAML preview
266+
- 📊 Project statistics dashboard
267+
- 🔍 Proto file browser with syntax highlighting
268+
- 📚 Configuration examples reference
269+
270+
### Initialize New Project
271+
272+
```bash
273+
# Interactive initialization
274+
protobuild init
275+
276+
# Use specific template
277+
protobuild init --template basic # Basic Go + gRPC project
278+
protobuild init --template grpc # Full gRPC-Gateway project
279+
protobuild init --template minimal # Minimal configuration
280+
281+
# Specify output directory
282+
protobuild init -o ./my-project
283+
```
284+
285+
### Check Development Environment
286+
287+
```bash
288+
# Diagnose environment issues
289+
protobuild doctor
290+
291+
# Auto-install missing Go plugins
292+
protobuild doctor --fix
293+
```
294+
295+
Example output:
296+
```
297+
🏥 Protobuild Doctor
298+
299+
Checking development environment...
300+
301+
✅ protoc installed (v25.1)
302+
✅ protoc-gen-go installed
303+
✅ protoc-gen-go-grpc installed
304+
✅ buf installed (v1.28.1)
305+
✅ api-linter installed
306+
✅ go installed (go1.21.5)
307+
✅ Configuration protobuf.yaml found
308+
⚠️ Vendor directory not found (run 'protobuild vendor')
309+
310+
✅ Environment check passed!
311+
```
259312

260313
### Force Vendor Update
261314

@@ -378,6 +431,20 @@ protobuild
378431
- [Multi-Source Dependencies](./docs/MULTI_SOURCE_DEPS.md) - Design document for multi-source dependency resolution
379432
- [Design Document](./docs/DESIGN.md) - Architecture and design documentation
380433
434+
## Roadmap
435+
436+
Upcoming features planned for future releases:
437+
438+
| Feature | Description | Status |
439+
|---------|-------------|--------|
440+
| 🔗 **Dependency Graph** | Visualize proto file import dependencies | Planned |
441+
| ⚠️ **Breaking Change Detection** | Detect incompatible changes between versions | Planned |
442+
| 📚 **API Documentation Generator** | Auto-generate Markdown/HTML docs from proto comments | Planned |
443+
| 🎭 **Mock Server** | Auto-start mock gRPC/HTTP server for testing | Planned |
444+
| 📝 **Proto Templates** | Quick generation of common proto patterns (CRUD, pagination) | Planned |
445+
| 📊 **Field Statistics** | Analyze field naming conventions and type distribution | Planned |
446+
| ✏️ **Online Editor** | Edit proto files directly in Web UI | Planned |
447+
381448
## License
382449
383450
[MIT License](LICENSE)

README_CN.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
- ⚙️ **配置驱动** - 基于 YAML 的项目配置
1818
- 📊 **进度显示** - 可视化进度条和详细错误信息
1919
- 🗑️ **缓存管理** - 清理和管理依赖缓存
20+
- 🌐 **Web 界面** - 可视化配置编辑器,支持 Proto 文件浏览
21+
- 🏥 **环境诊断** - Doctor 命令检查开发环境配置
22+
- 🎯 **项目初始化** - 快速项目设置,支持多种模板
2023

2124
## 安装
2225

@@ -76,6 +79,10 @@ protobuild gen
7679
| `web --port 9090` | 指定端口启动 Web 界面 |
7780
| `clean` | 清理依赖缓存 |
7881
| `clean --dry-run` | 预览将被清理的内容 |
82+
| `init` | 初始化新的 protobuild 项目 |
83+
| `init --template grpc` | 使用指定模板初始化(basic、grpc、minimal)|
84+
| `doctor` | 检查开发环境和依赖配置 |
85+
| `doctor --fix` | 自动安装缺失的 Go 插件 |
7986
| `version` | 显示版本信息 |
8087

8188
## 配置说明
@@ -257,6 +264,52 @@ Web 界面提供:
257264
- 🔌 插件配置
258265
- 🚀 一键执行构建、检查、格式化等操作
259266
- 📄 实时 YAML 配置预览
267+
- 📊 项目统计仪表盘
268+
- 🔍 Proto 文件浏览器(支持语法高亮)
269+
- 📚 配置示例参考
270+
271+
### 初始化新项目
272+
273+
```bash
274+
# 交互式初始化
275+
protobuild init
276+
277+
# 使用指定模板
278+
protobuild init --template basic # 基础 Go + gRPC 项目
279+
protobuild init --template grpc # 完整 gRPC-Gateway 项目
280+
protobuild init --template minimal # 最小化配置
281+
282+
# 指定输出目录
283+
protobuild init -o ./my-project
284+
```
285+
286+
### 检查开发环境
287+
288+
```bash
289+
# 诊断环境问题
290+
protobuild doctor
291+
292+
# 自动安装缺失的 Go 插件
293+
protobuild doctor --fix
294+
```
295+
296+
输出示例:
297+
```
298+
🏥 Protobuild Doctor
299+
300+
正在检查开发环境...
301+
302+
✅ protoc 已安装 (v25.1)
303+
✅ protoc-gen-go 已安装
304+
✅ protoc-gen-go-grpc 已安装
305+
✅ buf 已安装 (v1.28.1)
306+
✅ api-linter 已安装
307+
✅ go 已安装 (go1.21.5)
308+
✅ 配置文件 已找到 protobuf.yaml
309+
⚠️ Vendor 目录 未找到(请运行 'protobuild vendor')
310+
311+
✅ 环境检查通过!
312+
```
260313
261314
### 强制更新 Vendor
262315
@@ -349,6 +402,20 @@ plugins:
349402
- [多源依赖设计](./docs/MULTI_SOURCE_DEPS.md) - 多源依赖解析设计文档
350403
- [设计文档](./docs/DESIGN_CN.md) - 架构和设计文档
351404
405+
## 路线图
406+
407+
以下是计划在未来版本中实现的功能:
408+
409+
| 功能 | 描述 | 状态 |
410+
|------|------|------|
411+
| 🔗 **依赖关系图** | 可视化 proto 文件的 import 依赖关系 | 计划中 |
412+
| ⚠️ **Breaking Change 检测** | 检测版本间的不兼容变更 | 计划中 |
413+
| 📚 **API 文档生成** | 从 proto 注释自动生成 Markdown/HTML 文档 | 计划中 |
414+
| 🎭 **Mock 服务器** | 自动启动用于测试的 mock gRPC/HTTP 服务器 | 计划中 |
415+
| 📝 **Proto 模板** | 快速生成常用 proto 模式(CRUD、分页等)| 计划中 |
416+
| 📊 **字段统计分析** | 分析字段命名规范和类型分布 | 计划中 |
417+
| ✏️ **在线编辑器** | 在 Web 界面直接编辑 proto 文件 | 计划中 |
418+
352419
## 项目架构
353420
354421
```

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ tasks:
131131
web:
132132
desc: Run web server
133133
cmds:
134-
- go run *.go web
134+
- go run -v *.go web

cmd/webcmd/server.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -479,15 +479,15 @@ func (s *Server) handleProtoContent(w http.ResponseWriter, r *http.Request) {
479479

480480
// ProjectStats represents project statistics.
481481
type ProjectStats struct {
482-
ProtoFiles int `json:"proto_files"`
483-
TotalLines int `json:"total_lines"`
484-
MessageCount int `json:"message_count"`
485-
ServiceCount int `json:"service_count"`
486-
DependencyCount int `json:"dependency_count"`
487-
PluginCount int `json:"plugin_count"`
488-
ProtoRoots []string `json:"proto_roots"`
489-
VendorDir string `json:"vendor_dir"`
490-
VendorFiles int `json:"vendor_files"`
482+
ProtoFiles int `json:"proto_files"`
483+
TotalLines int `json:"total_lines"`
484+
MessageCount int `json:"message_count"`
485+
ServiceCount int `json:"service_count"`
486+
DependencyCount int `json:"dependency_count"`
487+
PluginCount int `json:"plugin_count"`
488+
ProtoRoots []string `json:"proto_roots"`
489+
VendorDir string `json:"vendor_dir"`
490+
VendorFiles int `json:"vendor_files"`
491491
}
492492

493493
// handleProjectStats returns project statistics.

0 commit comments

Comments
 (0)