magus v0.3.0 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
1 min read

magus-server

Manage the persistent magus daemon

Synopsis

magus server <start|stop> [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.

Subcommands

start
Start a persistent daemon (foreground; use & or a supervisor to background)
stop
Send a graceful shutdown request to a running daemon

Examples

Start daemon in the background

magus server start &

Stop the running daemon

magus server stop

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-insight(1), magus-graph(1), magus-watch(1), magus-status(1), magus-doctor(1), magus-config(1), magus-completion(1), magus-man(1), magus-init(1), magus-self(1), magus-version(1)

auto-generatedclimagus serverdaemonserversocketpersistent
Last updated (a59e71c9)
Earlier changes on this page (2)

Full history ↗ · Blame source ↗

Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. See workspace.

Ward

A coded diagnostic that inspects a resolved op and nudges or blocks an anti-pattern before it runs. See wards.

Cache

The content-addressed store magus consults before running a target, so unchanged work is skipped. See cache.

Affected

The set of projects touched by a change; magus affected <target> runs a target only over them. See affected.

Daemon

The background magus host that owns shared state such as services and the warm knowledge graph. See daemon.

Pool

The concurrency pool: the shared set of slots that caps how many targets run in parallel on one machine. Its capacity defaults to MAGUS_CONCURRENCY, then 4 on GitHub-hosted runners, then min(NumCPU, 8); magus status and the dashboard report it live. See daemon.

MAGUS.md

The committed routing index at a workspace root, regenerated from the knowledge graph: it lists every node and points at the exact query for a given question, so it is the entry point an agent reads first. See knowledge.

Insight

The reports magus derives over the graph and history (hotspots, affinity, ownership, trend). See insight.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.