Installation
About 449 words
unifi-cli ships as a single static binary named unifi, built for Linux, macOS and Windows on amd64 and arm64. It has no runtime dependencies.
Homebrew
brew install --cask spechtlabs/tap/unifi-cliThe cask installs unifi and its completions for bash, zsh and fish. The binary isn't notarized by Apple, so the cask removes the macOS quarantine attribute from it during installation.
Release archives
Download the archive for your platform from the GitHub releases page. Archives are named unifi-cli_<version>_<os>_<arch>.tar.gz (.zip on Windows) and contain the binary, the license, and a completions/ directory.
VERSION=0.1.0
curl -sSLO "https://github.com/SpechtLabs/unifi-cli/releases/download/v${VERSION}/unifi-cli_${VERSION}_linux_amd64.tar.gz"
tar -xzf "unifi-cli_${VERSION}_linux_amd64.tar.gz" unifi
sudo install -m 0755 unifi /usr/local/bin/unifiOn Windows, unpack the zip and put unifi.exe in a directory on your PATH.
Verify the download
Every release carries a checksums.txt and a keyless cosign signature for it, checksums.txt.sigstore.json. The signature covers each archive through its checksum, so verify the signature first and the archive against the checksum file second:
cosign verify-blob \
--bundle checksums.txt.sigstore.json \
--certificate-identity https://github.com/SpechtLabs/unifi-cli/.github/workflows/release.yaml@refs/heads/main \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
checksums.txt
sha256sum --check --ignore-missing checksums.txtgo install
go install github.com/spechtlabs/unifi-cli/cmd/unifi@latestThis needs the Go version named in the repository's go.mod. A binary built this way reports its version as dev, because the release metadata is set by the linker during a release build.
Build from source
The repository pins its whole toolchain with mise, so a build needs nothing else installed:
git clone https://github.com/SpechtLabs/unifi-cli.git
cd unifi-cli
mise install
mise run build
./bin/unifi versionmise run build also builds bin/unifi-mock, the demo controller.
Verify the installation
$ unifi version --output json
{
"version": "0.1.0",
"commit": "<git commit>",
"date": "<build date>"
}Without --output json the command prints the same three fields below the logo.
Shell completion
The Homebrew cask installs completion scripts for you. For every other installation method, unifi completion <bash|zsh|fish|powershell> prints the script; the completion guide shows where to put it. Completion covers more than flags: context, site, client, device, port and theme names complete live from your configuration and controller.
Where unifi-cli keeps its files
| File | Default location |
|---|---|
| Configuration | ~/.config/unifi-cli/config.yaml |
| Your themes | ~/.config/unifi-cli/themes/ |
| Log | ~/.local/state/unifi-cli/unifi.log |
Credentials file (without an OS keychain, or with UNIFI_CREDENTIAL_STORE=file) | ~/.config/unifi-cli/credentials.yaml |
| Cache | ~/.local/state/unifi-cli/cache/ |
unifi config path prints the paths in effect on your machine. The configuration guide explains how to move them.
Next step
Continue with the quick start.
