展示HN:UruFlow – 基于终端的部署工具,采用自定义TCP协议

1作者: musnas14 天前原帖
UruFlow 是一个自托管的部署引擎,专为更喜欢使用终端而非浏览器仪表板的团队设计。 架构:服务器 + 代理,通过 UFP(UruFlow 协议)进行通信,这是一种为实时双向流式传输而构建的自定义二进制协议。 为什么不使用 HTTP:传统工具通过轮询获取更新,而 UruFlow 则是主动推送。当部署触发时,代理会立即接收到命令。日志逐行实时流式传输——不是在刷新时,不是批量处理,而是真正的实时。 UFP 数据格式: - 头部:魔法字节(0x55 0x46)+ 版本 + 类型 + 有效载荷长度 - 主体:JSON - 消息类型:认证、指标、命令、健康检查 - 持久的 TCP 连接,支持 TLS 服务器运行完整的 TUI,代理处理 git 操作、Docker 构建,并通过 UFP 流式传输输出。 技术选择: - Go,服务器和代理的单一二进制文件 - SQLite 用于状态管理 - Bubbletea 用于 TUI 支持 Docker Compose、Dockerfile 和 Makefile 构建。支持 GitHub/GitLab 的 Webhook 进行自动部署。 采用 MIT 许可证。 [查看 GitHub 页面](https://github.com/urustack/uruflow) 期待反馈。
查看原文
UruFlow is a self-hosted deployment engine designed for teams who prefer terminals over browser dashboards.<p>Architecture: server + agents communicating over UFP (UruFlow Protocol), a custom binary protocol built for real-time bidirectional streaming.<p>Why not HTTP: Traditional tools poll for updates. UruFlow pushes. When a deploy triggers, the agent receives the command instantly. Logs stream line-by-line as they execute — not on refresh, not batched, actual real-time.<p>UFP wire format: - Header: magic bytes (0x55 0x46) + version + type + payload length - Body: JSON - Message types: auth, metrics, commands, health checks - Persistent TCP connection with TLS support<p>The server runs a full TUI, The agent handles git operations, Docker builds, and streams output back through UFP.<p>Technical choices: - Go, single binary for server and agent - SQLite for state - Bubbletea for TUI<p>Supports Docker Compose, Dockerfile, Makefile builds. GitHub&#x2F;GitLab webhooks for auto-deploy.<p>MIT licensed.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;urustack&#x2F;uruflow" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;urustack&#x2F;uruflow</a><p>Looking for feedback.