Installation
From a release
Prebuilt binaries are served by this site itself under /dl/, one directory
per release: ant_<os>_<arch>.tar.gz, ant-worker-linux-<arch>, and a
checksums.sha256. The latest.json manifest names the most recently
published release.
The install script resolves the latest stable version (or the tag given with
--version vX.Y.Z), downloads the matching archive, verifies its SHA-256
checksum, and installs it:
curl -fsSL https://ants-docs.pages.dev/dl/install.sh | sh
No credentials are needed. On a Linux machine that will run containers, add
--agent to install ant-worker beside the CLI; --uninstall (with --agent
and optionally --purge) reverses an install. Set ANT_DL_BASE_URL to install
from a mirror.
For a machine with no SSH access, ant nest bootstrap --machine prod --cloud-init --worker-url <url> prints a user-data script that installs the
worker from that URL for the target architecture. Pass the matching
ant-worker-linux-<arch> URL from the same release directory; the machine must
be able to fetch it directly.
From a clone (development)
git clone https://github.com/mekhane-labs/ant.git
cd ant
npm ci --prefix web/app # once: the Go build embeds web/app/dist
task build # ./bin/ant
task build:agent # ./bin/ant-worker (Linux + CGO)
CGO_ENABLED=1 go install ./cmd/ant also works from inside the clone and puts
the CLI in $GOBIN. The module path is github.com/mekhane-labs/ant; a remote
go install github.com/mekhane-labs/ant/cmd/ant@latest additionally needs the
vendored iroh-go fork published, because go install pkg@version ignores the
local replace.
task install builds the CLI and puts ant on PATH, together with
ant-worker beside it on Linux, so an installed CLI can provision a machine
over SSH by uploading its own worker. The iroh static libraries
(packages/iroh-go/libs/<target>/libiroh.a) are committed, so no Rust
toolchain is needed; run task libs:build only when updating iroh.
Provision a server with the worker you just built:
./bin/ant nest machines add prod --host 173.87.3.89 --ssh-key ~/.ssh/id_ed25519
# or, for an already-registered machine:
./bin/ant nest bootstrap --machine prod --host 173.87.3.89
SSH provisioning uploads ./bin/ant-worker (or --worker-bin, ANT_WORKER_BIN)
and refuses a binary that is not a Linux ELF for the target's architecture.
Prerequisites
- Go 1.26+ to build from source
- Node 22+ and npm (the dashboard is embedded in the CLI)
- Docker: the CLI and a running daemon
- Optionally, a builder CLI depending on
deploy.build:nixpacksforbuild: nixpackspackforbuild: buildpacksrailpackforbuild: railpack
Run ant nest tools at any time to see which are installed and how to get the
missing ones. ant nest tools install installs them via the host package
manager or the tool's official installer.
The remote transport (CGO)
The iroh transport (machine-to-machine RPC) is available on linux/amd64 and linux/arm64 and needs a C compiler:
CGO_ENABLED=1 go build -o bin/ant ./cmd/ant
CGO_ENABLED=1 go build -o bin/ant-worker ./cmd/agent
On any other platform Ant builds and runs local-first without the transport
(ant nest ping reports that iroh is unavailable). CGO_ENABLED=0 go build ./...
also works; it simply excludes the transport.
Windows and macOS users: the CLI builds local-first only; provisioning and managing remote machines requires a Linux CLI.