Haxy on Haxy
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
Haxy is now in preview! Try it now: https://try.haxy.net/ You’re looking at Haxy, a new git forge. We’re about to do for git forges what Bill Hicks did for comedy, Earth Crisis did for hardcore music, and Marvin Heemeyer did for exterior remodeling. I’m not sure what any of that means but it sounded cool. The point is, strap yourselves in…we’re gonna Leeroy Jenkins our way through this!
Haxy 目前处于预览阶段!现在就来试试:https://try.haxy.net/。你现在看到的是 Haxy,一个全新的 Git 代码托管平台。我们打算在 Git 托管领域做一些类似 Bill Hicks 在喜剧界、Earth Crisis 在硬核音乐界,以及 Marvin Heemeyer 在房屋外墙改造领域所做的事情。我不太确定这些比喻具体意味着什么,但听起来很酷。重点是,系好安全带……我们要像 Leeroy Jenkins 一样冲进去了!
Haxy is based around two design ideas:
- Store project metadata (issues, pull requests, and discussions) in the repo.
- Provide a TUI that is served over SSH, in addition to a web UI.
Haxy 的设计基于两个核心理念:
- 将项目元数据(问题、合并请求和讨论)存储在仓库中。
- 除了 Web 界面外,还提供一种通过 SSH 运行的终端用户界面(TUI)。
Keeping project metadata in the repo has a few benefits: You can easily replicate it to different Haxy instances. You can view/edit it locally and push your changes later, just like you do with code. You will still be able to edit this data via the UI of a Haxy instance just like any other git forge. Additionally, however, you’ll be able to run the Haxy binary locally to browse a repo’s issues and other metadata offline. If you have commit access to the repo, you’ll also be able to make changes that you can push later.
将项目元数据保存在仓库中有几个好处:你可以轻松地将其复制到不同的 Haxy 实例中。你可以像处理代码一样在本地查看或编辑它,并在稍后推送更改。你仍然可以像在其他 Git 托管平台一样,通过 Haxy 实例的 UI 编辑这些数据。此外,你还可以在本地运行 Haxy 二进制文件,离线浏览仓库的问题和其他元数据。如果你拥有该仓库的提交权限,你也可以进行更改并在之后推送。
Haxy will provide a text user interface (TUI) over SSH, so you can browse the Haxy instance entirely from your terminal. These are sometimes called SSH apps. One big advantage they have is that you are automatically authenticated with your SSH key, so creating an account on a Haxy instance and associating it with your SSH public key can be done instantly. Additionally, Haxy will provide a web UI for a more typical experience in a web browser. To avoid having separate UI codebases, the web UI will simply render the TUI in your browser.
Haxy 将提供一个基于 SSH 的终端用户界面(TUI),这样你就可以完全在终端中浏览 Haxy 实例。这些有时被称为 SSH 应用。它们的一大优势是你可以通过 SSH 密钥自动完成身份验证,因此在 Haxy 实例上创建账户并关联你的 SSH 公钥可以瞬间完成。此外,Haxy 还将提供一个 Web UI,以满足在浏览器中使用的常规需求。为了避免维护两套独立的 UI 代码库,Web UI 将直接在浏览器中渲染 TUI。
The main difference between Haxy and Radicle is that Haxy is not peer-to-peer. I believe p2p architectures lead to a significant amount of complexity and make it difficult to have a consistently good experience. Haxy is federated in the sense that anyone can run a Haxy instance, and your projects can be easily moved between them. I believe that is pragmatically the kind of decentralization that people want, and it dramatically simplifies the implementation.
Haxy 与 Radicle 的主要区别在于 Haxy 不是点对点(p2p)的。我认为 p2p 架构会导致大量的复杂性,并使获得持续良好的体验变得困难。Haxy 是联邦制的,这意味着任何人都可以运行一个 Haxy 实例,并且你的项目可以轻松地在这些实例之间迁移。我相信这正是人们在实践中想要的去中心化方式,而且它极大地简化了实现过程。
To build, install zig 0.17.0 and do zig build and you’ll find the binary at zig-out/bin/haxy. On a production server you would run this binary with the serve subcommand. To run it in local mode, just run it with no subcommand in any git repo. The easiest way to try Haxy out is like this: zig build try. This will launch a server with fake data that it stores in the temp-try directory. It will then launch the TUI directly in your terminal (you can exit by pressing escape). Additionally, you can view the web UI.
要进行构建,请安装 zig 0.17.0 并执行 zig build,你会在 zig-out/bin/haxy 找到二进制文件。在生产服务器上,你可以使用 serve 子命令运行此二进制文件。要在本地模式下运行,只需在任何 Git 仓库中直接运行它,无需任何子命令。尝试 Haxy 最简单的方法是执行:zig build try。这将启动一个带有模拟数据的服务器,数据存储在 temp-try 目录中。随后它会直接在你的终端中启动 TUI(你可以按 Esc 键退出)。此外,你还可以查看 Web UI。