In this section

The capdag command plans and runs machines and single caps, installs and runs cartridges, and scaffolds new ones (see the CapDAG CLI reference). This page lists every way to install it. Whichever you use, check that it runs:

capdag --version

Platforms

capdag is published for macOS on Apple silicon (darwin-arm64) and Linux on x86_64 (linux-x86_64). There is no build yet for Intel Macs, for Linux on arm64 or for Windows: none of the ways below installs it there. The downloads page and the release manifest always list what a release was built for.

What is installed

capdag is a bundle: the capdag executable and a bundled-cartridges/ directory beside it. The bundle carries a signed list of its cartridges, which the executable checks against the keys built into it when it discovers them, so the two must stay together. Every package below installs the whole bundle and puts a link to capdag on your PATH: a link, never a copy, because capdag finds bundled-cartridges/ from the real location of the executable.

Homebrew (macOS on Apple silicon, Linux on x86_64)

brew install machinefabric/tap/capdag

apt (Debian, Ubuntu)

The capdag command is in the MachineFabric package repository, as a package for amd64. Adding the repository once serves every MachineFabric package: skip to the last line if you have already added it for another one.

curl -fsSL https://release.machinefabric.com/packages/keys/repo-signing-prod.asc \
  | sudo gpg --dearmor -o /usr/share/keyrings/machinefabric.gpg
echo "deb [signed-by=/usr/share/keyrings/machinefabric.gpg] https://release.machinefabric.com/packages/apt stable main" \
  | sudo tee /etc/apt/sources.list.d/machinefabric.list
sudo apt update && sudo apt install capdag

The bundle is installed in /opt/capdag, and /usr/bin/capdag links to it.

dnf (Fedora, RHEL)

The same repository, added once for every MachineFabric package. capdag is in it as a package for x86_64:

sudo tee /etc/yum.repos.d/machinefabric.repo >/dev/null <<'EOF'
[machinefabric]
name=MachineFabric
baseurl=https://release.machinefabric.com/packages/rpm/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://release.machinefabric.com/packages/keys/repo-signing-prod.asc
EOF
sudo dnf install capdag

The bundle is installed in /opt/capdag, and /usr/bin/capdag links to it.

Direct download

Every release is published as an archive per platform, listed with its SHA-256 digest in the release manifest, https://release.machinefabric.com/capdag-cli/manifest. The manifest lists the platforms a release was built for, and the installers of each; a platform that is not listed has no build yet. The archive of a platform is at

https://release.machinefabric.com/capdag-cli/release/<version>/capdag-<version>-<platform>.tar.gz

with <platform> one the manifest lists for that release: darwin-arm64 or linux-x86_64.

Download the archive, check it against the manifest’s digest, unpack it, and link capdag from a directory on your PATH:

version=1.617.6310       # the release's latest version is in the manifest
platform=darwin-arm64
curl -fLO "https://release.machinefabric.com/capdag-cli/release/$version/capdag-$version-$platform.tar.gz"
shasum -a 256 "capdag-$version-$platform.tar.gz"     # compare with the manifest's sha256
tar xzf "capdag-$version-$platform.tar.gz"           # unpacks capdag-bundle/
sudo ln -s "$PWD/capdag-bundle/capdag" /usr/local/bin/capdag

Link it; do not copy the executable out of capdag-bundle/. Keep the directory where it is. Older releases and the other installers of each are listed on the downloads page.

Updating

Update with the tool you installed with:

Installed with Update with
Homebrew brew upgrade machinefabric/tap/capdag
apt sudo apt update && sudo apt install --only-upgrade capdag
dnf sudo dnf upgrade capdag
Direct download capdag self update

capdag self update replaces the bundle where it is — the executable and bundled-cartridges/ together — with the latest release, and installs it only when the release manifest’s signature chains to the keys built into the capdag you have: see capdag self update.

Next

Build and run a cartridge, or look up a command in the CapDAG CLI reference.