CLI Installation
Installation
macOS (Homebrew)
brew install archetypal-ai/tap/governLinux / macOS (curl)
curl -sSL https://get.govern.archetypal.ai | bashWindows (PowerShell)
irm https://get.govern.archetypal.ai/install.ps1 | iexnpm (all platforms)
npm install -g @archetypal-ai/govern-cliGo install
go install github.com/archetypal-ai/govern-cli@latestVerify installation
govern --version# govern version 1.2.0 (linux/amd64, commit abc123)Authentication
Interactive login
govern auth loginOpens a browser window to authenticate with your GOVERN account. The CLI stores your credentials in ~/.govern/credentials.json.
API key authentication
For CI/CD environments where browser authentication is not available:
govern auth set-key gvn_live_xxxxxxxxxxxxOr set the environment variable:
export GOVERN_API_KEY=gvn_live_xxxxxxxxxxxxexport GOVERN_ORG_ID=org_xxxxxxxxxxxxThe CLI checks (in order):
--api-keyflagGOVERN_API_KEYenvironment variable~/.govern/credentials.json
Check authentication status
govern auth status# Authenticated as: ben@archetypal.ai# Organization: Archetypal AI (org_xxxx)# Key type: live (production)# Expires: neverSwitch organizations
govern org list# * Archetypal AI (org_xxxx) — current# ACME Corp (org_yyyy)
govern org use org_yyyyShell completion
# Bashgovern completion bash > /etc/bash_completion.d/govern
# Zshgovern completion zsh > "${fpath[1]}/_govern"
# Fishgovern completion fish | sourceUpgrading
# Homebrewbrew upgrade govern
# npmnpm update -g @archetypal-ai/govern-cli
# curl install script (re-run)curl -sSL https://get.govern.archetypal.ai | bashUninstalling
# Remove binarybrew uninstall govern# or: rm $(which govern)
# Remove credentialsrm -rf ~/.govern