Nais CLI
The Nais CLI (nais) is a command-line tool for interacting with the Nais platform.
Installation
macOS
brew tap nais/tap
brew trust nais/tap
brew install nais
Ubuntu / Debian
NAIS_GPG_KEY="/etc/apt/keyrings/nav_nais_gar.asc"
curl -sfSL "https://europe-north1-apt.pkg.dev/doc/repo-signing-key.gpg" | sudo dd of="$NAIS_GPG_KEY"
echo "deb [arch=amd64 signed-by=$NAIS_GPG_KEY] https://europe-north1-apt.pkg.dev/projects/nais-io nais-ppa main" | sudo tee /etc/apt/sources.list.d/nav_nais_gar.list
sudo apt update
sudo apt install nais
Windows
scoop bucket add nais https://github.com/nais/scoop-bucket
scoop install nais-cli
Manual download
Download the archive for your platform from GitHub Releases and extract the nais binary to a directory on your $PATH.
Getting started
After installation, log in to the Nais platform:
nais login
Then explore available commands:
nais --help
Postgres command migration (breaking change)
nais postgres now manages Nais Postgres. The commands previously available under nais alpha postgres have moved directly to nais postgres, without an alias at the old location.
For Google Cloud SQL, use nais cloudsql instead of nais postgres or nais pg. The old Cloud SQL aliases have been removed. Update scripts and shell aliases before upgrading to this major release.
Shell completion
Enable shell completion for faster navigation:
# Bash
source <(nais completion bash)
# Zsh
source <(nais completion zsh)
# Fish
nais completion fish | source
Add the appropriate line to your shell profile to make it persistent.