Install the CLI
The enclavia CLI is the primary entry point: authenticate, push images, create and manage enclaves. The source of truth is the public workspace at EnclaviaIO/enclavia, published on crates.io as enclavia-cli.
There are three ways to install it, in roughly the order most users will reach for them. All produce the same enclavia binary; pick the one that matches the toolchain you already have on your machine.
- cargo install: the published
enclavia-clicrate on crates.io, if you already have a Rust toolchain. - Nix: one command, no system dependencies to install.
- Build from source: if you want to read or modify the code as you go.
Common requirement
Regardless of install method:
- Docker — the CLI shells out to
docker taganddocker pushwhen you runenclavia push.
cargo install
The CLI is published on crates.io as enclavia-cli; the installed binary is still called enclavia (the crate's [[bin]] name).
Prerequisites
- A reasonably recent Rust toolchain (stable channel, 1.85+). rustup is the path of least resistance.
- A C compiler and
pkg-config. The CLI's HTTP client uses the system OpenSSL viaopenssl-sys, which builds against the host's libssl headers at install time.
Concrete package lists, by OS:
# Debian / Ubuntu
sudo apt install pkg-config libssl-dev build-essential
# Fedora / RHEL
sudo dnf install pkg-config openssl-devel gcc
# macOS (with Homebrew)
brew install pkg-config openssl@3On macOS you may also need to point openssl-sys at the Homebrew install:
export PKG_CONFIG_PATH="$(brew --prefix openssl@3)/lib/pkgconfig"Install
cargo install enclavia-cli~/.cargo/bin should already be on your $PATH if you installed Rust via rustup. To upgrade later, re-run the same command: cargo install rebuilds when a newer version has been published.
To run the latest unreleased code from git instead:
cargo install --git https://github.com/EnclaviaIO/enclavia enclavia-cliNix
A working Nix installation with flakes enabled is the only prerequisite. If your Nix config doesn't enable flakes by default, add this to ~/.config/nix/nix.conf:
experimental-features = nix-command flakesFor a one-off invocation:
nix run github:EnclaviaIO/enclavia#enclavia -- --helpEvery enclavia ... example in these docs can be prefixed with nix run github:EnclaviaIO/enclavia#enclavia -- if you'd rather not install the binary.
To get a persistent enclavia on $PATH:
nix profile install github:EnclaviaIO/enclavia#enclaviaTo upgrade later:
nix profile upgrade enclaviaBuild from source
If you'd rather have the repo on disk:
git clone https://github.com/EnclaviaIO/enclavia
cd enclavia
cargo build --release -p enclavia-cli
sudo install -m 0755 target/release/enclavia /usr/local/bin/enclaviaSame prerequisites as the cargo install path. The binary you want is at target/release/enclavia; the install step is optional but puts it somewhere on $PATH.
Verify
enclavia --helpYou should see the top-level command list (auth, enclave, push, reproduce). If that prints, you're done; head to Authenticate.
Backend
The CLI talks to the public beta backend at https://api.beta.enclavia.io. Credentials live under ~/.config/enclavia/ after enclavia auth login.