Skip to content

wdx daemon

Start, stop and inspect the daemon.

The daemon serves the project commands on /home/you/.wdx/wdx.sock. It reads the settings when it starts; restart it after changing them or updating wdx.

Command What it does
wdx daemon restart Restart the daemon, or start it
wdx daemon start Start the daemon
wdx daemon status Show whether the daemon is running
wdx daemon stop Stop the daemon

Restart the daemon, or start it.

Terminal window
wdx daemon restart [flags]

Stop the daemon if it is running, then start it, as after updating wdx or its settings.

Terminal window
# Restart the daemon after changing the settings
wdx daemon restart

The daemon started. With --json: {“result”: “restarted”, “daemon”: {…}}

With --json, result is one of: restarted.

Code Exit When
daemon_unavailable 3 the daemon is not running or not answering
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git

Start the daemon.

Terminal window
wdx daemon start [--foreground] [flags]

Waits until the daemon answers. It starts through systemd or launchd when the installer set it up as a service, else in the background. With --foreground it runs in this process until interrupted, as a service manager runs it.

Flag Default Description
--foreground run in this process until interrupted
Terminal window
# Start the daemon
wdx daemon start
# Run it in this terminal until Ctrl-C
wdx daemon start --foreground

The daemon, already running or started; with --foreground, the daemon once stopped. With --json: {“result”: …, “daemon”: {…}}

With --json, result is one of: running, started or stopped.

Code Exit When
already_running 1 a daemon already serves this home
daemon_unavailable 3 the daemon is not running or not answering
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git

Show whether the daemon is running.

Terminal window
wdx daemon status [flags]

Show whether the daemon is running

Terminal window
# Show whether the daemon is running
wdx daemon status
# As JSON
wdx daemon status --json

Whether the daemon is running, its pid, what it says about itself when it answers, and the service manager that runs it, if it is installed as a service. With --json: {“running”: …, “pid”: …, “daemon”: {…}, “manager”: …}

Code Exit When
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git

Stop the daemon.

Terminal window
wdx daemon stop [flags]

The requests in flight finish first. It stops through systemd or launchd when it runs as a service, else by signalling it.

Terminal window
# Stop the daemon
wdx daemon stop

The daemon stopped, or that none was running. With --json: {“result”: …, “daemon”: {…}}

With --json, result is one of: not_running or stopped.

Code Exit When
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git