Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ backend; zellij has a CLI baseline and a planned richer plugin path.
| `muxa status-line` | One-line tmux `status-right` summary for the active pane. |
| `muxa watch` | Full-screen TUI for agents and panes, with attach, prompt composition, and live previews. |
| `muxa dashboard` | Session-card TUI console for inspecting panes and sending prompts without attaching. |
| `muxa swarm` | Fleet command center: cluster every agent as a swarm, dispatch a prompt to one, or broadcast to a marked squad. |
| `muxa attend` | Jump to the agent blocked on input/choice/error longest. |
| `muxa stats` / `muxa report` | Local analytics for prompt history, agent state duration, tmux foreground time, and human thinking time. |
| `muxa timeline` | Full-screen TUI timeline of agent work, waiting, errors, human interaction, and tmux foreground time. |
Expand Down Expand Up @@ -85,6 +86,7 @@ rollback details, see [docs/INSTALL.md](docs/INSTALL.md).
| `muxa status [--json]` | Human-readable table, or a versioned JSON snapshot for desktop integrations. |
| `muxa watch [--view pane\|session]` | Live TUI picker/dashboard. |
| `muxa dashboard [--since today]` | Session-card TUI console with live capture, prompt composer, abort/terminate actions, and ACT/WACT totals. |
| `muxa swarm [--group-by project\|session]` | Fleet command center TUI: state-colored swarm map, per-agent prompt dispatch, and squad broadcast (mark with Space, `b` to send). |
| `muxa attend [--cycle] [--list]` | Focus or list agents needing attention. |
| `muxa status-line [--pane %N]` | tmux status-line output. |
| `muxa recap [--pane %N]` | Recent prompts from retained disk history. |
Expand Down
25 changes: 25 additions & 0 deletions crates/muxa-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mod doctor;
mod init;
mod logs;
mod stats;
mod swarm;
mod theme;
mod time_range;
mod timeline;
Expand Down Expand Up @@ -106,6 +107,9 @@ enum Cmd {
Timeline(timeline::Args),
/// Session-card TUI console for inspecting and operating agents.
Dashboard(dashboard_tui::Args),
/// Fleet command center: cluster every agent as a swarm, then dispatch
/// prompts to one agent or broadcast to a whole marked squad.
Swarm(swarm::Args),
/// Query raw activity ledger intervals.
Activity(activity_query::Args),
/// Hook adapter entrypoints invoked by the agent CLIs themselves.
Expand Down Expand Up @@ -330,6 +334,7 @@ async fn main() -> Result<()> {
Cmd::Report(report_args) => stats::run_report(&client, &cfg, report_args).await,
Cmd::Timeline(timeline_args) => timeline::run(&client, &cfg, timeline_args).await,
Cmd::Dashboard(dashboard_args) => cmd_dashboard(&client, &cfg, dashboard_args).await,
Cmd::Swarm(swarm_args) => cmd_swarm(&client, &cfg, swarm_args).await,
Cmd::Activity(activity_args) => activity_query::run(&cfg, activity_args).await,
Cmd::Hook { which } => handle_hook(&client, which).await,
Cmd::Panes => {
Expand Down Expand Up @@ -804,6 +809,26 @@ async fn cmd_dashboard(client: &Client, cfg: &Config, args: dashboard_tui::Args)
Ok(())
}

async fn cmd_swarm(client: &Client, cfg: &Config, args: swarm::Args) -> Result<()> {
let activity_path = cfg
.activity
.enabled
.then(|| {
cfg.activity
.path
.clone()
.or_else(paths::default_activity_file)
})
.flatten();
match swarm::run(client, cfg, args).await? {
Some(swarm::OpenTarget::Pane(pane_id)) => {
jump_to_pane_logged(&pane_id, activity_path.as_deref()).await;
}
None => {}
}
Ok(())
}

async fn jump_to_pane_logged(pane_id: &str, activity_path: Option<&Path>) {
let should_log_attach = muxa::default_backend().kind() == muxa::HostKind::Tmux
&& !tmux::inside_tmux()
Expand Down
Loading