Installation
The Aperture CLI provides a convenient way to interact with Aperture. It can be used to generate a policy, apply a policy, list policies, and perform other operations such as listing connected agents, listing flow control points and preview samples of flow labels or HTTP requests on control points. Its use cases extend beyond the aforementioned operations. Detailed documentation is available on the aperturectl reference page.
The Aperture CLI, compatible with all major platforms, is accessible as an executable program. Binaries for the CLI can be obtained from the GitHub Release Page.
Alternatively, it can also be downloaded using the following script:
- dpkg
- rpm
- binary
VERSION="2.33.1"
ARCH="amd64"
PACKAGER="deb"
url="https://github.com/fluxninja/aperture/releases/download/v${VERSION}/aperturectl_${VERSION}_${ARCH}.${PACKAGER}"
echo "Will download ${PACKAGER} package version ${VERSION} compiled for ${ARCH} machine"
curl --fail --location --remote-name "${url}"
VERSION="2.33.1"
ARCH="x86_64"
PACKAGER="rpm"
url="https://github.com/fluxninja/aperture/releases/download/v${VERSION}/aperturectl-${VERSION}.${ARCH}.${PACKAGER}"
echo "Will download ${PACKAGER} package version ${VERSION} compiled for ${ARCH} machine"
curl --fail --location --remote-name "${url}"
# Substitute BIN for your bin directory.
VERSION="2.33.1"
BIN="/usr/local/bin"
OS="$(uname | tr '[:upper:]' '[:lower:]')"
ARCH="$(uname -m)"
case "$ARCH" in
x86_64) ARCH="amd64";;
aarch64) ARCH="arm64";;
*) echo "Unsupported architecture: $ARCH"; exit 1;;
esac
echo "Will download $OS package version $VERSION compiled for $ARCH machine"
url="https://github.com/fluxninja/aperture/releases/download/v${VERSION}/aperturectl-${VERSION}-${OS}-${ARCH}"
curl --fail --location --remote-name "${url}"
mv aperturectl* "${BIN}/aperturectl"
chmod +x "${BIN}/aperturectl"
Installation
Skip the following steps if you have obtained the binary file directly using the steps mentioned above.
- macOS
- Linux
brew install fluxninja/aperture/aperturectl
brew install fluxninja/aperture/aperturectl
sudo dpkg -i aperturectl_2.33.1*.deb
sudo rpm -i aperturectl-2.33.1*.rpm
Enable shell autocompletion
To configure your shell to load aperturectl
bash completions, add to your
profile:
- bash
- zsh
- fish
- powershell
source <(aperturectl completion bash)
source <(aperturectl completion zsh); compdef _aperturectl aperturectl
aperturectl completion fish | source
aperturectl completion powershell | Out-String | Invoke-Expression
Uninstall
- macOS
- Linux
brew uninstall aperturectl
brew untap fluxninja/aperture
brew uninstall aperturectl
brew untap fluxninja/aperture
sudo dpkg -r aperturectl
sudo rpm -e aperturectl