Documentation
¶
Overview ¶
Command muster-mirror shows this machine's tmux sessions in muster's Agents view as MIRRORED sessions — one card per tmux WINDOW. It is READ-ONLY unless started with -interactive. It is the optional host half of the mirror plugin: install it only on the machines whose sessions muster should show, and only against a muster running with MUSTER_MIRROR=1.
It dials OUT to muster and opens no listener — unless -mcp-listen is set, which serves a LOOPBACK-only MCP endpoint for this host's own Claude Code sessions (internal/mirrorhost's MCPProxy; docs/attention.md). Its one credential is this host's mirror token, minted on the muster side with
muster-server mirror token create <host>
Usage:
muster-mirror -url https://muster.example.com -token-file ~/.config/muster-mirror/token
`muster-mirror ask` is a different, short-lived command: Claude Code's PreToolUse hook for AskUserQuestion (ask.go).
Every flag also reads an environment variable (named in -help), so a systemd unit can configure it without putting the token in argv.
Index ¶
Constants ¶
const DefaultTokenFile = "~/.muster/mirror-token"
DefaultTokenFile is the mirror token's default path, for the daemon and the hook alike.
Variables ¶
This section is empty.
Functions ¶
func Main ¶
Main is the host role: what the muster-mirror binary's main() did, with argv[1:] passed in. `muster host …`, the cmd/muster-mirror shim and a binary invoked as muster-mirror all call it with the same arguments, so every flag and subcommand parses the same under each name. It returns the process's exit code.
func SetBuildRevision ¶
func SetBuildRevision(v string)
SetBuildRevision sets the version this role reports. Call it before Main.
func SetLauncherArgs ¶
func SetLauncherArgs(args ...string)
SetLauncherArgs sets the words a spawned opencode window puts between this binary and `opencode`. The muster binary's host role calls it with "host": its executable is muster, where `opencode` alone would be the client's. Call it before Main.
Types ¶
This section is empty.