Skip to content

wdx deps

Show and install the programs wdx needs besides itself.

git is mandatory: projects and their terminals need it. The others are optional: without one, only the features it enables are missing.

Command What it does
wdx deps install Install a dependency with the system’s package manager
wdx deps list List the programs wdx needs, whether each is ready, and what it enables

Install a dependency with the system’s package manager.

Terminal window
wdx deps install --name <dependency> [--yes] [flags]

On Ubuntu and Debian with apt, on macOS with brew. When installing needs root, the commands are shown and you are asked before sudo runs them; sudo then asks for your password. --yes answers in advance; without a terminal sudo cannot ask, so it works only when no password is needed. docker and podman each provide the container dependency. A dependency already ready is left as it is. Every failure says why and how to install it yourself.

Flag Default Description
--name <dependency> dependency to install: git, clipboard, docker, podman, gh, browser, vi, vim, nvim, nano, hx, emacs
--yes run the commands that need root without asking
  • --name is required
  • with --json: one of --yes
Terminal window
# Install the clipboard tool TIDE copies with
wdx deps install --name clipboard
# Install docker without being asked
wdx deps install --name docker --yes
# From a script, where sudo needs no password
wdx deps install --name git --yes --json

The dependency as it is now, with what is left to do, as logging in again. With --json: {“result”: …, “dependency”: {…}, “install”: {…}}

With --json, result is one of: installed or ready.

Code Exit When
cancelled 1 the question was answered no
install_failed 3 the package manager failed
privileges_required 1 installing needs root, and sudo cannot ask for the password
unsupported_system 1 wdx cannot install it on this system: the instructions say how to by hand
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git

List the programs wdx needs, whether each is ready, and what it enables.

Terminal window
wdx deps list [flags]

A dependency is ready, missing, too_old (git before 2.31) or not_ready: installed but not usable, as docker whose daemon does not answer. The clipboard tool is the one for the session: wl-copy on Wayland, xclip or xsel on X11, pbcopy on macOS.

Terminal window
# Every dependency
wdx deps list
# As JSON, for a script
wdx deps list --json

Each dependency: mandatory or optional, its status, the program and version found and the features it enables; why it is not ready below; then the system. With --json: {“system”: {…}, “dependencies”: […]}

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