连接机器
Connecting the Machines

原始链接: https://herdr.dev/blog/connecting-the-machines/

Herdr 发布了 0.9 版本,引入了备受期待的多机支持功能。此前,用户仅限于一对一连接,不得不通过切换多个终端标签页来监控不同服务器上运行的代理。通过将 UI 与服务器解耦,Herdr 现在允许用户将多台远程机器(如 VPS 或本地 Mac mini)汇聚到一个统一的 TUI 中。 用户可通过 `herdr machine add` 命令使用 SSH 轻松添加远程机器,从而实现跨环境的工作空间和代理的无缝管理。尽管此版本侧重于连接性,但开发者计划在未来的更新中优化 CLI,以支持跨机器的代理协作。 Herdr 1.0 的长期愿景是通过“Herdr Cloud”简化这一流程。这项即将推出的服务将作为一个端到端加密连接层,使用户无需手动配置 SSH 即可轻松连接机器。该项目的最终目标是实现流畅的工作流,例如在机器间移动活跃的代理会话,从而将笔记本电脑从主要计算源转变为分布式架构的轻量级便携式客户端。

Hacker News 上的讨论围绕一篇题为《连接机器》(Connecting the Machines,herdr.dev)的文章展开,用户的反响褒贬不一: * **正面反馈:** 一位已使用“herdr”数月的用户称赞该平台能有效集中管理跨多台设备的 SSH 会话。 * **质疑与批评:** 其他评论者质疑是否有必要为机器发现功能使用托管服务,认为用户完全可以自行构建类似方案(类似于自建 Syncthing 发现服务器)。 * **商业化担忧:** 一位参与者对当前将简单基础设施工具转化为服务并进行商业化的趋势表示不满。另一位用户则质疑此类网络工具的根本用途,讽刺称它们可能只对“垃圾内容生产”(slop farming)有用。 总的来说,虽然该工具为管理分布式 SSH 连接提供了一种便捷方案,但社区对于它所提供的价值是否足以支撑“托管服务模式”而非“自托管替代方案”存在分歧。
相关文章

原文

The next step for Herdr is connecting the machines.

Herdr already has more than 700,000 downloads and close to 1,000 plugins. There is a big community behind it, with people using it to manage their agents and their local machines.

Herdr already has --remote, so you can attach to a remote machine. As agents run for multiple hours, sometimes you want them on a machine that stays alive 24/7. You don’t want to keep your laptop open just because an agent is still working.

I think we’re also starting to think about our laptops as clients, instead of relying on them for all the compute. For a lot of us, it makes more sense to run a beefy machine somewhere else than spend a couple thousand dollars on the laptop we carry around. You could have a VPS, a Mac mini in your own setup, or both.

But until now, each machine needed a separate Herdr client, usually in a different terminal tab. You had to remember where each agent was running and switch between those tabs to check on them. That was the bottleneck.

People have been asking for this for months. There are already community workarounds, thanks to Herdr’s plugin system and some amazing contributors. But Herdr itself wasn’t built to support it.

Why this took longer

Multiplexers like tmux and Zellij don’t support one TUI client managing independent servers across machines. That was a niche use case. Agents are changing that. Now we want to run agents anywhere and control them from wherever we are.

Herdr already had a client and a server, but one client attached to one server. Everything you saw in Herdr was rendered on that server. Bringing multiple servers into that setup would have meant making one server aggregate all those connections, or changing where the UI lived.

I wanted the client to bring those machines together, while each server kept running its own terminals and agents. That meant changing how Herdr itself was built. That’s why this took longer than I expected.

With 0.9, Herdr’s outer UI is rendered on the client. The servers still own their sessions and supply the terminal views. The client can now bring those independent servers into the same TUI, instead of attaching to one server’s entire interface.

This also gives us room for more performance improvements as we keep separating the client from the runtime.

Connecting your machines

With this update, you can run:

herdr machine add workbox

Give it your SSH target, and that machine’s workspaces, tabs, and agents become available alongside your local ones in the same Herdr TUI. Switch machines without opening another client. The agents keep running on their own machines when you disconnect.

For now, those machines need to be reachable over SSH. They could be on your local network, reachable over the internet, or connected through something like Tailscale. Many developers already have that setup.

You can find the setup details in the Connecting machines docs.

This is the first version of Herdr’s multi-machine support. The TUI can now bring your machines together, but the agent CLI still works within one server. It doesn’t yet see the agents running on your other machines.

I want the CLI to work across machines too, so agents can find and work with each other even when they’re running on different servers. Cross-machine agent collaboration is one of the things I want to build on top of this.

I wanted to release this before adding all of those features, so I can get feedback from people actually using it. Tell me what’s missing and where you hit problems. That will help me decide what to build next.

Getting to 1.0

After this update, what I want is to make connecting those machines more convenient. You shouldn’t need to think about SSH or deal with complicated network setup. It should be easy to connect any machine, anywhere, through one Herdr account.

Whether it’s a sandbox, a virtual machine, a remote server, or a machine in your own setup, you should be able to install Herdr and connect it to the rest of your machines.

This is where Herdr Cloud comes in. It didn’t make it into this release, but it’s the next missing piece.

The goal is to link your machines with a single command and stop worrying about how to reach them. Herdr Cloud would provide the middleman layer for those connections. Terminal traffic would be end-to-end encrypted between your machines and your Herdr client.

You still bring your own machines. Cloud connects them; it doesn’t host the agents for you.

Having Herdr own the terminals and agent sessions across different machines also brings more interesting things we could build on top. One thing I’d like to explore further out is moving an agent session between machines, so you don’t have to choose where it will live before you start working. That takes more than connecting the machines, but it’s the kind of use case I’m thinking about as Herdr gets closer to 1.0.

For now, you can connect your machines over SSH with 0.9. If you want to try the next piece, join the Herdr Cloud waitlist.

联系我们 contact @ memedata.com