magus-server
Manage the persistent magus daemon
Synopsis
magus server <start|stop|reload|job> [flags]
Description
Start, stop, or check the liveness of a persistent magus daemon.
By default every magus invocation starts a short-lived proc server that dies when the command exits. The persistent daemon keeps the server alive across invocations so workspace discovery, config loading, and the content-addressed cache are paid for once. Nested magus calls (from build scripts, editor integrations, etc.) forward work to the daemon automatically.
The socket address is resolved in priority order: --socket flag > MAGUS_DAEMON_ADDRESS env > daemon.address in magus.yaml > stable default ($XDG_RUNTIME_DIR/magus/magus-daemon.sock)
The socket file acts as the lock: present means a daemon is running, absent means none. Shell init hooks (e.g. Nix-injected .profile lines) typically check for the file with [ -S "$socket" ] before starting one.
server start options
- --foreground
- Run in the foreground and block, instead of auto-backgrounding
server stop options
- --services
- Stop the daemon's hosted services, leaving the daemon running
- --socket string
- Daemon socket (default: config / MAGUS_DAEMON_ADDRESS / auto-detect)
server reload options
- --socket string
- Daemon socket (default: config / MAGUS_DAEMON_ADDRESS / auto-detect)
Subcommands
- start
- Start a persistent daemon (auto-backgrounds by default; --foreground blocks)
- stop
- Send a graceful shutdown request to a running daemon
- reload
- Re-read configuration without restarting: drop the daemon's open workspaces
- job
- Submit a background maintenance job to a running daemon (no-op with no daemon)
Examples
Start the daemon (auto-backgrounds)
magus server start
Run the daemon in the foreground (supervisor or debugging)
magus server start --foreground
Stop the running daemon
magus server stop
Reload configuration without restarting
magus server reload
Submit a background job
magus server job rotate-logs
Inspect daemon pool state
magus status
Use a custom socket path
magus --daemon-address unix:///tmp/m.sock server start
See Also
magus(1), magus-ls(1), magus-describe(1), magus-run(1), magus-x(1), magus-where(1), magus-affected(1), magus-graph(1), magus-query(1), magus-explain(1), magus-path(1), magus-refs(1), magus-watch(1), magus-events(1), magus-status(1), magus-clean(1), magus-vcs(1), magus-doctor(1), magus-config(1), magus-session(1), magus-memory(1), magus-notes(1), magus-diff(1), magus-mcp(1), magus-buzz(1), magus-completion(1), magus-man(1), magus-init(1), magus-agent(1), magus-self(1), magus-version(1)