This repository has been archived on 2026-10-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
maestro/docs/INSTALL.md
T
naps62-yoloandClaude Opus 4.7 bc3237287f feat(maestro): maestro-web standalone binary + reverse-proxy (NAP-241)
New crate crates/maestro-web/: axum server that

* embeds the web/dist SPA bundle via include_dir! (graceful placeholder when
  pnpm build hasn't run yet — keeps fresh checkouts compiling)
* reverse-proxies /api/* HTTP to a co-located daemon (default
  http://127.0.0.1:7070) via reqwest, stripping hop-by-hop headers
* reverse-proxies /api/attach/:id and /api/events WebSockets via
  tokio_tungstenite::connect_async + a tokio task pumping both directions
* reads bind_addr / daemon_url / dev_proxy_target from the new [web]
  config section; env-var overrides MAESTRO_WEB_BIND_ADDR / _DAEMON_URL /
  _DEV_PROXY_TARGET

Integration tests spin up a mock daemon + maestro-web pair on random ports
and verify HTTP forward, SPA fallback, WS echo, and 502 on unreachable
daemon.

Adds a top-level Justfile (`just web` = pnpm install + pnpm build + cargo
build), crates/maestro-web/README.md (config + trust model + dev workflow),
and a docs/INSTALL.md section on optional web UI install.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 18:23:14 +00:00

4.8 KiB

Installing Maestro

The repo is private, so grab install.sh while signed in to gitea, then run it:

  1. Open https://git.naps.pt/naps62/maestro/src/branch/main/install.sh, click Raw, save as install.sh. Or from any existing clone:
    git show origin/main:install.sh > install.sh
    
  2. Run it:
    chmod +x install.sh && ./install.sh
    

The bootstrap script builds maestro-installer into a temp directory, runs the wizard, and cleans up — only maestrod and maestro end up persisted in ~/.cargo/bin.

Updating is the same command. Re-running ./install.sh detects an existing [daemon] section in ~/.config/maestro/config.toml and an existing systemd unit, skips the configure prompt, refreshes the unit, and runs systemctl --user restart maestrod instead of start. No --update flag needed.

Inside the script, cargo install --git https://git.naps.pt/naps62/maestro … uses your already-configured git credentials for this host (HTTPS helper or SSH agent). If only SSH is set up:

MAESTRO_REPO_URL=ssh://git@git.naps.pt/naps62/maestro ./install.sh

Pass flags through to the wizard after ./install.sh:

./install.sh --yes --no-systemd

The wizard:

  1. Runs cargo install for maestro-daemon and maestro-cli (pinned to the committed Cargo.lock via --locked).
  2. Optionally runs maestrod configure to populate ~/.config/maestro/config.toml (one shared TOML for maestrod, maestro-registry, and the maestro CLI).
  3. On systemd hosts, optionally writes a user unit at ~/.config/systemd/user/maestrod.service, reloads systemd, and offers to enable + start it.

Both binaries land in ~/.cargo/bin — make sure that's on your $PATH.

Adding the browser UI (optional)

maestro-web is a separate binary that serves the SPA bundle and reverse- proxies API calls to a co-located maestrod. Install it where you want a browser UI:

pnpm -C web install --frozen-lockfile
pnpm -C web build
cargo install --git https://git.naps.pt/naps62/maestro --locked maestro-web

…or, from a checkout, just web then cargo install --path crates/maestro-web --locked.

It defaults to binding 127.0.0.1:8080 and proxying to http://127.0.0.1:7070 (the daemon's default bind_addr). The [web] section of ~/.config/maestro/config.toml overrides both — see crates/maestro-web/README.md. Trust model: anyone who can reach the bind address can use it; pick 127.0.0.1 for local-only, a WireGuard/LAN address for one-segment access, never a public IP without adding auth first.

Headless hosts (servers, dev VMs) install only maestrod. Hosts where you want browser access install both.

Flags

Flag Purpose
--git <url> Install from a different git repo (default: this one).
--branch <name> Pin a branch with --git.
--path <dir> Install from a local workspace checkout (--path + -p <crate>).
--no-locked Drop --locked from cargo install (resolves a fresh dep tree).
--exec-start <path> Override the systemd unit's ExecStart (default ~/.cargo/bin/maestrod).
--no-systemd Skip the systemd step even if detected.
--no-configure Skip the maestrod configure step.
-y, --yes Non-interactive: install binaries + drop systemd unit + reload + enable, but don't auto-run configure or auto-start the unit (those need real config).

What the systemd unit looks like

The wizard writes a user unit (systemctl --user), since maestrod runs per-user and uses tmux sockets under $XDG_RUNTIME_DIR. Body:

[Unit]
Description=Maestro per-host daemon (maestrod)
Documentation=https://git.naps.pt/naps62/maestro
After=network-online.target

[Service]
Type=simple
ExecStart=%h/.cargo/bin/maestrod
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target

Check status / logs:

systemctl --user status maestrod
journalctl --user -u maestrod -f

Running the wizard without the bootstrap script

If you'd rather skip the script:

cargo install --git https://git.naps.pt/naps62/maestro maestro-installer
maestro-install

This leaves maestro-installer permanently in ~/.cargo/bin — the bootstrap script avoids that by installing to a scratch dir.

Fully manual install (no wizard)

cargo install --git https://git.naps.pt/naps62/maestro --locked maestro-daemon
cargo install --git https://git.naps.pt/naps62/maestro --locked maestro-cli
maestrod configure
maestrod          # foreground; or wire your own service manager

Non-Linux hosts

The wizard works on macOS for the cargo install + maestrod configure parts. The systemd step is automatically skipped (probe of /run/systemd/system). launchd integration is not yet supported — start maestrod from your shell or your own service manager.