From 9e9bc8a144667a6b7debfd4f0c7a31ff0e11493a Mon Sep 17 00:00:00 2001 From: Can Celik Date: Sun, 6 Sep 2026 02:27:06 +0300 Subject: feat: manage multiple ssh machines from one client (#3670) --- src/main.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index ee38e84b..4d7e2f88 100644 --- a/src/main.rs +++ b/src/main.rs @@ -330,18 +330,18 @@ const DEFAULT_CONFIG: &str = r##"# herdr configuration # distinct static glyphs for blocked, working, done, idle, and unknown states. # status_indicators = "dots" -# Expanded agent rows. Built-ins are state_icon, state_text, workspace, tab, pane, agent, -# terminal_title, and terminal_title_stripped. +# Expanded agent rows. Built-ins are state_icon, state_text, machine, workspace, tab, +# pane, agent, terminal_title, and terminal_title_stripped. # Custom values reported through pane metadata use a $name token. # A token occurrence may be styled with { token = "workspace", fg = "#89b4fa", bold = true, dim = false }. # Omitted style fields preserve the contextual default. # [ui.sidebar.agents] # Blank rows between agent entries. Set to 1 to restore the previous spacing. # row_gap = 0 -# rows = [["state_icon", "workspace", "tab"], ["agent"]] +# rows = [["state_icon", "machine", "workspace", "tab"], ["agent"]] # Optional canonical agent IDs replace the default rows for matching agents. # [ui.sidebar.agents.rows_by_agent] -# claude = [["state_icon", "workspace", "tab"], ["terminal_title_stripped"], ["agent"]] +# claude = [["state_icon", "machine", "workspace", "tab"], ["terminal_title_stripped"], ["agent"]] # Expanded space rows. Built-ins are state_icon, state_text, workspace, branch, and git_status. # Custom values reported through workspace metadata use a $name token, for example $jj_status. @@ -587,6 +587,7 @@ fn main() -> io::Result<()> { println!(" herdr completion zsh"); println!(" herdr update [--handoff]"); println!(" herdr channel set "); + println!(" herdr machine ..."); println!(" herdr server stop"); println!(" herdr server reload-config"); println!(" herdr api ..."); @@ -631,6 +632,7 @@ fn main() -> io::Result<()> { "herdr channel ", "Manage the stable or preview update channel", ), + ("herdr machine ", "Manage saved SSH machines"), ( "herdr api ", "Inspect socket API metadata and live runtime state", @@ -737,6 +739,7 @@ fn main() -> io::Result<()> { "status", "config", "channel", + "machine", "workspace", "worktree", "pane", @@ -764,7 +767,9 @@ fn main() -> io::Result<()> { let loaded_config = config::Config::load(); exit_if_nested_disabled(&loaded_config.config); - if let Err(err) = server::autodetect::auto_detect_launch() { + let saved_federation = + client::endpoint::EndpointCatalog::load().is_ok_and(|catalog| catalog.has_enabled_ssh()); + if let Err(err) = server::autodetect::auto_detect_launch(saved_federation) { eprintln!("herdr: {err}"); std::process::exit(1); } -- cgit v1.2.3